/* Buttercup Bakery — modern storefront
   Edit colours in :root only. Everything else follows. */
:root {
  --burgundy: #7a1f2b;
  --burgundy-deep: #5c1520;
  --rose: #c45c6a;
  --cream: #fbf6f0;
  --cream-dark: #f3e8dc;
  --gold: #c9a227;
  --gold-soft: #e8d48b;
  --ink: #2a1f1c;
  --muted: #6b5c56;
  --white: #ffffff;
  --card: #ffffff;
  --line: rgba(122, 31, 43, 0.12);
  --shadow: 0 20px 50px rgba(42, 31, 28, 0.1);
  --shadow-sm: 0 8px 24px rgba(42, 31, 28, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --max: 1180px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul { list-style: none; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* —— Gradients & utilities —— */
.bg-hero {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(201, 162, 39, 0.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(196, 92, 106, 0.15), transparent 45%),
    linear-gradient(165deg, #fff9f3 0%, var(--cream) 45%, #f8ebe3 100%);
}
.grad-text {
  background: linear-gradient(120deg, var(--burgundy-deep), var(--rose) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--burgundy), var(--rose));
  color: var(--white);
  box-shadow: 0 10px 28px rgba(122, 31, 43, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 32px rgba(122, 31, 43, 0.45); }
.btn-ghost {
  background: var(--white);
  color: var(--burgundy);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--burgundy); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: var(--ink);
  font-weight: 700;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(122, 31, 43, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo img {
  height: 44px;
  width: auto;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  padding: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  color: rgba(255,255,255,0.88);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.12);
  color: #fff;
  position: relative;
  transition: background 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.22); }
.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.25rem;
}

/* —— Hero —— */
.hero {
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(122, 31, 43, 0.08);
  color: var(--burgundy);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.1rem;
  animation: fadeUp 0.7s ease both;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  animation: fadeUp 0.7s 0.08s ease both;
}
.hero h1 .accent { color: var(--burgundy); }
.hero-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 38ch;
  margin-bottom: 1.6rem;
  animation: fadeUp 0.7s 0.16s ease both;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.7s 0.24s ease both;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
  animation: fadeUp 0.7s 0.32s ease both;
}
.trust span { display: flex; align-items: center; gap: 0.4rem; }
.trust strong { color: var(--ink); }

.hero-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  animation: fadeUp 0.8s 0.2s ease both;
}
.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #e8c84a);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  background: linear-gradient(180deg, var(--burgundy-deep), #4a1018);
  color: #fff;
}
.hero-card-body .label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}
.hero-card-body h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.hero-meta span {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}
.hero-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.price { font-size: 1.35rem; font-weight: 700; }
.price s {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.55;
  margin-left: 0.35rem;
}

/* —— Sections —— */
section { padding: 4rem 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); max-width: 40ch; }
.link-all {
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.95rem;
}
.link-all:hover { text-decoration: underline; }

/* Categories */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.1rem;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(122, 31, 43, 0.25);
}
.cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(145deg, rgba(122, 31, 43, 0.1), rgba(201, 162, 39, 0.15));
}
.cat-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.cat-card p { font-size: 0.82rem; color: var(--muted); }

/* Products */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.chip {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}
.chip:hover, .chip.active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: #fff;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.6s ease both;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.product-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--cream-dark);
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s;
}
.product-card:hover .product-img img { transform: scale(1.06); }
.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.product-badge.gold { background: linear-gradient(135deg, var(--gold), #e0c04a); color: var(--ink); }
.stock-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: #1a7a4c;
  font-size: 0.7rem;
  font-weight: 600;
}
.product-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}
.product-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rose);
  font-weight: 600;
}
.product-body h3 {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 650;
}
.product-short { font-size: 0.82rem; color: var(--muted); }
.product-rating {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.product-rating .stars { color: var(--gold); letter-spacing: -1px; }
.product-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.product-footer .price { font-size: 1.15rem; color: var(--burgundy-deep); }
.product-footer .price s {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.btn-add {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
.btn-add:hover { background: var(--burgundy-deep); }

/* Features strip */
.features {
  background: linear-gradient(120deg, var(--burgundy-deep), var(--burgundy) 40%, #9a3040);
  color: #fff;
  padding: 3rem 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.feature {
  text-align: center;
  padding: 0.5rem;
}
.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}
.feature h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.feature p { font-size: 0.85rem; opacity: 0.85; }

/* Academy */
.academy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.class-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s;
}
.class-card:hover { transform: translateY(-4px); }
.class-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.class-body { padding: 1.15rem 1.2rem 1.3rem; }
.class-level {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--burgundy);
  margin-bottom: 0.4rem;
}
.class-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.class-body p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.85rem; }
.class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.class-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* About + Contact */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-box {
  background: linear-gradient(160deg, #fff, var(--cream-dark));
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--line);
}
.about-box h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin-bottom: 0.85rem;
}
.about-box p { color: var(--muted); margin-bottom: 1rem; }
.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.contact-form h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.form-row { margin-bottom: 0.9rem; }
.form-row label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--muted);
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.12);
}
.form-row textarea { min-height: 110px; resize: vertical; }

/* Cart drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 31, 28, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: var(--white);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -12px 0 40px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-head h2 { font-size: 1.15rem; }
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}
.cart-item h4 { font-size: 0.9rem; line-height: 1.3; }
.cart-item .meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--cream-dark);
  font-weight: 700;
}
.cart-foot {
  padding: 1.15rem 1.25rem;
  border-top: 1px solid var(--line);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.cart-foot .btn { width: 100%; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Footer */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.footer a:hover { color: var(--gold-soft); }
.footer p, .footer li { font-size: 0.88rem; margin-bottom: 0.4rem; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.footer-brand img {
  height: 36px;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; margin-inline: auto; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .academy-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--burgundy-deep);
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-links a { width: 100%; padding: 0.75rem 1rem; }
  .menu-toggle { display: grid; place-items: center; }
  .cats { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr; }
}
