/* ============================================================
   CoffeeOrder Pro — Design System
   Referência Visual: AVAD Coffee
   Mobile First | Dark Mode | Premium
   ============================================================ */

/* ── Google Fonts import hint ──────────────────────────────── */
/* Inter + Playfair Display carregados no <head> de cada página */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand — cores extraídas do layout AVAD */
  --coffee-950: #0d0500;
  --coffee-900: #1a0900;
  --coffee-800: #2c1200;
  --coffee-700: #4a1e00;
  --coffee-600: #6b3010;
  --coffee-500: #8b4513;
  --coffee-400: #a0522d;
  --coffee-300: #c0723a;
  --coffee-200: #d4956a;
  --coffee-100: #ecdbc8;
  --coffee-50:  #faf5ee;

  --gold:       #c9a84c;
  --gold-light: #dfc06a;
  --gold-dark:  #a07830;

  --whatsapp:   #25D366;
  --whatsapp-d: #128C7E;

  /* Surfaces */
  --bg-body:      #f8f4ef;
  --bg-primary:   #ffffff;
  --bg-secondary: #faf5ee;
  --bg-card:      #ffffff;
  --bg-dark:      #1a0900;
  --bg-overlay:   rgba(10,4,0,.55);

  /* Text */
  --text-primary:   #1a0900;
  --text-secondary: #4a3828;
  --text-muted:     #8a7060;
  --text-on-dark:   #f0e0c8;

  /* UI */
  --border:         #e0d0bc;
  --border-light:   #ece4d8;
  --border-focus:   var(--coffee-400);
  --shadow-xs:      0 1px 4px rgba(26,9,0,.06);
  --shadow-sm:      0 2px 10px rgba(26,9,0,.08);
  --shadow-md:      0 4px 24px rgba(26,9,0,.13);
  --shadow-lg:      0 8px 48px rgba(26,9,0,.18);
  --shadow-card:    0 2px 12px rgba(26,9,0,.09);

  /* Feedback */
  --success:  #2e7d32;
  --warning:  #d97706;
  --error:    #b91c1c;
  --info:     #1d4ed8;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Typography */
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Spacing scale */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  /* Transitions */
  --tr: 200ms ease;
  --tr-slow: 380ms ease;
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-body:       #0d0500;
  --bg-primary:    #110700;
  --bg-secondary:  #1a0d06;
  --bg-card:       #1e1208;
  --text-primary:  #f0e0c8;
  --text-secondary:#c8b090;
  --text-muted:    #8a7060;
  --border:        #2a1a0c;
  --border-light:  #221408;
  --shadow-card:   0 2px 12px rgba(0,0,0,.5);
  --shadow-md:     0 4px 24px rgba(0,0,0,.6);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--coffee-500); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--coffee-300); }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ───────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-serif); line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.4rem); font-weight: 600; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: var(--s-2);
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--s-4);
}

@media (min-width: 768px) { .container { padding-inline: var(--s-6); } }

.section    { padding-block: var(--s-12); }
.section-lg { padding-block: var(--s-16); }

/* ── HEADER ────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--coffee-900);
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 64px;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  flex-shrink: 0;
}

.header__logo-mark {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--coffee-900);
  font-family: var(--font-serif);
  letter-spacing: -.03em;
  flex-shrink: 0;
}

.header__logo-text { display: flex; flex-direction: column; line-height: 1; }
.header__logo-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.header__logo-sub {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1px;
}

/* Nav desktop */
.header__nav {
  display: none;
  gap: var(--s-1);
  align-items: center;
}

@media (min-width: 900px) { .header__nav { display: flex; } }

.header__nav a {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  transition: all var(--tr);
}

.header__nav a:hover,
.header__nav a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* Actions */
.header__actions { display: flex; align-items: center; gap: var(--s-1); }

.header__icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  text-decoration: none;
}

.header__icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

.header__badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--gold);
  color: var(--coffee-900);
  font-size: .6rem;
  font-weight: 800;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Hamburger */
.header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  padding: 10px;
  cursor: pointer;
}

@media (min-width: 900px) { .header__hamburger { display: none; } }

