/* ==========================================================================
   LollyLuxe — Artisan Lollipops & Candies
   Main stylesheet (layout, components, responsive)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --brand: #d6336c;
  --brand-dark: #a61e4d;
  --brand-light: #ffe3ee;
  --purple: #7048e8;
  --purple-light: #f0ebff;
  --teal: #0ca678;
  --ink: #2f2440;
  --muted: #6f647d;
  --line: #ece3ec;
  --cream: #fff6f2;
  --bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(47, 36, 64, .08);
  --shadow-md: 0 8px 24px rgba(47, 36, 64, .10);
  --shadow-lg: 0 20px 50px rgba(47, 36, 64, .16);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1140px;
}

/* ---------- 2. Reset & base typography ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; height: auto; }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 3. Layout utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding: 88px 0; }
.section--alt { background: var(--cream); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}
.lead { font-size: 1.12rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.hidden { display: none !important; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 26px; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(214, 51, 108, .35); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #221a30; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 10px 18px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, .95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.site-header.scrolled .header-inner { height: 64px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-dot { color: var(--brand); }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  color: var(--ink); font-weight: 500; font-size: .96rem;
  text-decoration: none; padding: 6px 0;
}
.main-nav a:hover { color: var(--brand); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-button {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 10px; display: inline-flex;
}
.cart-button:hover { background: var(--brand-light); }
.cart-badge {
  position: absolute; top: 0; right: 0; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 6px; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff2f7 0%, #f5f0ff 45%, #e9fbf6 100%);
}
.hero::before {
  content: ""; position: absolute; top: -120px; right: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 51, 108, .10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; bottom: -140px; left: -100px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 166, 120, .10), transparent 70%);
}
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center; padding: 96px 24px 104px;
}
.hero-copy h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 18px; }
.hero-copy p { font-size: 1.12rem; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: .92rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: "\2713"; color: var(--teal); font-weight: 700; }
.hero-media img {
  width: 100%; border-radius: 24px; box-shadow: var(--shadow-lg);
  transform: rotate(-2deg); border: 8px solid #fff;
}

/* ---------- 7. Article ---------- */
.article-section { background: var(--bg); }
.article-body {
  max-width: 760px; margin: 0 auto;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 1.08rem; color: #3a3050;
}
.article-body h3 {
  font-family: 'Poppins', sans-serif; color: var(--ink);
  font-size: 1.5rem; margin: 2.4em 0 .7em;
}
.article-body p { margin-bottom: 1.1em; }
.article-body figure { margin: 2em 0; }
.article-body img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.article-body figcaption {
  text-align: center; font-size: .88rem; color: var(--muted);
  margin-top: 10px; font-family: 'Poppins', sans-serif;
}
.flavor-notes { list-style: none; padding: 0; }
.flavor-notes li {
  padding: 10px 0 10px 28px; position: relative;
  border-bottom: 1px dashed var(--line);
}
.flavor-notes li::before {
  content: ""; position: absolute; left: 4px; top: 20px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
}

/* ---------- 8. FAQ ---------- */
.faq { max-width: 820px; margin: 72px auto 0; }
.faq h2 { font-size: 1.6rem; margin-bottom: 22px; }
details.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
details.faq-item[open] { border-color: var(--brand); }
summary {
  cursor: pointer; font-weight: 600; font-family: 'Poppins', sans-serif;
  padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "\002B"; font-size: 1.4rem; color: var(--brand); }
details[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 0 16px; margin: 0; color: var(--muted); }

/* ---------- 9. Flavors ---------- */
.flavors-section { background: var(--cream); }
.flavor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.flavor-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.flavor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.flavor-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--brand-light); }
.flavor-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.flavor-card:hover .flavor-media img { transform: scale(1.06); }
.flavor-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.flavor-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.flavor-body p { color: var(--muted); font-size: .95rem; margin-bottom: 18px; flex: 1; }
.flavor-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.section-foot { text-align: center; margin-top: 44px; }

