/* =====================================================================
   AV Fashion — theme layer (everything Tailwind utilities can't express)
   ===================================================================== */

:root {
  --coral: #FF6B5A;
  --sunshine: #FFC530;
  --aqua: #34C7E8;
  --mint: #45D6A8;
  --grape: #8B5CF6;
  --peach: #FFB59E;
  --ink: #14142B;
  --cream: #FFF9F4;
  --header-h: 76px;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Tailwind's display utilities (flex/grid/block) out-rank the UA `[hidden]`
   rule, so an element with both stays visible. Restore the expected
   behaviour everywhere except the two overlays that animate while hidden. */
[hidden]:not(.mega):not(.overlay) { display: none !important; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, .font-display { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: -.02em; }

/* ---------- focus ring (keyboard only) ------------------------------ */
:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- selection ------------------------------------------------ */
::selection { background: var(--sunshine); color: var(--ink); }

/* ---------- scrollbars ----------------------------------------------- */
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

.scrollbar-slim::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-slim::-webkit-scrollbar-thumb { background: #E6E6EF; border-radius: 99px; }
.scrollbar-slim::-webkit-scrollbar-thumb:hover { background: #d2d2e0; }

/* =====================================================================
   Reveal on scroll
   ===================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="zoom"]  { transform: scale(.94); }
[data-reveal].is-in { opacity: 1; transform: none; }
/* Sideways entrances would push past the viewport on narrow screens. */
@media (max-width: 640px) {
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(26px); }
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .9rem 1.9rem;
  line-height: 1;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s, background-color .25s, color .25s, border-color .25s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 14px 32px -14px rgba(255,107,90,.85); }
.btn-primary:hover { background: #F04E3C; transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(255,107,90,.9); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #24243f; transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid rgba(20,20,43,.12); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-mint { background: var(--mint); color: #06301f; }
.btn-mint:hover { background: #1FB88A; transform: translateY(-2px); }
.btn-sm { padding: .6rem 1.15rem; font-size: .8125rem; }
.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.0625rem; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,.45);
  animation: ripple .6s linear;
  pointer-events: none;
}
.btn-ghost .ripple, .btn-mint .ripple { background: rgba(20,20,43,.16); }
@keyframes ripple { to { transform: scale(3.2); opacity: 0; } }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  transition: background-color .35s, box-shadow .35s, color .35s, transform .35s;
}
.site-header.is-solid {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 8px 30px -18px rgba(20,20,43,.5);
}
/* The homepage hero is a light, high-key image, so the "transparent" header
   keeps ink text and simply drops its background. */
.site-header.is-transparent { color: var(--ink); }
.site-header.is-transparent .icon-btn:hover { background: rgba(20,20,43,.07); }
.site-header.is-hidden { transform: translateY(-105%); }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 999px;
  transition: background-color .2s, transform .2s;
}
.icon-btn:hover { background: rgba(20,20,43,.07); transform: translateY(-1px); }

.nav-link { position: relative; padding: .35rem 0; font-weight: 600; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 2px; width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.count-badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

/* mega menu */
.mega { transition: opacity .25s, transform .25s, visibility .25s; }
.mega[hidden] { display: block; opacity: 0; visibility: hidden; transform: translateY(10px) translateX(-50%); pointer-events: none; }

/* mobile drawer */
.drawer { transition: transform .45s cubic-bezier(.22,1,.36,1); }
.drawer.is-closed-right { transform: translateX(100%); }
.drawer.is-closed-left  { transform: translateX(-100%); }
.overlay { transition: opacity .3s; }
.overlay[hidden] { display: block; opacity: 0; pointer-events: none; }

/* =====================================================================
   Product card
   ===================================================================== */
.pcard { transition: transform .4s cubic-bezier(.22,1,.36,1); }
.pcard:hover { transform: translateY(-8px); }
.pcard-media { position: relative; overflow: hidden; background: #F6F6FA; }
.pcard-img { transition: opacity .55s ease, transform .9s cubic-bezier(.22,1,.36,1); }
.pcard-img-alt { position: absolute; inset: 0; opacity: 0; }
.pcard:hover .pcard-img-main { opacity: 0; transform: scale(1.06); }
.pcard:hover .pcard-img-alt  { opacity: 1; transform: scale(1.06); }
.pcard-actions { transition: opacity .3s, transform .35s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) {
  .pcard-actions { opacity: 0; transform: translateY(10px); }
  .pcard:hover .pcard-actions, .pcard:focus-within .pcard-actions { opacity: 1; transform: none; }
}
.fav-btn.is-active { background: var(--coral); color: #fff; }
.fav-btn.is-active svg { fill: currentColor; }

/* list view */
.products-list .pcard { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: center; }
.products-list .pcard-media { border-radius: 1.5rem; }
.products-list .pcard:hover { transform: none; }
@media (max-width: 640px) { .products-list .pcard { grid-template-columns: 120px 1fr; gap: 1rem; } }

/* =====================================================================
   Misc components
   ===================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .8125rem; font-weight: 700;
  border: 2px solid rgba(20,20,43,.1);
  transition: all .2s;
  cursor: pointer;
}
.chip:hover { border-color: rgba(20,20,43,.35); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.swatch { width: 30px; height: 30px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(20,20,43,.12); transition: box-shadow .2s, transform .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--ink); }

.size-btn {
  min-width: 52px; padding: .65rem .85rem;
  border-radius: 14px; border: 2px solid rgba(20,20,43,.12);
  font-weight: 700; font-size: .875rem;
  transition: all .2s;
}
.size-btn:hover { border-color: var(--ink); }
.size-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-btn[disabled] { opacity: .35; text-decoration: line-through; pointer-events: none; }

.field {
  width: 100%;
  border: 2px solid rgba(20,20,43,.1);
  border-radius: 16px;
  padding: .85rem 1.1rem;
  font-size: .95rem;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px rgba(52,199,232,.16); }
.field::placeholder { color: #A5A5B8; }

.tag {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .6875rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}

/* accordions */
.acc-panel { overflow: hidden; max-height: 0; transition: max-height .4s cubic-bezier(.22,1,.36,1); }
.acc-item.is-open .acc-panel { max-height: 640px; }
.acc-item.is-open .acc-chevron { transform: rotate(180deg); }
.acc-chevron { transition: transform .3s; }

/* marquee */
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* zoom lens */
.zoom-stage { overflow: hidden; }
.zoom-stage img { transition: transform .15s ease-out; }
.zoom-stage.is-zooming img { transform: scale(2.1); }

/* skeleton */
.skeleton { background: linear-gradient(90deg,#F1F1F6 25%,#E7E7EF 37%,#F1F1F6 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* toast */
#toast-stack { position: fixed; z-index: 120; bottom: 1.25rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .6rem; width: min(94vw, 26rem); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .75rem; background: var(--ink); color: #fff; border-radius: 18px; padding: .9rem 1.15rem; box-shadow: 0 18px 40px -14px rgba(20,20,43,.6); font-size: .9rem; font-weight: 600; animation: pop .28s cubic-bezier(.22,1,.36,1) both; }
.toast.is-out { animation: toastOut .3s ease forwards; }
@keyframes pop { from { transform: translateY(14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(14px); opacity: 0; } }

/* modal */
.modal-card { animation: pop .3s cubic-bezier(.22,1,.36,1) both; }

/* festive popup */
#festive .festive-card { box-shadow: 0 40px 90px -30px rgba(255,107,90,.55), 0 0 0 1px rgba(255,197,48,.18) inset; }
.festive-flame { display: inline-flex; animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes flicker {
  0%, 100% { opacity: 1; transform: scale(1); }
  45%      { opacity: .72; transform: scale(.93) rotate(-3deg); }
  70%      { opacity: .95; transform: scale(1.04) rotate(2deg); }
}

/* decorative blobs */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none; }

/* text stroke headline */
.text-outline { -webkit-text-stroke: 2px var(--ink); color: transparent; }

/* sticky offset for anchors */
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

/* rating stars */
.stars { display: inline-flex; gap: 1px; color: var(--sunshine); }

/* aspect helper for older engines */
.ratio-45 { aspect-ratio: 4 / 5; }
.ratio-34 { aspect-ratio: 3 / 4; }

/* print */
@media print { .site-header, .site-footer, .no-print { display: none !important; } }