.header__hamburger span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,.85);
  border-radius: 2px;
  transition: all var(--tr);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.mobile-menu.is-open { display: block; }

.mobile-menu__panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(300px, 88vw);
  background: var(--coffee-900);
  padding: var(--s-6);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.mobile-menu__close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--s-6);
}

.mobile-menu__panel a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.85);
  font-size: .9375rem;
  font-weight: 500;
  transition: color var(--tr);
}

.mobile-menu__panel a:hover { color: var(--gold); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 500px;
  background: var(--coffee-950);
  overflow: hidden;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) { .hero { min-height: 620px; } }

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}

.hero__slide.active { opacity: 1; }

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Gradiente igual ao da referência AVAD: mais escuro na esquerda */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13,5,0,.92) 0%,
    rgba(26,9,0,.78) 40%,
    rgba(26,9,0,.45) 65%,
    rgba(26,9,0,.15) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--s-16) 0;
  max-width: 560px;
}

.hero__tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-3);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--s-4);
}

.hero__title em { font-style: normal; color: var(--gold-light); }

.hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
  margin-bottom: var(--s-8);
  max-width: 420px;
}

.hero__cta { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.hero__dots {
  position: absolute;
  bottom: var(--s-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--s-2);
  z-index: 2;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.35);
  border: none;
  cursor: pointer;
  transition: all var(--tr);
}

.hero__dot.active {
  width: 26px;
  border-radius: 4px;
  background: var(--gold);
}

/* ── TRUST BAR ──────────────────────────────────────────────── */
.trust-bar {
  background: var(--coffee-800);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: var(--s-4) 0;
}

.trust-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-6);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
}

.trust-item__icon {
  width: 28px;
  height: 28px;
  background: rgba(201,168,76,.15);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: var(--gold);
  flex-shrink: 0;
}

.trust-item__label { font-size: .72rem; color: rgba(255,255,255,.55); display: block; }
.trust-item__text  { font-size: .8rem; color: rgba(255,255,255,.9); font-weight: 600; }

/* ── SECTION HEADER ─────────────────────────────────────────── */
.section-head {
  text-align: center;
  margin-bottom: var(--s-10);
}

.section-head h2 { margin-top: var(--s-2); }
.section-head p  { color: var(--text-muted); margin-top: var(--s-3); max-width: 520px; margin-inline: auto; }

/* ── CATEGORIES ─────────────────────────────────────────────── */
.categories-section { background: var(--bg-primary); }

.categories-scroll {
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--s-2);
  justify-content: flex-start;
}

@media (min-width: 768px) {
  .categories-scroll { justify-content: center; flex-wrap: wrap; overflow-x: visible; }
}

.categories-scroll::-webkit-scrollbar { display: none; }

.cat-card {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
  text-decoration: none;
  transition: transform var(--tr);
}

@media (min-width: 768px) { .cat-card { width: 130px; } }

.cat-card:hover { transform: translateY(-5px); }

.cat-card__img {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: var(--s-2);
  border: 2px solid transparent;
  transition: border-color var(--tr);
  position: relative;
}

.cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-card__icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--coffee-100), var(--bg-secondary));
}

[data-theme="dark"] .cat-card__icon {
  background: linear-gradient(135deg, var(--coffee-800), var(--coffee-700));
}

.cat-card:hover .cat-card__img { border-color: var(--gold); }

