/* ==========================================================
   Popular Treat — Shop Front Styles
   Elegant, warm, food-craft aesthetic.
   ========================================================== */

:root {
  --terracotta: #a8283f;
  --terracotta-dark: #7d1c2e;
  --terracotta-light: #d1566a;
  --cream: #fdf8f1;
  --cream-deep: #f3e4d6;
  --leaf: #146b6b;
  --leaf-dark: #0f4f4f;
  --ink: #241a22;
  --ink-soft: #6b5d4f;
  --line: #e6dcd4;
  --gold: #d98f2b;
  --gold-soft: #f0b955;
  --danger: #b3261e;
  --success: #1f7a5c;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(36,26,34,.06);
  --shadow-md: 0 10px 28px rgba(36,26,34,.10);
  --shadow-lg: 0 22px 50px rgba(36,26,34,.16);
  --whatsapp: #25d366;
  --whatsapp-dark: #1ea952;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Outfit', "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand-font {
  font-family: 'Fraunces', 'Georgia', serif;
}

a { text-decoration: none; transition: color .15s ease; }

img { max-width: 100%; }

::selection { background: var(--gold-soft); color: var(--ink); }

/* subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream-deep); }
::-webkit-scrollbar-thumb { background: var(--terracotta-light); border-radius: 10px; }

/* ---------- Topbar ---------- */
.shop-topbar {
  background: var(--ink);
  color: #f4e9da;
  font-size: .8rem;
  padding: .45rem 0;
  letter-spacing: .2px;
}
.shop-topbar a { color: #f4e9da; }
.shop-topbar a:hover { color: var(--gold-soft); }

/* ---------- Navbar ---------- */
.shop-navbar {
  background: rgba(251, 245, 236, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, padding .25s ease;
}
.shop-navbar.scrolled {
  box-shadow: 0 6px 24px rgba(36,26,34,.10);
  border-bottom-color: transparent;
}
.shop-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--terracotta-dark) !important;
  letter-spacing: .2px;
  font-family: 'Fraunces', serif;
}
.site-logo-nav {
  height: 60px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  background: transparent;
  display: block;
}
.shop-navbar .navbar-brand small {
  display: block;
  font-weight: 400;
  font-family: 'Outfit', sans-serif;
  font-size: .66rem;
  color: var(--leaf-dark);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-top: 2px;
}
.shop-navbar .nav-link {
  color: var(--ink) !important;
  font-weight: 600;
  font-size: .92rem;
  padding: .55rem 1rem !important;
  border-radius: 20px;
  position: relative;
}
.shop-navbar .nav-link:hover {
  color: var(--terracotta-dark) !important;
  background: var(--cream-deep);
}
.cart-pill {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  color: #fff;
  border-radius: 24px;
  padding: .55rem 1.3rem;
  font-weight: 700;
  font-size: .88rem;
  box-shadow: 0 6px 16px rgba(168,40,63,.35);
  transition: transform .18s ease, box-shadow .18s ease;
  display: inline-flex;
  align-items: center;
}
.cart-pill:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(168,40,63,.45);
}
.cart-badge {
  background: var(--gold);
  color: #241a06;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 800;
  padding: .1rem .42rem;
  margin-left: .4rem;
}

.cart-icon-mobile {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--terracotta-dark);
  font-size: 1.2rem;
}
.cart-icon-mobile:hover { background: var(--terracotta-light); color: #fff; }
.cart-badge-mobile {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--gold);
  color: #241a06;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 65%, #3d0f1a 100%);
  color: #fff;
  padding: 4.4rem 0 6.5rem;
  margin-bottom: 0;
  border-radius: 0 0 40px 40px;
  overflow: hidden;
  isolation: isolate;
}
.hero.has-hero-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero.has-hero-image::before, .hero.has-hero-image::after { display: none; }
.hero.has-hero-image .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125,28,46,.88) 0%, rgba(74,15,27,.85) 60%, rgba(36,26,34,.55) 100%);
  z-index: 0;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  z-index: -1;
}
.hero::before {
  width: 420px; height: 420px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), transparent 70%);
  top: -140px; right: -80px;
}
.hero::after {
  width: 300px; height: 300px;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), transparent 72%);
  opacity: .22;
  bottom: -120px; left: -60px;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  padding: .35rem .9rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: .6rem;
  line-height: 1.12;
  letter-spacing: -.5px;
}
.hero p.lead-text {
  opacity: .95;
  font-size: 1.08rem;
  max-width: 540px;
  margin-bottom: 1.8rem;
}
.hero .hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-hero-primary {
  background: #fff;
  color: var(--terracotta-dark);
  font-weight: 700;
  padding: .72rem 1.6rem;
  border-radius: 30px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform .18s ease, box-shadow .18s ease;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-hero-primary:hover { color: var(--terracotta-dark); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.22); }
