/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  color: #1a3d2d;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: var(--page-bg-photo, none), var(--page-bg-gradient, linear-gradient(180deg, #f4f8f5, #f4f8f5));
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

main {
  flex: 1;
}

/* Background variants:
   - The base color/gradient comes from these classes.
   - The "photo" layer comes from HTML via --page-bg-photo. */

.bg-smoothies { --page-bg-gradient: linear-gradient(180deg, rgba(244,248,245,0.92), rgba(244,248,245,0.98)); }
.bg-vegart { --page-bg-gradient: linear-gradient(180deg, rgba(236,255,244,0.92), rgba(244,248,245,0.98)); }
.bg-juices { --page-bg-gradient: linear-gradient(180deg, rgba(240,255,250,0.92), rgba(244,248,245,0.98)); }
.bg-smoothie-bowls { --page-bg-gradient: linear-gradient(180deg, rgba(236,253,245,0.92), rgba(244,248,245,0.98)); }
.bg-chia-bowls { --page-bg-gradient: linear-gradient(180deg, rgba(232,250,239,0.92), rgba(244,248,245,0.98)); }
.bg-salads { --page-bg-gradient: linear-gradient(180deg, rgba(236,255,244,0.92), rgba(244,248,245,0.98)); }
.bg-desserts { --page-bg-gradient: linear-gradient(180deg, rgba(248,250,252,0.92), rgba(244,248,245,0.98)); }
.bg-rio { --page-bg-gradient: linear-gradient(180deg, rgba(244,248,245,0.92), rgba(244,248,245,0.98)); }
.bg-rio-icecream { --page-bg-gradient: linear-gradient(180deg, rgba(255,247,237,0.92), rgba(244,248,245,0.98)); }
.bg-rio-coffee { --page-bg-gradient: linear-gradient(180deg, rgba(254,252,232,0.92), rgba(244,248,245,0.98)); }
.bg-rio-desserts { --page-bg-gradient: linear-gradient(180deg, rgba(249,250,251,0.92), rgba(244,248,245,0.98)); }

/* No default --page-bg-photo here on purpose.
   If a page doesn't define it, the photo layer will be empty. */

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: #1a3d2d;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.hamburger {
  font-size: 1.8rem;
  cursor: pointer;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 4px 6px;
  line-height: 1;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: #2b5d44;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: 12px 20px;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  transition: background 0.3s;
}

.mobile-menu a:hover {
  background: rgba(255,255,255,0.1);
}

/* MAIN CONTENT */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  padding: 30px;
  flex: 1;
}

.content {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.page-title {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 16px;
}

.page-subtitle {
  opacity: 0.85;
  margin-top: -6px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: 22px;
  margin-bottom: 10px;
}

.section-note {
  opacity: 0.8;
  margin-top: -6px;
  margin-bottom: 12px;
}

.category {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  height: 200px;
  background: #e0f2e9;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  color: #1a3d2d;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  text-align: center;
  padding: 10px;
  overflow: hidden;
  gap: 10px;
}

.category-media {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: rgba(255, 255, 255, 0.35);
}

.category-label {
  display: block;
  padding: 0 6px 2px;
  line-height: 1.25;
}

.category:hover {
  transform: translateY(-5px);
  background: #d0eadc;
  box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Product cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.product-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(26, 61, 45, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
}

.product-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.product-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
}

.product-desc {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.35;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 61, 45, 0.08);
}

.product-price {
  font-weight: 800;
}

/* BACK BUTTON */
.back-btn {
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: calc(18px + env(safe-area-inset-left, 0px));
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: rgba(26, 61, 45, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
  transition: all 0.3s;
  z-index: 100;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
  background: #2b5d44;
  transform: scale(1.1);
}

.back-btn:active {
  transform: scale(0.98);
}

.back-btn:focus-visible {
  outline: 3px solid rgba(46, 204, 113, 0.65);
  outline-offset: 3px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 20px 0;
  background: #1a3d2d;
  color: #fff;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    gap: 15px;
  }

  .category {
    height: 250px;
    font-size: 1.1rem;
    
  }

  .category-media {
    height: 180px;
  }

  .content {
    width: calc(100% - 32px);
    padding: 22px 0 34px;
  }

  .back-btn {
    width: 54px;
    height: 54px;
  }
}