html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  height: 100%;
}

body {
  background: black;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  display: flex;
}

.main-wrapper {
  display: flex;
  flex: 1;
  flex-direction: row;
}

nav {
  width: 160px;
  background-color: #fff8dc;
  color: #00406F;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 2px solid #00406F;
}

nav img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1em;
}

nav a {
  color: #00406F;
  text-decoration: none;
  margin-bottom: 1em;
  transition: all 0.3s ease;
}

nav a:hover {
  color: #ff6600;
  text-decoration: underline;
}

main {
  flex: 1;
  padding: 2em 0;
  background: #004E8D;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  max-width: 900px;
  width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
}

footer {
  background-color: #222;
  color: #ccc;
  padding: 1em;
  font-size: 0.9em;
  text-align: center;
}

/* NEW: Product Grid Styles */
.products {
  display: flex;
  justify-content: center;
  gap: 1.5em;
  flex-wrap: wrap;
  padding: 1em;
  align-items: flex-start;
}

.product-wrapper {
  background: #fff8dc;
  padding: 0.75em;
  border-radius: 8px;
  max-width: 160px;
  width: 160px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-wrapper img {
  width: 70%;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  border: 3px solid #ccc;
  background-color: white;
  padding: 0.5em;
  box-sizing: content-box;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-wrapper img:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.product-wrapper h2 {
  font-size: 0.95em;
  color: #00406F;
  margin: 0.5em 0;
}

.price-box {
  font-size: 0.85em;
  margin: 0.75em 0;
}

.buy-button {
  padding: 0.4em 0.8em;
  font-size: 0.85em;
  background-color: #004E8D;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* Responsive Layout */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  nav {
    width: 100%;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    padding: 8px;
    gap: 0.50em;
    border-right: none;
    border-bottom: 2px solid #00406F;
    background-color: #fff8dc;
    box-sizing: border-box;
  }

  nav img {
    max-width: 40px;
    margin-bottom: 0;
  }

  nav a {
    margin-bottom: 0;
    font-size: 0.9em;
  }

  main {
    padding: 1em;
    flex-direction: column;
  }

  .products {
    flex-direction: column;
    align-items: center;
  }

  .product-wrapper {
    max-width: 90%;
    width: 90%;
  }

  .product-wrapper img {
    height: 180px;
    padding: 0.5em;
    box-sizing: content-box;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  .product-wrapper img:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  }
}