.btn-hero-ghost {
  border: 1.5px solid rgba(255,255,255,.65);
  color: #fff;
  font-weight: 700;
  padding: .72rem 1.6rem;
  border-radius: 30px;
  transition: background .18s ease, transform .18s ease;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-hero-ghost:hover { color: #fff; background: rgba(255,255,255,.16); transform: translateY(-3px); }

/* Trust badge strip, overlapping the hero */
.trust-strip {
  position: relative;
  z-index: 2;
  margin-top: -3.6rem;
  margin-bottom: 3rem;
}
.trust-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.3rem 1rem;
  text-align: center;
  height: 100%;
  transition: transform .2s ease;
}
.trust-card:hover { transform: translateY(-4px); }
.trust-card .ic {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cream-deep);
  color: var(--terracotta-dark);
  font-size: 1.2rem;
  margin-bottom: .6rem;
}
.trust-card h6 { font-weight: 700; font-size: .92rem; margin-bottom: .15rem; }
.trust-card p { font-size: .8rem; color: var(--ink-soft); margin: 0; }

/* ---------- Section titles ---------- */
.section-heading { text-align: center; margin-bottom: 2.2rem; }
.section-heading .kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--leaf-dark);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: .4rem;
}
.section-heading .kicker::before, .section-heading .kicker::after {
  content: "";
  width: 22px; height: 2px;
  background: var(--gold);
  display: inline-block;
}
.section-title {
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .3rem;
  font-family: 'Fraunces', serif;
}
.section-sub { color: var(--ink-soft); font-size: .92rem; margin-bottom: 0; }
.section-heading.text-start { text-align: left; }
.section-heading.text-start .kicker::after { display: none; }