.cat-card__name {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ── PRODUCT CARD ───────────────────────────────────────────── */
.product-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: transform var(--tr-slow), box-shadow var(--tr-slow);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-card__img {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-secondary);
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.product-card:hover .product-card__img img { transform: scale(1.06); }

.product-card__badges {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-pill--sold  { background: var(--coffee-700); color: #fff; }
.badge-pill--gold  { background: var(--gold); color: var(--coffee-900); }
.badge-pill--sale  { background: var(--error); color: #fff; }
.badge-pill--new   { background: var(--info); color: #fff; }
.badge-pill--limit { background: var(--coffee-500); color: #fff; }

.product-card__fav {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--tr);
  color: var(--text-muted);
  box-shadow: var(--shadow-xs);
}

.product-card__fav:hover,
.product-card__fav.is-fav { color: #e53935; transform: scale(1.1); }

.product-card__body {
  padding: var(--s-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.product-card__cat {
  font-size: .68rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.product-card__name {
  font-family: var(--font-serif);
  font-size: .975rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-top: 2px;
}

.product-card__name a { color: inherit; }
.product-card__name a:hover { color: var(--coffee-500); }

.product-card__notes {
  font-size: .78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-top: 2px;
}

.product-card__sca {
  font-size: .75rem;
  font-weight: 700;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card__footer {
  padding: 0 var(--s-4) var(--s-4);
}

.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}

.product-card__price-from { font-size: .7rem; color: var(--text-muted); }

.product-card__price-old {
  font-size: .78rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--coffee-600);
  font-family: var(--font-serif);
}

.product-card__btn {
  width: 100%;
  padding: 10px;
  background: var(--coffee-700);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  text-decoration: none;
}

.product-card__btn:hover {
  background: var(--coffee-600);
  color: #fff;
  transform: translateY(-1px);
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 28px;
  font-size: .9375rem;
  font-weight: 700;
  border-radius: var(--r-full);
  border: 2px solid transparent;
  transition: all var(--tr);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn--primary {
  background: var(--coffee-600);
  color: #fff;
  border-color: var(--coffee-600);
}

.btn--primary:hover {
  background: var(--coffee-500);
  border-color: var(--coffee-500);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,69,19,.35);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--coffee-900);
  border-color: transparent;
  font-weight: 800;
}

.btn--gold:hover {
  filter: brightness(1.08);
  color: var(--coffee-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,.4);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

.btn--outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
  color: #fff;
}

.btn--outline-dark {
  background: transparent;
  color: var(--coffee-600);
  border-color: var(--coffee-400);
}

.btn--outline-dark:hover {
  background: var(--coffee-600);
  color: #fff;
  border-color: var(--coffee-600);
}

.btn--whatsapp {
  background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-d));
  color: #fff;
  border-color: transparent;
  font-size: 1rem;
  padding: 14px 28px;
}

.btn--whatsapp:hover {
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--bg-secondary);
  border-color: var(--coffee-300);
}

.btn--sm  { padding: 8px 18px; font-size: .82rem; }
.btn--lg  { padding: 15px 36px; font-size: 1rem; }
.btn--full { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── FILTERS / CHIPS ────────────────────────────────────────── */
.filter-chip {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--tr);
  white-space: nowrap;
}

.filter-chip:hover  { border-color: var(--coffee-300); color: var(--coffee-500); }
.filter-chip.active { background: var(--coffee-700); border-color: var(--coffee-700); color: #fff; }

/* ── QTY SELECTOR ───────────────────────────────────────────── */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-primary);
}

.qty__btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--coffee-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--tr);
}

.qty__btn:hover { background: var(--bg-secondary); }

.qty__val {
  min-width: 44px;
  text-align: center;
  font-weight: 800;
  font-size: .9375rem;
  color: var(--text-primary);
}

/* ── FORM ───────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--s-4); }

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: .9375rem;
  color: var(--text-primary);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--coffee-400);
  box-shadow: 0 0 0 3px rgba(160,82,45,.12);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 5L10 1' stroke='%238a7060' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 100px; }
.form-control.is-invalid { border-color: var(--error); }
.form-error { font-size: .76rem; color: var(--error); margin-top: 4px; }

/* ── CART SIDEBAR ───────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-slow);
  backdrop-filter: blur(3px);
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--bg-primary);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}

.cart-sidebar.is-open { transform: translateX(0); }

.cart-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border);
  background: var(--coffee-900);
  color: #fff;
}

.cart-sidebar__header h3 { font-family: var(--font-serif); font-size: 1rem; color: #fff; }

.cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.cart-item {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3);
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}

.cart-item__img {
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.cart-item__name   { font-size: .875rem; font-weight: 700; line-height: 1.3; }
.cart-item__detail { font-size: .75rem; color: var(--text-muted); margin: 3px 0 var(--s-2); }
.cart-item__price  { font-weight: 800; color: var(--coffee-600); font-size: .875rem; }

.cart-sidebar__footer {
  border-top: 1px solid var(--border);
  padding: var(--s-5) var(--s-6);
}

.cart-totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.cart-totals > div { display: flex; justify-content: space-between; font-size: .875rem; color: var(--text-secondary); }
.cart-totals__total { font-size: 1.05rem !important; font-weight: 800 !important; color: var(--text-primary) !important; border-top: 1px solid var(--border); padding-top: var(--s-3) !important; margin-top: var(--s-2); }

.cart-empty { text-align: center; padding: var(--s-16) var(--s-6); color: var(--text-muted); }
.cart-empty__icon { font-size: 3rem; margin-bottom: var(--s-4); }

/* ── PRODUCT PAGE ───────────────────────────────────────────── */
.product-page__grid {
  display: grid;
  gap: var(--s-10);
}

@media (min-width: 900px) { .product-page__grid { grid-template-columns: 1fr 1fr; } }

.gallery { display: flex; flex-direction: column; gap: var(--s-3); }

.gallery__main {
  aspect-ratio: 1/1;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

.gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.gallery__thumbs { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }

.gallery__thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--tr);
  flex-shrink: 0;
}

