/*
 * Enter any custom CSS here.
 * This file will not be overwritten by theme updates.
 *
 * ── Semantic class hooks (sa-*) ────────────────────────────────────────────
 * Every section, snippet and key element carries a stable `sa-` class you can
 * target with plain CSS — no Tailwind rebuild needed. These classes ship with
 * NO styles of their own; they exist purely as selectors for you to hook onto.
 *
 * Page scope   body.sa-tpl-<template>      e.g. .sa-tpl-product, .sa-tpl-shop
 *              body.sa-no-product-images / .sa-no-category-images when the
 *              matching theme setting is off
 * Chrome       .sa-header .sa-navbar .sa-footer
 *              .sa-navbar-link .sa-navbar-logo .sa-navbar-cart .sa-footer-link
 * Sections     .sa-<component>             e.g. .sa-hero, .sa-features, .sa-faq
 *   variant    .sa-<component>--<variant>  e.g. .sa-hero--split-media
 *   inner      .sa-<component>-title / -subtitle / -eyebrow / -media /
 *              -items / -item / -actions / -link / -price / -badge / -icon
 * Primitives   .sa-btn (+ .sa-btn--<variant>), .sa-section-header
 *              (.sa-section-title / -eyebrow / -subtitle),
 *              .sa-product-card (+ .sa-product-card--<style>,
 *              .sa-product-card-title / -price / -stock / -status / -badges),
 *              .sa-product-form + .sa-add-to-cart, .sa-product-gallery,
 *              .sa-cart-panel + .sa-cart-item, .sa-searchbar, .sa-pagination,
 *              .sa-breadcrumbs, .sa-toasts + .sa-toast, .sa-feedback-card
 *
 * Example — bigger hero heading only on the product page:
 *   .sa-tpl-product .sa-hero-title { font-size: 3rem; }
 * ───────────────────────────────────────────────────────────────────────────
*/

/* ═══════════════════════════════════════════════════════════════════════════
 * Dark glass style (glass cards, blue glow, mint accents)
 * ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bh-mint: 167, 243, 208;
  --bh-slate: 148, 163, 184;
}

/* ── Global polish ───────────────────────────────────────────────────────── */
.sa-section-title,
.sa-hero-title { letter-spacing: -0.025em; }

.sa-btn { border-radius: 12px; font-weight: 600; }

.sa-categories { scroll-margin-top: 96px; }

/* Glass cards on the homepage (dark scheme) */
[data-scheme="dark"] .components .bg-surface {
  background-color: rgba(26, 28, 30, 0.55);
  border-color: rgba(var(--bh-slate), 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
[data-scheme="dark"] .components .bg-surface:hover { border-color: rgba(var(--cl-accent), 0.4); }

/* Shimmering highlight for *starred* title words */
.hl-shimmer .mk {
  background: linear-gradient(90deg, rgb(var(--cl-t-muted)) 0%, rgb(var(--cl-t-primary)) 50%, rgb(var(--cl-t-muted)) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: bh-shimmer 4s linear infinite;
}

/* ── Hero: "categories-cta" variant ──────────────────────────────────────── */
.sa-hero--categories-cta {
  display: flex;
  align-items: center;
  min-height: min(calc(100vh - 100px), 780px);
}
.sa-hero--categories-cta > .wrap { width: 100%; }

/* Even 48px grid + big blue glow + mint corner glow */
.sa-hero--categories-cta .hero-bg-grid {
  background-image:
    linear-gradient(rgba(var(--bh-slate), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--bh-slate), 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, #000 45%, transparent 100%);
}
.sa-hero--categories-cta .hero-bg-glow {
  top: 25%;
  left: 50%;
  width: 800px;
  height: 800px;
  margin-left: -400px;
  margin-top: -200px;
  background: rgba(var(--cl-accent), 0.2);
  filter: blur(160px);
  opacity: 0.6;
}
.sa-hero--categories-cta::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 500px;
  height: 500px;
  border-radius: 9999px;
  background: rgba(var(--bh-mint), 0.1);
  filter: blur(140px);
  opacity: 0.4;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .sa-hero--categories-cta .sa-hero-split-text { flex: 0 0 58%; max-width: 58%; }
  .sa-hero--categories-cta .sa-hero-split-card { flex: 1 1 auto; }
  .sa-hero--categories-cta .sa-hero-split-text > div { max-width: none; }
}

.sa-hero--categories-cta .sa-hero-title {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 700;
}
.sa-hero--categories-cta .sa-hero-subtitle {
  margin-top: 1.5rem;
  max-width: 36rem;
  line-height: 1.65;
}
.sa-hero--categories-cta .sa-hero-actions { margin-top: 2.25rem; }

/* Eyebrow pill with a pulsing mint dot */
.sa-hero--categories-cta .sa-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(var(--bh-slate), 0.12);
  background: rgba(26, 28, 30, 0.55);
  color: rgb(var(--cl-t-muted));
  font-size: 0.75rem;
  font-weight: 500;
}
.sa-hero--categories-cta .sa-hero-eyebrow::before,
.sa-hero-dot {
  content: "";
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: rgb(var(--bh-mint));
  animation: bh-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Big buttons */
.sa-hero--categories-cta .sa-btn {
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}
.sa-hero--categories-cta .sa-btn--primary.sa-btn--solid {
  animation: bh-pulse-glow 3s ease-in-out infinite;
}
.sa-hero--categories-cta .sa-btn--primary.sa-btn--solid::after {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s;
}
.sa-hero--categories-cta .sa-btn--primary.sa-btn--solid:hover::after { transform: translateX(4px); }
.sa-hero--categories-cta .sa-btn--secondary {
  background: rgba(26, 28, 30, 0.55);
  border-color: rgba(var(--bh-slate), 0.12);
}
.sa-hero--categories-cta .sa-btn--secondary:hover { border-color: rgba(var(--cl-accent), 0.4); }
.sa-hero--categories-cta .sa-btn--secondary i { color: rgb(var(--cl-accent)); }

/* Stats row under the buttons */
.sa-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  width: 100%;
  text-align: left;
}
@media (min-width: 640px) { .sa-hero-stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); max-width: 40rem; } }
.sa-hero-stats--center { text-align: center; }
.sa-hero-stat-value { font-size: 1.5rem; line-height: 2rem; font-weight: 700; }
.sa-hero-stat-label { font-size: 0.75rem; margin-top: 0.25rem; }