/* ---------- Category chips ---------- */
.cat-scroller {
  display: flex;
  gap: .7rem;
  overflow-x: auto;
  padding: .3rem .1rem 1rem;
  scrollbar-width: thin;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: .55rem 1.25rem;
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.cat-chip i { color: var(--terracotta); font-size: .95rem; }
.cat-chip.active, .cat-chip:hover {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-dark) 100%);
  border-color: var(--leaf-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(76,107,63,.28);
}
.cat-chip.active i, .cat-chip:hover i { color: #fff; }

/* ---------- Product card ---------- */
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: transparent;
}
.product-card .img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover img { transform: scale(1.07); }
.product-card .body { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; min-width: 0; overflow: hidden; }
.product-card .p-name {
  font-weight: 700;
  font-size: .96rem;
  color: var(--ink);
  margin-bottom: .3rem;
  display: block;
  min-height: 2.4em;
  line-height: 1.3;
}
.product-card .p-name:hover { color: var(--terracotta-dark); }
.product-card .price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; margin-bottom: .7rem; margin-top: auto; max-width: 100%; }
.product-card .price-now { font-weight: 800; color: var(--terracotta-dark); font-size: 1.08rem; white-space: nowrap; }
.product-card .price-old { color: #a89a87; text-decoration: line-through; font-size: .85rem; white-space: nowrap; }

.badge-sale {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #241a06;
  font-weight: 700;
  border-radius: 20px;
  padding: .35em .75em;
  font-size: .72rem;
  box-shadow: 0 4px 10px rgba(217,164,65,.4);
}
.badge-out {
  background: #cfc4b3;
  color: #55483a;
  font-weight: 700;
  border-radius: 20px;
  padding: .35em .75em;
  font-size: .72rem;
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: 24px;
  font-weight: 600;
  letter-spacing: .1px;
}
.btn-terracotta {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  border-color: var(--terracotta-dark);
  color: #fff;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn-terracotta:hover {
  background: linear-gradient(135deg, var(--terracotta-dark) 0%, #3d0f1a 100%);
  border-color: var(--terracotta-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(168,40,63,.32);
}
.btn-leaf {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-dark) 100%);
  border-color: var(--leaf-dark);
  color: #fff;
  font-weight: 700;
}
.btn-leaf:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); color: #fff; transform: translateY(-2px); }
.btn-outline-terracotta {
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
  font-weight: 700;
}
.btn-outline-terracotta:hover { background: var(--terracotta); color: #fff; }

/* ---------- Generic cards ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 700; border-radius: var(--radius) var(--radius) 0 0 !important; }

/* ---------- Cart / checkout ---------- */
.cart-line { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.cart-line:last-child { border-bottom: none; }
.cart-line-actions { flex-shrink: 0; }
@media (max-width: 480px) {
  .cart-line-actions { flex-basis: 100%; justify-content: flex-end; margin-left: 0 !important; padding-left: 76px; }
}
.qty-box { width: 70px; border-radius: 10px; }
.order-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.pay-option {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  cursor: pointer;
  transition: all .16s ease;
}
.pay-option:hover { border-color: var(--terracotta-light); }
.pay-option.selected { border-color: var(--terracotta); background: #fff6ef; box-shadow: 0 4px 14px rgba(168,40,63,.14); }

.checkout-line { border-bottom: 1px solid var(--line); padding-bottom: .7rem; flex-wrap: wrap; }
.checkout-line:last-child { border-bottom: none; padding-bottom: 0; }
.checkout-line > .small.flex-grow-1 { min-width: 0; }
.checkout-line-warning { background: #fff8e6; border-radius: 8px; padding: .5rem; margin: -.5rem -.5rem .5rem -.5rem; border-bottom: none !important; }
.qty-stepper {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.qty-step-btn {
  width: 26px; height: 26px;
  border: none;
  background: var(--cream-deep);
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-step-btn:hover { background: var(--terracotta-light); color: #fff; }
.qty-step-value {
  width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
}

/* ---------- Custom Cake CTA banner ---------- */
.custom-cake-cta {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  box-shadow: var(--shadow-md);
}
.custom-cake-cta h3 { font-family: 'Fraunces', serif; }
.custom-cake-cta p { opacity: .95; }
.custom-cake-cta .btn-hero-primary { color: var(--leaf-dark); }
.custom-cake-cta .btn-hero-primary:hover { color: var(--leaf-dark); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: transparent; padding: 0; margin: 0; }
.breadcrumb-item a { color: var(--ink-soft); font-weight: 600; }
.breadcrumb-item a:hover { color: var(--terracotta-dark); }
.breadcrumb-item.active { color: var(--terracotta-dark); font-weight: 600; }

/* ---------- Footer ---------- */
.shop-footer {
  position: relative;
  background: var(--ink);
  color: #d9cbb8;
  padding: 3.4rem 0 1.4rem;
  margin-top: 4rem;
  font-size: .9rem;
}
.shop-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--leaf));
}
.shop-footer h6 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: .95rem;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.shop-footer .brand-font { color: #fff; font-size: 1.4rem; margin-bottom: .5rem; }
.shop-footer p { color: #c9baa5; }
.shop-footer a { color: #d9cbb8; }
.shop-footer a:hover { color: var(--gold-soft); }
.shop-footer .footer-link { display: block; margin-bottom: .55rem; color: #c9baa5; font-weight: 500; }
.shop-footer .footer-link:hover { color: #fff; transform: translateX(2px); display: inline-block; }
.shop-footer .footer-contact-item { display: flex; gap: .6rem; margin-bottom: .7rem; align-items: flex-start; }
.shop-footer .footer-contact-item i { color: var(--gold-soft); margin-top: .15rem; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  margin-right: .5rem;
  transition: background .18s ease, transform .18s ease;
}
.footer-social:hover { background: var(--whatsapp); color: #fff; transform: translateY(-2px); }
.footer-whatsapp-box {
  background: rgba(37,211,102,.1);
  border: 1px solid rgba(37,211,102,.35);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-top: .6rem;
}
.footer-whatsapp-box a.wa-link {
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.footer-whatsapp-box a.wa-link:hover { color: var(--whatsapp); }
.shop-footer .bottom-bar {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1.1rem;
  font-size: .78rem;
  color: #a89a87;
  text-align: center;
}

/* ---------- Voucher / print ---------- */
.voucher {
  background: #fff; border: 1px solid var(--line); padding: 2rem; max-width: 780px; margin: 0 auto; border-radius: var(--radius);
}
.voucher .voucher-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 2px solid var(--terracotta-dark); padding-bottom: 1rem; margin-bottom: 1.2rem;
}
.voucher h2 { color: var(--terracotta-dark); font-weight: 800; margin: 0; }
.voucher .sign-line { border-top: 1px solid #333; margin-top: 3rem; padding-top: .3rem; font-size: .8rem; }
@media print { .no-print { display: none !important; } .voucher { border: none; } body { background: #fff; } }

/* ---------- Misc ---------- */
.form-label { font-weight: 600; font-size: .85rem; }
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: .55rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--terracotta-light);
  box-shadow: 0 0 0 .2rem rgba(168,40,63,.14);
}
.required::after { content: " *"; color: var(--danger); }
.text-overdue { color: var(--danger); font-weight: 700; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: .85rem; }
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--ink-soft);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
}
.empty-state i { font-size: 2.2rem; color: var(--terracotta-light); display: block; margin-bottom: .6rem; }

.alert { border-radius: var(--radius); border: none; }

/* ---------- Fade-in on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Staggered "one by one" entrance: wrap a row of cards with .stagger, each
   direct child (or its .reveal element) animates in slightly after the last. */
.stagger > *:nth-child(1) .reveal, .stagger > *:nth-child(1).reveal { transition-delay: .05s; }
.stagger > *:nth-child(2) .reveal, .stagger > *:nth-child(2).reveal { transition-delay: .17s; }
.stagger > *:nth-child(3) .reveal, .stagger > *:nth-child(3).reveal { transition-delay: .29s; }
.stagger > *:nth-child(4) .reveal, .stagger > *:nth-child(4).reveal { transition-delay: .41s; }
.stagger > *:nth-child(5) .reveal, .stagger > *:nth-child(5).reveal { transition-delay: .53s; }
.stagger > *:nth-child(6) .reveal, .stagger > *:nth-child(6).reveal { transition-delay: .65s; }
.stagger > *:nth-child(n+7) .reveal, .stagger > *:nth-child(n+7).reveal { transition-delay: .65s; }

/* A little extra lift + scale on trust cards specifically, so they feel like
   they're popping into place rather than just fading. */
.trust-strip .trust-card.reveal { transform: translateY(24px) scale(.94); }
.trust-strip .trust-card.reveal.is-visible { transform: translateY(0) scale(1); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 1040;
  font-size: 1.1rem;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--terracotta-dark); color: #fff; }

/* ==========================================================
   Lightweight animations & micro-interactions
   ========================================================== */

/* Gentle page fade-in on load */
body { animation: page-fade-in .35s ease; }
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Button press feedback (all primary buttons) */
.btn, .cat-chip, .qty-step-btn, .cart-icon-mobile, .wa-fab, .checkout-remove-btn, .cart-remove-btn {
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active, .cat-chip:active, .qty-step-btn:active, .cart-icon-mobile:active {
  transform: scale(.94);
}

/* Spinner used inside buttons while a background request is in flight */
.btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin .6s linear infinite;
  vertical-align: -2px;
}
.btn-outline-terracotta .btn-spinner,
.btn-outline-secondary .btn-spinner {
  border-color: rgba(168,40,63,.35);
  border-top-color: var(--terracotta-dark);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Cart badge "bump" when count changes */
@keyframes badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.cart-badge.bump, .cart-badge-mobile.bump { animation: badge-bump .35s ease; }

/* Fly-to-cart mini icon */
.fly-to-cart {
  position: fixed;
  z-index: 3000;
  pointer-events: none;
  font-size: 1.1rem;
  color: var(--terracotta-dark);
  will-change: transform, opacity;
  transition: transform .55s cubic-bezier(.35,0,.25,1), opacity .55s ease;
}

/* Product card gets a tiny "added" ping */
@keyframes card-ping {
  0% { box-shadow: 0 0 0 0 rgba(168,40,63,.35); }
  100% { box-shadow: 0 0 0 14px rgba(168,40,63,0); }
}
.product-card.added { animation: card-ping .5s ease-out; }

/* Checkout / cart line removal */
.cart-line, .checkout-line {
  transition: opacity .25s ease, transform .25s ease, max-height .3s ease, margin .3s ease, padding .3s ease;
  max-height: 200px;
  overflow: hidden;
}
.cart-line.removing, .checkout-line.removing {
  opacity: 0;
  transform: translateX(12px);
  max-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Price / total pulse when a value updates */
@keyframes value-pulse {
  0% { color: var(--terracotta-dark); }
  100% { color: inherit; }
}
.value-pulse { animation: value-pulse .5s ease; }

/* Order success checkmark */
.success-check-wrap {
  width: 84px; height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(58,125,68,.12);
  display: flex; align-items: center; justify-content: center;
  animation: success-pop .45s cubic-bezier(.34,1.56,.64,1);
}
.success-check-wrap i { font-size: 2.4rem; color: var(--success); }
@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ==========================================================
   WhatsApp Floating Chat Widget
   ========================================================== */
.wa-widget { position: fixed; right: 22px; bottom: 22px; z-index: 1050; font-family: 'Outfit', sans-serif; }

.wa-fab {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.7rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37,211,102,.45);
  position: relative;
  transition: transform .2s ease;
}
.wa-fab:hover { transform: scale(1.06); }
.wa-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  opacity: .55;
  animation: wa-pulse 2.2s ease-out infinite;
  z-index: -1;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.7); opacity: 0; }
}
.wa-fab .wa-close-icon { display: none; }
.wa-widget.open .wa-fab .wa-chat-icon { display: none; }
.wa-widget.open .wa-fab .wa-close-icon { display: inline-flex; }
.wa-widget.open .wa-fab::before { display: none; }

.wa-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.97);
  transform-origin: bottom right;
  transition: all .22s ease;
}
.wa-widget.open .wa-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.wa-panel-header {
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: #fff;
  padding: .95rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.wa-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.wa-panel-header .wa-title { font-weight: 700; font-size: .96rem; line-height: 1.2; }
.wa-panel-header .wa-status { font-size: .75rem; opacity: .9; display: flex; align-items: center; gap: .35rem; }
.wa-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #b6ffb0; display: inline-block; }
.wa-panel-close {
  background: none; border: none; color: #fff; opacity: .85; font-size: 1.1rem; margin-left: auto; cursor: pointer; line-height: 1;
}
.wa-panel-close:hover { opacity: 1; }

.wa-panel-body {
  background: #e9f5ee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23d8ecdf' fill-opacity='0.5'%3E%3Ccircle cx='10' cy='10' r='1.5'/%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3Ccircle cx='50' cy='50' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  padding: 1rem;
  min-height: 130px;
}
.wa-bubble {
  background: #fff;
  border-radius: 12px;
  padding: .65rem .85rem;
  font-size: .86rem;
  color: #241a22;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  max-width: 92%;
  position: relative;
  line-height: 1.45;
}
.wa-bubble .wa-time { display: block; text-align: right; font-size: .68rem; color: #93a89b; margin-top: .3rem; }

.wa-panel-footer { padding: .85rem; background: #fff; border-top: 1px solid #eee; }
.wa-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: .68rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.wa-start-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37,211,102,.35); color: #fff; }

@media (max-width: 480px) {
  .hero h1 { font-size: 2.1rem; }
  .trust-strip { margin-top: -2.2rem; }
  .wa-panel { width: calc(100vw - 40px); }
}

/* Extra-narrow phones (e.g. iPhone 13 at 390px CSS width) — keep the same
   2-column product grid but give prices a little more breathing room so
   nothing pokes outside the card. */
@media (max-width: 400px) {
  .product-card .body { padding: .8rem; }
  .product-card .p-name { font-size: .9rem; }
  .product-card .price-now { font-size: 1rem; }
  .product-card .price-old { font-size: .78rem; }
  .row.g-3 > [class^="col-6"], .row.g-3 > [class*=" col-6"] { padding-left: .35rem; padding-right: .35rem; }
}