.gallery__thumb.active { border-color: var(--coffee-500); }

/* Product info */
.product-info { display: flex; flex-direction: column; gap: var(--s-4); }

.product-info__rating { display: flex; align-items: center; gap: var(--s-2); }
.stars { color: var(--gold); letter-spacing: 1px; font-size: .95rem; }
.stars-count { font-size: .8rem; color: var(--text-muted); }

.product-info__price { font-size: 1.9rem; font-weight: 800; color: var(--coffee-600); font-family: var(--font-serif); }

.option-group { display: flex; flex-direction: column; gap: var(--s-2); }
.option-group__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }
.option-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.opt-chip {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--tr);
  color: var(--text-secondary);
}

.opt-chip:hover { border-color: var(--coffee-300); }
.opt-chip.selected { background: var(--coffee-700); border-color: var(--coffee-700); color: #fff; }

.product-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  background: var(--bg-secondary);
  border-radius: var(--r-md);
  padding: var(--s-4);
  border: 1px solid var(--border-light);
}

.product-attr { display: flex; flex-direction: column; gap: 2px; }
.product-attr__key   { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.product-attr__val   { font-size: .875rem; font-weight: 600; color: var(--text-primary); }

/* ── CHECKOUT ───────────────────────────────────────────────── */
.checkout-layout { display: grid; gap: var(--s-8); }
@media (min-width: 960px) { .checkout-layout { grid-template-columns: 1fr 380px; } }

.checkout-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  padding: var(--s-6);
  margin-bottom: var(--s-5);
}

.checkout-card h3 {
  font-size: .9375rem;
  font-weight: 700;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* ── PLAN CARDS ─────────────────────────────────────────────── */
.plan-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  border: 2px solid var(--border-light);
  text-align: center;
  transition: all var(--tr-slow);
  position: relative;
  overflow: hidden;
}