/* The floating "Check out products" card */
.sa-hero-split-card { max-width: 30rem; margin-inline: auto; }
@media (min-width: 1024px) { .sa-hero-split-card { margin-inline: auto 0; } }

.sa-hero-cta { position: relative; }
.sa-hero-cta-glow {
  position: absolute;
  inset: -1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(var(--cl-accent), 0.3), rgba(var(--bh-mint), 0.2));
  filter: blur(64px);
  opacity: 0.5;
  pointer-events: none;
}
.sa-hero-cta-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.5rem;
  background: rgba(var(--cl-surface), 0.9);
  border: 1px solid var(--cl-border);
  animation: bh-float 6s ease-in-out infinite;
}
[data-scheme="dark"] .sa-hero-cta-card {
  background: rgba(16, 18, 20, 0.85);
  border-color: rgba(var(--bh-slate), 0.14);
}
/* gradient "smart edge" border */
.sa-hero-cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(var(--cl-accent), 0.6), rgba(var(--bh-slate), 0.05) 40%, rgba(var(--bh-mint), 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.sa-hero-cta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.sa-hero-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(var(--bh-mint));
}
[data-scheme="light"] .sa-hero-cta-badge { color: rgb(var(--cl-success)); }
.sa-hero-cta-count {
  font-size: 0.75rem;
  color: rgb(var(--cl-t-muted));
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.sa-hero-cta-logo { height: 4rem; width: auto; margin-bottom: 1.5rem; }
.sa-hero-cta-title { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -0.01em; }
.sa-hero-cta-text { font-size: 0.875rem; line-height: 1.5; margin-top: 0.375rem; }

.sa-hero-cta-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.sa-hero-cta-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.625rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--cl-border);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: border-color 0.2s, background-color 0.2s;
}
.sa-hero-cta-cat svg { width: 14px; height: 14px; flex: none; color: rgb(var(--cl-t-muted)); transition: transform 0.2s, color 0.2s; }
.sa-hero-cta-cat:hover { border-color: rgb(var(--cl-accent)); background: rgba(var(--cl-accent), 0.1); }
.sa-hero-cta-cat:hover svg { color: rgb(var(--cl-accent)); transform: translateX(2px); }

.sa-hero-cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  background: rgb(var(--cl-accent));
  color: rgb(var(--cl-on-accent));
  font-weight: 600;
  font-size: 1rem;
  animation: bh-pulse-glow 3s ease-in-out infinite;
  transition: opacity 0.2s;
}
.sa-hero-cta-button:hover { opacity: 0.9; }
.sa-hero-cta-button svg { width: 18px; height: 18px; animation: bh-nudge 1.6s ease-in-out infinite; }

/* Little pop on the category cards after scrolling down to them */
.sa-scroll-flash .sa-categories-item { animation: bh-pop 0.6s ease-out both; }
.sa-scroll-flash .sa-categories-item:nth-child(2) { animation-delay: 0.06s; }
.sa-scroll-flash .sa-categories-item:nth-child(3) { animation-delay: 0.12s; }
.sa-scroll-flash .sa-categories-item:nth-child(4) { animation-delay: 0.18s; }
.sa-scroll-flash .sa-categories-item:nth-child(n+5) { animation-delay: 0.24s; }

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes bh-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes bh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes bh-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes bh-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes bh-pop { 0% { opacity: 0.4; transform: translateY(12px) scale(0.98); } 100% { opacity: 1; transform: none; } }
@keyframes bh-pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--cl-accent), 0.4), 0 0 40px rgba(var(--cl-accent), 0.15); }
  50% { box-shadow: 0 0 0 6px rgba(var(--cl-accent), 0), 0 0 60px rgba(var(--cl-accent), 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .sa-hero-cta-card, .sa-hero-cta-button, .sa-hero-cta-button svg,
  .sa-hero--categories-cta .sa-btn, .hl-shimmer .mk, .sa-hero-dot,
  .sa-hero--categories-cta .sa-hero-eyebrow::before, .sa-scroll-flash .sa-categories-item { animation: none !important; }
}
