/* ================================================================
   Sales & Deals page (sales.php). Loaded only there, after redesign.css.
   Classes are prefixed `sx-`. The deal cards themselves are the store's
   shared product card (redesign.css); this file lays out the page:
   a crimson-and-amber hero with live stats and the deals sticker, a
   perks bar, the promotion banners as one row, the filterable deals
   grid, and a "build your own deal" band.
   ================================================================ */

.sx {
  --sx-ink: #0B0B0B;
  --sx-muted: #5E5E5E;
  --sx-line: #ECECEC;
  --sx-soft: #F3F3F3;
  --sx-red: #E0342B;
  --sx-amber: #FFB020;
  --sx-base: #140505;
  color: var(--sx-ink);
  padding-bottom: 64px;
  /* Full bleed: the page wrapper is padded; the hero runs edge to edge. */
  width: 100vw; max-width: none;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.sx svg { display: block; flex: 0 0 auto; }
.sx .container {
  box-sizing: border-box;
  width: 100%; max-width: 1320px;
  margin-left: auto; margin-right: auto;
  padding-left: 24px; padding-right: 24px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.sx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 24px;
  border-radius: 999px;
  font-size: 15.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.sx-btn:active { transform: scale(.98); }
.sx-btn--light { background: #fff; color: var(--sx-ink); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.sx-btn--light:hover { color: var(--sx-ink); transform: translateY(-1px); }
.sx-btn--ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); }
.sx-btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.sx-btn--dark { background: var(--sx-ink); color: #fff; }
.sx-btn--dark:hover { background: #262626; color: #fff; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.sx-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 64px 0 96px;
  background: var(--sx-base);
  color: #fff;
}
.sx-hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sx-hero-fx::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background:
    radial-gradient(circle at 6% 20%, var(--sx-amber) 0 3px, transparent 4px),
    radial-gradient(circle at 9% 28%, var(--sx-amber) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 44% 86%, #FF6B5B 0 4px, transparent 5px),
    radial-gradient(circle at 49% 80%, #FF6B5B 0 2px, transparent 3px),
    radial-gradient(circle at 58% 12%, var(--sx-amber) 0 2px, transparent 3px),
    radial-gradient(circle at 93% 88%, var(--sx-amber) 0 3px, transparent 4px),
    radial-gradient(circle at 97% 18%, #FF6B5B 0 1.5px, transparent 2.5px);
}
.sx-hero-fx::after {
  content: ''; position: absolute; inset: 0; opacity: .1; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.sx-glow { position: absolute; border-radius: 50%; filter: blur(80px); animation: sxDrift 20s ease-in-out infinite alternate; }
.sx-glow--a { width: 620px; height: 460px; left: -8%; top: -40%; background: #B3120C; opacity: .75; }
.sx-glow--b { width: 520px; height: 420px; right: 4%; bottom: -45%; background: var(--sx-amber); opacity: .35; animation-duration: 24s; animation-delay: -8s; }
.sx-glow--c { width: 340px; height: 340px; left: 46%; top: 10%; background: #FF4D6D; opacity: .22; animation-duration: 28s; animation-delay: -14s; }
@keyframes sxDrift { to { transform: translate3d(70px, 30px, 0) scale(1.15); } }
/* A giant outlined word behind everything. */
.sx-hero-word {
  position: absolute; left: -1vw; bottom: -5vw;
  font-size: clamp(120px, 21vw, 340px); font-weight: 900; line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 176, 32, .12);
  user-select: none; white-space: nowrap;
}

.sx-hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; align-items: center; }
.sx-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 176, 32, .35);
  font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--sx-amber);
}
.sx-live { width: 8px; height: 8px; border-radius: 50%; background: #FF4D3D; box-shadow: 0 0 0 0 rgba(255, 77, 61, .7); animation: sxLive 1.8s infinite; }
@keyframes sxLive { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 61, 0); } }
.sx-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 6vw, 76px); font-weight: 900; line-height: .98; letter-spacing: -.035em;
  background: linear-gradient(100deg, #fff 35%, #FFD27A 75%, var(--sx-amber));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.sx-lead { max-width: 560px; margin: 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .76); }
.sx-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; }
.sx-stats li { display: flex; flex-direction: column; padding: 0 28px; }
.sx-stats li:first-child { padding-left: 0; }
.sx-stats li + li { border-left: 1px solid rgba(255, 255, 255, .16); }
.sx-stats strong { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -.02em; color: #fff; }
.sx-stats span { margin-top: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.sx-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Sticker in a spinning stamp, with a price burst. */
.sx-hero-art { position: relative; justify-self: center; width: min(320px, 100%); aspect-ratio: 1; }
.sx-badge { position: absolute; inset: 0; animation: sxFloat 7s ease-in-out infinite; }
.sx-badge::before {
  content: ''; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 32, .38), transparent 68%);
}
.sx-badge img {
  position: absolute; inset: 14%; width: 72%; height: auto;
  rotate: -8deg;
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .5));
}
.sx-ring { position: absolute; inset: -10%; width: 120%; height: 120%; overflow: visible; animation: sxSpin 30s linear infinite; }
.sx-ring text { fill: var(--sx-amber); font: 800 12.5px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: .12em; }
@keyframes sxSpin { to { rotate: 360deg; } }
@keyframes sxFloat { 50% { transform: translateY(-12px); } }
.sx-burst {
  position: absolute; right: -4%; top: 2%;
  width: 104px; height: 104px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--sx-red); color: #fff;
  box-shadow: 0 0 0 6px rgba(224, 52, 43, .25), 0 14px 30px -10px rgba(0, 0, 0, .6);
  font-size: 30px; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  rotate: 12deg;
}
.sx-burst small { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }

/* ── Perks bar (overlaps the hero) ────────────────────────────────── */
.sx-perks {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -44px 0 0; padding: 8px; list-style: none;
  border-radius: 20px; background: #fff;
  box-shadow: 0 0 0 1px var(--sx-line), 0 24px 50px -28px rgba(0, 0, 0, .35);
}
.sx-perks li > a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.sx-perks li div { min-width: 0; }
.sx-perks li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-width: 0; }
.sx-perks li:has(> a) { padding: 0; }
.sx-perks li > a { flex: 1; color: inherit; text-decoration: none; border-radius: 14px; transition: background .15s; }
.sx-perks li > a:hover { background: #FFF6F5; color: inherit; }
.sx-perks li + li { border-left: 1px solid var(--sx-line); }
.sx-perk-ico {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #FDECEA; color: var(--sx-red);
}
.sx-perks strong { display: block; font-size: 15px; font-weight: 800; color: var(--sx-ink); }
.sx-perks small { display: block; margin-top: 1px; font-size: 13px; color: var(--sx-muted); }

/* ── Sections ─────────────────────────────────────────────────────── */
.sx-section { margin-top: 56px; }
.sx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sx-kicker { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--sx-red); }
.sx-kicker--light { color: var(--sx-amber); }
.sx-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; color: var(--sx-ink); }
.sx-count { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--sx-red); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 0; }
.sx-sub { max-width: 640px; margin: 8px 0 0; font-size: 15px; line-height: 1.55; color: var(--sx-muted); }

/* Promotion row */
.sx-arrows { display: flex; gap: 8px; }
.sx-arrow {
  width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--sx-soft); color: var(--sx-ink); cursor: pointer;
  transition: background .15s, opacity .15s;
}
.sx-arrow:hover:not(:disabled) { background: #E4E4E4; }
.sx-arrow:disabled { opacity: .35; cursor: default; }
.sx-rail {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain;
  padding: 4px 2px 10px;
}
.sx-rail::-webkit-scrollbar { display: none; }
.sx-promo {
  flex: 0 0 auto; width: 300px; aspect-ratio: 1;
  border-radius: 18px; overflow: hidden;
  background: var(--sx-soft);
  scroll-snap-align: start;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform .2s, box-shadow .2s;
}
.sx-promo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sx-promo:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .45); }
.sx-promo:hover img { transform: scale(1.04); }

