@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap");

:root {
  --bg: #eef4f2;
  --surface: #ffffff;
  --sidebar: #0f2e2a;
  --sidebar-text: #b8d4ce;
  --ink: #0f2e2a;
  --muted: #5a726c;
  --accent: #3d9a8b;
  --accent-light: #6ec4b5;
  --gold: #c9a227;
  --line: #d4e4df;
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* App shell with sidebar */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 300;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  color: #fff;
}
.sidebar__logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.sidebar__brand strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.sidebar__brand small { font-size: 0.7rem; opacity: 0.75; font-weight: 500; }

.sidebar__delivery {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.sidebar__link {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar__link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar__link.is-active { background: var(--accent); color: #fff; }

.sidebar__legal {
  font-size: 0.68rem;
  opacity: 0.55;
  line-height: 1.5;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.main-area { display: flex; flex-direction: column; min-width: 0; }

/* Mobile header */
.mobile-bar {
  display: none;
  background: var(--sidebar);
  color: #fff;
  padding: 0.85rem 1rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 400;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 298;
}
.sidebar-overlay.is-visible { display: block; }

.mobile-bar__toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.content { flex: 1; padding: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--gold { background: var(--gold); color: #fff; }
.btn--outline {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: #fff; filter: none; }
.btn--full { width: 100%; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.82rem; }

.cart-badge {
  background: var(--gold);
  color: #fff;
  font-size: 0.68rem;
  min-width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Home — bento hero */
.bento-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  padding: 1.5rem;
}
.bento-hero__main {
  grid-row: 1 / 3;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
}
.bento-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.bento-hero__main h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.bento-hero__main p { color: var(--muted); margin-bottom: 1.25rem; max-width: 400px; }
.bento-hero__delivery {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  background: #faf6e8;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.bento-hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.bento-hero__price {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 700;
}

.bento-hero__img-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 200px;
}
.bento-hero__img-card img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }

.bento-hero__stat-card {
  background: var(--sidebar);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bento-hero__stat-card strong {
  font-family: var(--display);
  font-size: 2.5rem;
  color: var(--accent-light);
}
.bento-hero__stat-card span { font-size: 0.85rem; opacity: 0.8; }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  border-top: 4px solid var(--accent);
}
.pillar__icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.pillar h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.pillar p { font-size: 0.85rem; color: var(--muted); }

/* Product masonry on home */
.section-block { padding: 0 1.5rem 2rem; }
.section-block__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-block__head h2 { font-family: var(--display); font-size: 1.5rem; }
.section-block__head p { color: var(--muted); font-size: 0.9rem; }

.product-masonry {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.product-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-tile--wide { grid-column: span 2; }
.product-tile__img {
  height: 160px;
  background: #f4faf8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.product-tile--wide .product-tile__img { height: 200px; }
.product-tile__img img { max-height: 100%; width: auto; object-fit: contain; }
.product-tile__body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-tile__tag { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-bottom: 0.3rem; }
.product-tile h3 { font-size: 0.9rem; margin-bottom: 0.35rem; line-height: 1.3; }
.product-tile p { font-size: 0.8rem; color: var(--muted); flex: 1; margin-bottom: 0.75rem; }
.product-tile__foot { display: flex; justify-content: space-between; align-items: center; }
.product-tile__price { font-weight: 800; color: var(--accent); }

/* Program strip */
.program-strip {
  margin: 0 1.5rem 2rem;
  background: linear-gradient(120deg, var(--sidebar) 60%, #1a4a42);
  color: #fff;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 2rem;
  overflow: hidden;
}
.program-strip__img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
}
.program-strip h3 { font-family: var(--display); font-size: 1.35rem; margin-bottom: 0.35rem; }
.program-strip p { opacity: 0.85; font-size: 0.9rem; }
.program-strip__delivery { color: var(--gold); font-weight: 700; font-size: 0.85rem; margin-bottom: 0.5rem; }

/* Page inner */
.page-inner { padding: 2rem 1.5rem 3rem; max-width: 1100px; }
.page-head { margin-bottom: 2rem; }
.page-head h1 { font-family: var(--display); font-size: 2.25rem; margin-bottom: 0.35rem; }
.page-head p { color: var(--muted); }
.delivery-chip {
  display: inline-block;
  margin-top: 0.75rem;
  background: #e8f5f2;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

/* Catalog grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.catalog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.catalog-card__img {
  height: 180px;
  background: #f4faf8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.catalog-card__img img { max-height: 150px; object-fit: contain; }
.catalog-card__body { padding: 1.15rem; }
.catalog-card__tag { font-size: 0.72rem; font-weight: 700; color: var(--gold); margin-bottom: 0.3rem; }
.catalog-card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.catalog-card p { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.85rem; }
.catalog-card__foot { display: flex; justify-content: space-between; align-items: center; }
.catalog-card__price { font-weight: 800; color: var(--accent); font-size: 1.1rem; }

.program-banner {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1.5rem;
  align-items: center;
}
.program-banner__thumb { width: 100px; height: 100px; object-fit: contain; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
.about-prose h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--accent);
}
.about-prose p { color: var(--muted); margin-bottom: 0.75rem; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 1rem;
}
.about-card dt { font-size: 0.72rem; text-transform: uppercase; color: var(--muted); margin-top: 0.85rem; }
.about-card dd { font-weight: 600; font-size: 0.9rem; }
.about-card__delivery {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--sidebar);
  color: var(--gold);
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

/* Cart */
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.65rem;
}
.cart-line__thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f4faf8;
  border-radius: 8px;
  padding: 0.25rem;
}
.cart-line__info h3 { font-size: 0.92rem; }
.cart-line__info p { font-size: 0.78rem; color: var(--muted); }
.cart-line__qty { display: flex; align-items: center; gap: 0.35rem; }
.qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
}
.cart-line__sum { font-weight: 800; color: var(--accent); }
.cart-line__del { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; }

.checkout-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
}
.checkout-panel h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.8rem; margin-bottom: 0.25rem; }
.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
}
.form-group input:focus { outline: 2px solid var(--accent); }
.form-group input.error { outline-color: #c0392b; }
.form-error { color: #c0392b; font-size: 0.78rem; display: none; }
.form-error.visible { display: block; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.35rem; }
.summary-line--total { font-weight: 800; font-size: 1.15rem; color: var(--accent); border-top: 1px solid var(--line); padding-top: 0.6rem; margin-top: 0.6rem; }
.checkout-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin-top: 0.85rem; }
.checkout-note strong { color: var(--accent); }

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px dashed var(--line);
}

/* Thank you */
.thankyou-box {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
}
.thankyou-box__icon {
  width: 72px; height: 72px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}
.thankyou-box h1 { font-family: var(--display); margin-bottom: 0.5rem; }
#order-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  margin: 1.25rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .product-masonry { grid-template-columns: repeat(2, 1fr); }
  .product-tile--wide { grid-column: span 2; }
  .program-strip { grid-template-columns: 1fr; text-align: center; }
  .program-strip__img { margin: 0 auto; }
}

@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left 0.3s;
    height: 100%;
  }
  .sidebar.is-open { left: 0; }
  .sidebar-overlay.is-visible { display: block; }
  .mobile-bar { display: flex; }
  .bento-hero { grid-template-columns: 1fr; }
  .bento-hero__main { grid-row: auto; }
  .pillars { grid-template-columns: 1fr; }
  .product-masonry { grid-template-columns: 1fr; }
  .product-tile--wide { grid-column: span 1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; }
  .cart-grid { grid-template-columns: 1fr; }
  .checkout-panel { position: static; }
  .program-banner { grid-template-columns: 1fr; text-align: center; }
  .cart-line { grid-template-columns: 56px 1fr; }
  .cart-line__qty, .cart-line__sum { grid-column: 2; }
}
