/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: lavenderblush;
  color: #333;
  line-height: 1.6;
}
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
h1, h2, h3 { margin: 0.3rem 0; text-align: center; color: #000; }

/* ===== NEW HEADER LAYOUT ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #AFAFAF;
  color: lavenderblush;
  padding: 1rem 2rem;
  position: relative;
}

/* Match aside width on desktop (220px) */
.logo-link {
  display: block;
  flex: 0 0 220px;
}

.logo {
  display: block;
  width: 220px;  /* matches aside */
  height: auto;
}

/* Right column (titles + nav) */
.header-right {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

/* Desktop nav defaults */
#site-menu { display: block; background: transparent; }
#site-menu ul {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}
#site-menu a {
  display: block;
  padding: .6rem 1.2rem;
  background: #757575;
  color: lavenderblush;
  text-decoration: none;
  border-radius: 5px;
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: #757575;
  color: lavenderblush;
  border: 0;
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 999;
}

/* ===== Layout ===== */
#content {
  flex: 1;
  display: flex;
  gap: 2rem;
  padding: 1rem 2rem;
}
aside {
  flex: 0 0 220px;
  max-width: 260px;
  background: #e5e5e5;
  color: #333;
  padding: 1rem;
  border-radius: 8px;
}
aside p { margin: 0 0 .4rem; text-align: center; }
main { flex: 1 1 auto; min-width: 0; }

/* ===== Product Grid ===== */
.product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
  margin-top: 1.25rem;
}
.product-card {
  background: #AFAFAF;
  color: lavenderblush;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
.product-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin-bottom: 0.75rem;
}
.product-card h3 {
  margin: 0 0 .25rem;
  color: #fff;
  text-align: center;
}
.product-card .muted {
  color: #f0f0f0;
  text-align: center;
  margin: 0 0 .25rem;
}
.product-card .price {
  text-align: center;
  margin: 0 0 .75rem;
}

.btn, a.btn {
  display: inline-block;
  text-align: center;
  background: lavenderblush;
  color: #AFAFAF;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 1rem;
  background: #AFAFAF;
  color: lavenderblush;
  margin-top: auto;
}

/* ===== Responsive ===== */

/* Mobile / Tablet ≤ 768px */
@media (max-width: 768px) {

  /* Stack header */
  .site-header {
    display: block;
    text-align: center;
    padding: .75rem 1rem;
  }

  /* The logo becomes small + centered */
  .logo-link {
    flex: none;
    margin: 0 auto;
  }
  .logo {
    width: 64px;
    height: auto;
    margin: 0 auto;
  }

  .menu-toggle { display: inline-block; }

  #site-menu { display: none; background: #AFAFAF; margin-top: .5rem; }
  #site-menu.open { display: block; }

  #site-menu ul { display: block; padding: 0; }
  #site-menu a {
    display: block;
    padding: 1rem;
    border-radius: 0;
    border-top: 1px solid rgba(255,255,255,.15);
  }

  #content {
    display: block;
    padding: 1rem;
  }
  aside {
    display: none; /* hidden on mobile */
  }
}

/* Desktop wide ≥ 1200px */
@media (min-width: 1200px) {
  #content { gap: 2.5rem; }
  .product-grid { gap: 2.25rem; }
}

/* Desktop ≥ 992px */
@media (min-width: 992px) {
  #content {
      display: flex;
      gap: 2rem;
      align-items: flex-start;
      padding: 1rem 2rem;
  }
  aside {
      flex: 0 0 220px;
      max-width: 260px;
      background-color: #e5e5e5;
      padding: 1rem;
      border-radius: 8px;
  }
  main {
      flex: 1 1 auto;
      min-width: 0;
  }
}