.plan-card:hover,
.plan-card.featured {
  border-color: var(--coffee-500);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.plan-card.featured::before {
  content: 'Mais Popular';
  position: absolute;
  top: 20px;
  right: -26px;
  background: var(--gold);
  color: var(--coffee-900);
  font-size: .65rem;
  font-weight: 800;
  padding: 4px 36px;
  transform: rotate(35deg);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.plan-card__icon   { font-size: 2.2rem; margin-bottom: var(--s-4); }
.plan-card__name   { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: var(--s-2); }
.plan-card__price  { font-size: 2.4rem; font-weight: 800; color: var(--coffee-500); }
.plan-card__price span { font-size: .9rem; font-weight: 400; color: var(--text-muted); }

.plan-card__features {
  list-style: none;
  margin: var(--s-6) 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-card__features li {
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  color: var(--text-secondary);
}

.plan-card__features li::before { content: '✓'; color: var(--coffee-500); font-weight: 800; flex-shrink: 0; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--coffee-950);
  color: var(--text-on-dark);
  padding-block: var(--s-16);
  margin-top: var(--s-16);
}

.footer__grid {
  display: grid;
  gap: var(--s-10);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.footer__brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.footer__brand p { font-size: .875rem; color: rgba(240,224,200,.65); line-height: 1.75; }

.footer__heading {
  font-size: .7rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: var(--s-4);
}

.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__links a { font-size: .875rem; color: rgba(240,224,200,.65); transition: color var(--tr); }
.footer__links a:hover { color: var(--gold); }

.footer__bottom {
  margin-top: var(--s-10);
  padding-top: var(--s-6);
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
  font-size: .78rem;
  color: rgba(240,224,200,.4);
}

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  border: 1px solid transparent;
}

.alert--success { background: #f0fdf4; color: #15803d; border-color: #86efac; }
.alert--error   { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
.alert--warning { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.alert--info    { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }

[data-theme="dark"] .alert--success { background: rgba(21,128,61,.15); border-color: rgba(21,128,61,.4); }
[data-theme="dark"] .alert--error   { background: rgba(185,28,28,.15); border-color: rgba(185,28,28,.4); }

/* ── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: var(--s-6);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--coffee-500); }
.breadcrumb span { color: var(--text-primary); font-weight: 700; }
.breadcrumb__sep { color: var(--border); }

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  margin-top: var(--s-10);
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
  background: var(--coffee-700);
  border-color: var(--coffee-700);
  color: #fff;
}

/* ── TOAST ──────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--s-6);
  right: var(--s-4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px var(--s-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: .875rem;
  font-weight: 600;
  pointer-events: auto;
  animation: toastIn .28s ease forwards;
  max-width: 320px;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--error   { border-left: 3px solid var(--error); }
.toast--info    { border-left: 3px solid var(--coffee-500); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PWA BANNER ─────────────────────────────────────────────── */
.pwa-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--coffee-800);
  color: #fff;
  padding: var(--s-4) var(--s-6);
  display: flex;
  align-items: center;
  gap: var(--s-4);
  z-index: 1100;
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
  transform: translateY(100%);
  transition: transform .4s ease;
  flex-wrap: wrap;
}

.pwa-banner.show { transform: translateY(0); }
.pwa-banner p { flex: 1; font-size: .875rem; }

/* ── SPINNER / SKELETON ─────────────────────────────────────── */
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--coffee-500);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg-secondary) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ── LOYALTY PROGRESS ───────────────────────────────────────── */
.loyalty-bar {
  background: var(--border);
  border-radius: var(--r-full);
  height: 10px;
  overflow: hidden;
}

.loyalty-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coffee-400), var(--coffee-600));
  border-radius: var(--r-full);
  transition: width .7s ease;
}

/* ── STATUS BADGES ──────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-novo       { background: #eff6ff; color: #1d4ed8; }
.status-pago       { background: #f0fdf4; color: #15803d; }
.status-separacao  { background: #fefce8; color: #b45309; }
.status-torra      { background: #fff7ed; color: #c2410c; }
.status-embalagem  { background: #fdf4ff; color: #7e22ce; }
.status-enviado    { background: #f0f9ff; color: #0369a1; }
.status-entregue   { background: #f0fdf4; color: #14532d; }
.status-cancelado  { background: #fef2f2; color: #b91c1c; }

/* ── UTILS ──────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.font-bold   { font-weight: 700; }
.font-serif  { font-family: var(--font-serif); }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.items-center{ align-items: center; }
.gap-sm { gap: var(--s-2); }
.gap-md { gap: var(--s-4); }
.gap-lg { gap: var(--s-6); }
.grid   { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.w-full { width: 100%; }
.mt-sm  { margin-top: var(--s-2); }
.mt-md  { margin-top: var(--s-4); }
.mt-lg  { margin-top: var(--s-6); }
.mb-sm  { margin-bottom: var(--s-2); }
.mb-md  { margin-bottom: var(--s-4); }
.mb-lg  { margin-bottom: var(--s-6); }
.rounded    { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.shadow     { box-shadow: var(--shadow-card); }

@media (max-width: 767px) {
  .hide-mobile  { display: none !important; }
  .container    { padding-inline: var(--s-3); }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
}