/* Toolbar: segmented filter + result count */
.sx-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; }
.sx-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--sx-soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.sx-tabs::-webkit-scrollbar { display: none; }
.sx-tab {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--sx-ink);
  font: inherit; font-size: 14.5px; font-weight: 700; white-space: nowrap; cursor: pointer;
  transition: background .15s, color .15s;
}
.sx-tab span { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 800; }
.sx-tab:hover { background: #E7E7E7; }
.sx-tab.is-active { background: var(--sx-ink); color: #fff; }
.sx-tab.is-active span { background: rgba(255, 255, 255, .18); color: #fff; }
.sx-result { font-size: 14px; font-weight: 600; color: var(--sx-muted); }

/* Deals grid (cards are the shared .product-card) */
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 32px 20px; }
.sx-grid > .sale-item[hidden] { display: none; }
.sx-grid .sales-card-slot { min-width: 0; }
.sx-grid .sales-card-slot > .product-card { width: 100%; height: 100%; }

/* Bundle / Mix & Match deal */
.sx-bundle { min-width: 0; }
.sx-bundle-img { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #F6F6F6; }
.sx-bundle-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sx-bundle:hover .sx-bundle-img img { transform: scale(1.04); }
.sx-off { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 5px 10px; border-radius: 999px; background: var(--sx-red); color: #fff; font-size: 13px; font-weight: 800; }
.sx-kind { position: absolute; left: 10px; bottom: 10px; z-index: 1; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.sx-bundle-body { padding: 10px 2px 0; }
.sx-bundle-body h3 { margin: 0 0 3px; font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.sx-bundle-body h3 a { color: #000; text-decoration: none; }
.sx-bundle-desc { margin: 0 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--sx-muted); }
.sx-bundle-price { font-size: 15px; color: #000; }
.sx-bundle-price s { color: #8A8A8A; margin-right: 4px; }
.sx-bundle-save { margin-top: 2px; font-size: 13px; font-weight: 700; color: #137A3E; }
.sx-bundle-cta { display: inline-flex; align-items: center; height: 36px; margin-top: 10px; padding: 0 16px; border-radius: 999px; background: #000; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.sx-bundle-cta:hover { background: #262626; color: #fff; }

/* Empty */
.sx-empty { max-width: 460px; margin: 20px auto 0; padding: 40px 24px; text-align: center; border-radius: 24px; background: #FAFAFA; box-shadow: inset 0 0 0 1px var(--sx-line); }
.sx-empty img { width: 120px; height: auto; margin: 0 auto 12px; display: block; }
.sx-empty h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.sx-empty p { margin: 0 0 20px; color: var(--sx-muted); line-height: 1.55; }

/* Build-your-own band */
.sx-cta {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 40px 44px; border-radius: 28px;
  background: radial-gradient(120% 140% at 100% 0%, #1F6B3D 0%, #0B1710 60%);
  color: #fff;
}
.sx-cta::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .4;
  background:
    radial-gradient(circle at 70% 20%, #9BE15D 0 3px, transparent 4px),
    radial-gradient(circle at 74% 28%, #9BE15D 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 60% 84%, #E7C45A 0 3px, transparent 4px);
}
.sx-cta-copy { max-width: 520px; }
.sx-cta h2 { margin: 0 0 8px; font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; letter-spacing: -.025em; color: #fff; }
.sx-cta p { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .74); }
.sx-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; }
.sx-cta-art { position: absolute; left: 54%; top: 50%; z-index: 0; width: 190px; height: 150px; translate: 0 -50%; pointer-events: none; }
.sx-cta-art img { position: absolute; width: 58%; height: auto; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .5)); }
.sx-cta-art img:first-child { left: 0; top: 4%; rotate: -12deg; }
.sx-cta-art img:last-child { right: 0; bottom: 0; rotate: 14deg; }

/* ── Sizes ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sx-hero-inner { grid-template-columns: minmax(0, 1fr) 240px; }
  .sx-cta { flex-direction: column; align-items: flex-start; }
  .sx-cta-art { left: auto; right: 16px; top: 18px; width: 130px; height: 104px; translate: 0 0; }
  .sx-cta-copy { padding-right: 110px; }
}
@media (max-width: 768px) {
  .sx .container { padding-left: 16px; padding-right: 16px; }
  .sx-hero { padding: 36px 0 80px; }
  .sx-hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .sx-hero-art { order: -1; width: 200px; margin-bottom: 4px; }
  .sx-burst { width: 78px; height: 78px; font-size: 22px; right: -18%; }
  .sx-burst small { font-size: 9px; }
  .sx-hero h1 { font-size: 44px; margin: 14px 0 10px; }
  .sx-lead { font-size: 15px; }
  .sx-stats { margin-top: 22px; }
  .sx-stats li { padding: 0 18px; }
  .sx-stats strong { font-size: 26px; }
  .sx-stats span { font-size: 11px; }
  .sx-actions { margin-top: 24px; }
  .sx-actions .sx-btn { flex: 1 1 auto; height: 48px; padding: 0 18px; font-size: 15px; }
  .sx-perks { grid-template-columns: 1fr; margin-top: -40px; padding: 6px; }
  .sx-perks li + li { border-left: 0; border-top: 1px solid var(--sx-line); }
  .sx-perks li, .sx-perks li > a { padding: 12px 12px; }
  .sx-perks li:has(> a) { padding: 0; }
  .sx-section { margin-top: 40px; }
  .sx-head h2 { font-size: 26px; }
  .sx-sub { font-size: 14px; }
  .sx-arrows { display: none; }
  .sx-rail { gap: 12px; margin: 0 -16px; padding: 4px 16px 10px; scroll-padding-left: 16px; }
  .sx-promo { width: 70vw; max-width: 300px; border-radius: 16px; }
  .sx-toolbar { flex-direction: column; align-items: stretch; }
  .sx-tabs { align-self: flex-start; }
  .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .sx-cta { padding: 28px 22px; border-radius: 22px; }
  .sx-cta-art { width: 96px; height: 78px; right: 10px; top: 14px; }
  .sx-cta-copy { padding-right: 70px; }
  .sx-cta-actions { width: 100%; }
  .sx-cta-actions .sx-btn { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .sx-hero h1 { font-size: 38px; }
  .sx-stats li { padding: 0 12px; }
  .sx-stats strong { font-size: 22px; }
  .sx-actions { flex-direction: column; }
  .sx-tab { padding: 0 12px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx *, .sx *::before { animation: none !important; transition: none !important; }
}