/* ---------- 10. About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.about-media img { width: 100%; border-radius: 24px; box-shadow: var(--shadow-lg); }
.about-list { display: grid; gap: 12px; margin: 20px 0 8px; }
.about-list li { display: flex; gap: 10px; align-items: flex-start; }
.about-list li::before { content: "\2713"; color: var(--teal); font-weight: 700; flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-num { display: block; font-size: 1.7rem; font-weight: 700; color: var(--brand); }
.stat-label { font-size: .82rem; color: var(--muted); }

/* ---------- 11. Newsletter & ad notice ---------- */
.newsletter-section { padding-top: 0; }
.newsletter-card {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 24px; padding: 48px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center;
  color: #fff; box-shadow: var(--shadow-lg);
}
.newsletter-card h2 { color: #fff; margin-bottom: 8px; }
.newsletter-card p { margin: 0; opacity: .92; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 220px; padding: 14px 18px;
  border-radius: 12px; border: none; font-family: inherit; font-size: 1rem;
}
.newsletter-form .btn { flex: none; }
.form-message { width: 100%; margin: 10px 0 0; font-size: .92rem; min-height: 1.3em; }
.form-message.error { color: #ffd8e4; }
.form-message.success { color: #d7ffee; }
.ad-notice {
  margin-top: 18px; background: #f3f0f8; border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 14px 20px;
  color: var(--muted); font-size: .9rem;
}
.ad-notice strong { color: var(--ink); }

/* ---------- 12. Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: start; }
.contact-info ul { display: grid; gap: 16px; margin-top: 20px; }
.contact-info li { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-light); display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.contact-info .lbl { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  font-family: inherit; font-size: .96rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--ink); color: #cfc7da; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { color: #a99fb5; max-width: 340px; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.socials a {
  width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .08);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.socials a:hover { background: var(--brand); text-decoration: none; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-col a { color: #cfc7da; display: inline-block; padding: 5px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-note {
  margin-top: 32px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem; color: #8f85a0; max-width: 760px;
}
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .88rem; color: #8f85a0;
}

/* ---------- 14. Cookie banner ---------- */
.cookie-banner {
  position: fixed; inset: auto 0 0 0; z-index: 150;
  background: var(--ink); color: #fff;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
  animation: slide-up .35s ease;
}
.cookie-inner { display: flex; align-items: center; gap: 28px; padding-top: 18px; padding-bottom: 18px; }
.cookie-text { flex: 1; }
.cookie-text h2 { font-size: 1.05rem; margin-bottom: 6px; }
.cookie-text p { margin: 0; font-size: .92rem; color: #d9d1e4; }
.cookie-text a { color: #ffc2d6; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-banner .btn-primary { background: var(--brand); }
.cookie-banner .btn-secondary { background: rgba(255, 255, 255, .14); }

/* ---------- 15. Cart modal ---------- */
.cart-modal { position: fixed; inset: 0; z-index: 160; display: none; }
.cart-modal.open { display: block; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(30, 20, 45, .5); animation: fade-in .2s ease; }
.cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: #fff; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0, 0, 0, .18); animation: slide-left .25s ease;
}
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.cart-header h2 { font-size: 1.25rem; margin: 0; }
.cart-close {
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: 4px 8px; border-radius: 8px;
}
.cart-close:hover { background: var(--brand-light); color: var(--brand); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.cart-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row-info { display: flex; flex-direction: column; gap: 2px; }
.cart-row-name { font-weight: 600; }
.cart-row-price { font-size: .85rem; color: var(--muted); }
.cart-row-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.qty { min-width: 26px; text-align: center; font-weight: 600; }
.qty-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--ink);
}
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.qty-remove { border: none; color: var(--muted); width: 30px; height: 30px; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }

/* ---------- 16. Toast ---------- */
.toast-container { position: fixed; top: 96px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-size: .92rem;
  animation: slide-in .25s ease; max-width: 340px;
}
.toast-out { animation: fade-out .4s ease forwards; }

/* ---------- 17. Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 96px; z-index: 140;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--brand); color: #fff; font-size: 1.3rem; cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease, transform .2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); background: var(--brand-dark); }

/* ---------- 18. Animations ---------- */
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slide-left { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------- 19. Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { max-width: 520px; margin-inline: auto; }
  .flavor-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter-card { grid-template-columns: 1fr; padding: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav.open { max-height: 340px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
  .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .section { padding: 64px 0; }
  .form-row { grid-template-columns: 1fr; }
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-actions { justify-content: flex-end; }
  .footer-grid { grid-template-columns: 1fr; }
  .toast-container { left: 24px; right: 24px; }
  .toast { max-width: none; }
}

@media (max-width: 480px) {
  .flavor-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto !important; }
}
