/* ============================================================
   Elite Suppliez — design system
   Clean, dark, premium streetwear look. Cinematic hero, no HUD/
   scanline gimmicks, no dashed rules. Tailwind (compiled, not the
   runtime CDN) handles layout utilities; everything bespoke (cards,
   buttons, the modal, the hero's depth) lives here.
   ============================================================ */

:root {
  /* colors come from css/themes.css (data-theme on <html>) */
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

/* Tailwind's compiled output and this file both define some equal-
   specificity utility classes (e.g. .hidden vs .flex). Since this
   stylesheet loads after tailwind.css, this always wins regardless of
   Tailwind's internal utility ordering — critical for every hidden/flex
   combo toggled by JS (modals, empty states, the admin login/dashboard
   switch) to behave correctly every time. */
.hidden { display: none; }

/* .btn / .icon-btn set display later in this file at the same specificity,
   which would otherwise beat .hidden (e.g. the admin Delete button). */
.btn.hidden,
.icon-btn.hidden { display: none; }

/* Pages use Tailwind's hover:text-white for link hovers; white is invisible
   on a light theme, so route it through the theme's strongest text color. */
.hover\:text-white:hover { color: var(--text-strong); }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: page-fade-in 0.5s ease both;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
}

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

:focus-visible { outline: 2px solid var(--text-strong); outline-offset: 2px; border-radius: 4px; }

.font-display {
  font-family: 'Anton', 'Inter', sans-serif;
  letter-spacing: 0.015em;
}

.text-gradient {
  background: linear-gradient(180deg, var(--text-strong) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- film grain (used as a cinematic texture accent) ---------- */
.bg-grain {
  position: relative;
}
.bg-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(var(--bg-rgb), 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
#site-header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.92);
  border-bottom-color: var(--border);
}

.nav-link {
  position: relative;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s ease;
  padding-bottom: 4px;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--text-strong);
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.is-active { color: var(--text-strong); }
.nav-link:hover::after,
.nav-link.is-active::after { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.icon-btn:hover { color: var(--text-strong); border-color: var(--border-strong); transform: translateY(-1px); }

#mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(84vw, 340px);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}
#mobile-nav.is-open { transform: translateX(0); }
body.nav-open { overflow: hidden; }
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

/* ---------- hero (cinematic) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 88svh;
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}

/* slow-drifting ambient light, the main source of "depth" in the hero */
.hero__aurora {
  position: absolute;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 38% at 22% 26%, rgba(var(--glow-rgb), 0.07), transparent 70%),
    radial-gradient(42% 42% at 80% 20%, rgba(var(--glow2-rgb), 0.1), transparent 70%),
    radial-gradient(55% 55% at 50% 90%, rgba(var(--glow-rgb), 0.045), transparent 70%);
  filter: blur(30px);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(1.5%, -2.5%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 1.5%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__aurora { animation: none; }
}

/* mouse-follow spotlight; --spot-x/--spot-y set by main.js on pointer move */
.hero__spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(560px circle at var(--spot-x, 50%) var(--spot-y, 28%), rgba(var(--glow-rgb), 0.055), transparent 62%);
}
.hero:hover .hero__spotlight { opacity: 1; }
@media (hover: none) {
  .hero__spotlight { display: none; }
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 38%, transparent 45%, rgba(var(--vignette-rgb), var(--vignette-a)) 100%);
}

.hero__content {
  position: relative;
  z-index: 3;
  will-change: transform;
}

.hero-logo {
  filter: var(--logo-filter) drop-shadow(0 20px 40px rgba(var(--shadow-rgb), calc(0.6 * var(--shadow-k))));
}

/* the logo mark is light silver: themes with a light page darken it so it
   stays readable (see --logo-filter in css/themes.css) */
img[src="/assets/logo.png"] { filter: var(--logo-filter); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}
.scroll-cue span {
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
}
.scroll-cue svg { animation: scroll-cue-bob 2.2s ease-in-out infinite; }
@keyframes scroll-cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg { animation: none; }
}
@media (max-width: 640px) {
  .scroll-cue { display: none; }
}

/* ---------- sub-page intro header (lighter version of the hero treatment,
   used on /shop/, /about/, /contact/ so they feel cut from the same cloth
   as the homepage instead of dropping into flat black) ---------- */
.page-intro {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.page-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 75% at 50% 0%, rgba(var(--glow-rgb), 0.055), transparent 70%);
  pointer-events: none;
}
.page-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page-intro > * {
  position: relative;
  z-index: 1;
}

/* brand marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee span {
  font-family: 'Anton', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.9rem 1.5rem;
  white-space: nowrap;
}
.marquee .dot { color: var(--text-dim); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(var(--accent-rgb), 0.35); }
.btn--primary:active { transform: translateY(0) scale(0.97); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text-strong); transform: translateY(-2px); }
.btn--ghost:active { transform: translateY(0) scale(0.97); }
.btn--block {
  width: 100%;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1rem;
  font-size: 0.72rem;
}
.btn--block:hover { background: var(--accent-hover); }
.btn--block:active:not(:disabled) { transform: scale(0.97); }
.btn--block.btn--disabled,
.btn--block:disabled {
  background: var(--bg-elevated);
  color: var(--text-dim);
  border-color: var(--border-strong);
  cursor: not-allowed;
  box-shadow: none;
}
.btn--block.btn--disabled:hover,
.btn--block:disabled:hover { transform: none; background: var(--bg-elevated); }
.btn--danger { background: var(--danger); color: var(--on-danger); }
.btn--danger:hover { background: var(--danger-hover); transform: translateY(-2px); }
.btn--sm { padding: 0.55rem 1.1rem; font-size: 0.68rem; }

/* ---------- product cards ---------- */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-5px);
  box-shadow: 0 24px 48px -28px rgba(var(--shadow-rgb), calc(0.7 * var(--shadow-k)));
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-deep);
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card--sold .product-card__media img { filter: grayscale(0.7) brightness(0.5); }
.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: 'Anton', sans-serif;
  font-size: 2.75rem;
  color: var(--text-dim);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-deep));
}
.tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}
.tag--sold { background: #0a0a0a; color: #fff; border: 1px solid #3a3a3a; }
.tag--sale { background: #fff; color: #0a0a0a; }
.product-card__body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.product-card__category {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
}
.product-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
}
/* margin-top: auto pins price + button to the card bottom so they line up
   across a row even when names wrap to different line counts */
.product-card__price { display: flex; align-items: baseline; gap: 0.55rem; margin: auto 0 0.75rem; padding-top: 0.1rem; }
.price { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.price--original { font-size: 0.8rem; color: var(--text-dim); text-decoration: line-through; font-weight: 500; }

/* ---------- reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- feature bar ---------- */
.feature-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; padding: 1.75rem 1rem; }
.feature-item__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-strong);
  background: var(--bg-card);
}
.feature-item__label { font-weight: 700; font-size: 0.85rem; }
.feature-item__sub { font-size: 0.78rem; color: var(--text-dim); }

/* ---------- form fields (shop search, admin forms, contact) ---------- */
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input::placeholder,
.field-textarea::placeholder { color: var(--text-dim); }
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--text-strong);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}
.field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a7a7a' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.field-label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 0.4rem; }

/* category chips */
.chip {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.chip:hover { border-color: var(--border-strong); color: var(--text-strong); }
.chip--active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- claim modal ---------- */
#claim-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0;
}
/* #claim-modal's own `display: flex` is an ID rule, which outranks the
   plain `.hidden` class on specificity alone — without this, toggling
   `.hidden` on the modal would never actually hide it. */
#claim-modal.hidden { display: none; }
@media (min-width: 640px) {
  #claim-modal { align-items: center; padding: 1rem; }
}
.modal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal-panel { border-radius: var(--radius-lg); }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* contact options (Call/Text, Snapchat, TikTok, Email) — a 2x2 grid in the
   claim modal and on the contact page, since 4 items in one row gets too
   cramped on a phone-width modal. */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}
.contact-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
  transition: all 0.2s ease;
}
.contact-option:hover { border-color: var(--border-strong); color: var(--text-strong); transform: translateY(-2px); }
.contact-option__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: inherit;
}
.contact-option__label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-option__detail { font-size: 0.7rem; color: var(--text-dim); word-break: break-word; }

/* ---------- misc ---------- */
.hairline { height: 1px; background: var(--border); border: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-dim);
}
.badge .dot { width: 6px; height: 6px; border-radius: 999px; background: #22c55e; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--skeleton-hi) 37%, var(--bg-card) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- admin ---------- */
.admin-shell { min-height: 100vh; background: var(--bg); }
.stat-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.stat-tile__value { font-family: 'Anton', sans-serif; font-size: 2.1rem; }
.stat-tile__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 700; }

.admin-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}
.admin-row:hover { background: var(--hover-row); }
.admin-row__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-deep);
  flex-shrink: 0;
}
.admin-row__thumb img { width: 100%; height: 100%; object-fit: cover; }

.admin-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100vw, 460px);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.admin-panel.is-open { transform: translateX(0); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 20px 40px -16px rgba(var(--shadow-rgb), calc(0.6 * var(--shadow-k)));
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.toast--error { background: var(--danger); color: var(--on-danger); }

.shake { animation: shake 0.4s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ---------- admin tabs + theme picker ---------- */
.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.admin-tab {
  padding: 0.85rem 1.1rem;
  margin-bottom: -1px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.admin-tab:hover { color: var(--text-strong); }
.admin-tab[aria-selected="true"] { color: var(--text-strong); border-bottom-color: var(--text-strong); }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  padding-bottom: 6rem;
}
.theme-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.theme-card[aria-pressed="true"] {
  border-color: var(--text-strong);
  box-shadow: 0 0 0 1px var(--text-strong);
}
.theme-card__meta { padding: 0.8rem 0.4rem 0.4rem; }
.theme-card__name { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-weight: 700; font-size: 0.95rem; }
.theme-card__blurb { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.4; }
.theme-card__live {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}

/* Each preview carries its own data-theme, so it's painted with that
   theme's real tokens, not an approximation of them. */
.theme-preview {
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  pointer-events: none;
}
.theme-preview__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.theme-preview__brand { font-family: 'Anton', sans-serif; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--text-strong); }
.theme-preview__links { display: flex; gap: 0.35rem; }
.theme-preview__links i { display: block; width: 14px; height: 3px; border-radius: 2px; background: var(--text-dim); }
.theme-preview__hero { display: block; padding: 0.9rem 0.7rem 0.8rem; }
.theme-preview__title { display: block; font-family: 'Anton', sans-serif; font-size: 1.25rem; line-height: 1.05; color: var(--text-strong); }
.theme-preview__sub { display: block; font-size: 0.68rem; color: var(--text-muted); margin: 0.3rem 0 0.6rem; }
.theme-preview__btn {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.theme-preview__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; padding: 0 0.7rem 0.75rem; }
.theme-preview__card { display: block; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); padding: 0.35rem; }
.theme-preview__img { display: block; height: 26px; border-radius: 5px; background: var(--bg-deep); margin-bottom: 0.3rem; }
.theme-preview__name { display: block; font-size: 0.6rem; font-weight: 600; color: var(--text); }
.theme-preview__price { display: block; font-size: 0.6rem; font-weight: 800; color: var(--text-muted); }

.action-bar {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(calc(100vw - 2rem), 520px);
  padding: 0.8rem 0.9rem 0.8rem 1.25rem;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 40px -16px rgba(var(--shadow-rgb), calc(0.6 * var(--shadow-k)));
}
.action-bar.hidden { display: none; }
@media (max-width: 480px) {
  .action-bar { border-radius: var(--radius-lg); flex-direction: column; align-items: stretch; gap: 0.75rem; padding: 0.9rem; }
  .action-bar .flex { justify-content: stretch; }
  .action-bar .btn { flex: 1; }
}

/* ---------- photo galleries (product cards + claim modal) ---------- */
.carousel { position: relative; width: 100%; height: 100%; }
.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > img { flex: 0 0 100%; scroll-snap-align: start; }
/* photo overlays are fixed dark/white rather than themed: they sit on top
   of arbitrary photos, not on the page background */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: rgba(10, 10, 10, 0.65);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.carousel__btn:hover { background: rgba(10, 10, 10, 0.85); }
.carousel__btn--prev { left: 0.55rem; }
.carousel__btn--next { right: 0.55rem; }
.carousel:hover .carousel__btn,
.carousel__btn:focus-visible { opacity: 1; }
@media (hover: none) {
  .carousel__btn { opacity: 1; }
}
.carousel__dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.55);
  pointer-events: none;
}
.carousel__dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.5); transition: background 0.2s ease; }
.carousel__dot.is-active { background: #fff; }
/* the hover zoom would fight the swipe, so multi-photo cards skip it */
.product-card:hover .carousel--multi img { transform: none; }

.modal-gallery { aspect-ratio: 1 / 1; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 1.25rem; background: var(--bg-deep); }
.modal-gallery.hidden { display: none; }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- admin photo manager ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.photo-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-deep);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile__cover,
.photo-tile__make {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 0;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.photo-tile__make { cursor: pointer; }
.photo-tile__make:hover { background: #000; }
.photo-tile__remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 26px;
  height: 26px;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  border-color: transparent;
}
.photo-tile__remove:hover { background: #000; color: #fff; border-color: transparent; }
.photo-add {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.photo-add:hover:not(:disabled) { border-color: var(--text-strong); color: var(--text-strong); }
.photo-add:disabled { cursor: progress; }
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- editable content: first-visit hold + announcement bar ---------- */
.content-pending [data-content],
.content-pending [data-contact] { visibility: hidden; }

.announcement {
  position: relative;
  z-index: 41;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 2.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}
.announcement__text { color: inherit; }
a.announcement__text { text-decoration: underline; text-underline-offset: 3px; }
a.announcement__text:hover { text-decoration-thickness: 2px; }
.announcement__close {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.8;
}
.announcement__close:hover { opacity: 1; background: rgba(var(--bg-rgb), 0.18); }
.announcement__close:focus-visible { outline-color: var(--accent-ink); }

/* ---------- admin content editor ---------- */
.content-section { margin-bottom: 2.5rem; }
.content-section__head { margin-bottom: 1rem; }
.content-section__head h3 { font-family: 'Anton', 'Inter', sans-serif; font-size: 1.25rem; letter-spacing: 0.015em; }
.content-section__head p { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.content-fields { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .content-fields { grid-template-columns: 1fr 1fr; }
  .content-field--wide { grid-column: 1 / -1; }
}
.content-field__top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.content-field__top .field-label { margin-bottom: 0; }
.content-field__reset {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.content-field__reset:hover { color: var(--text-strong); }
.content-field__hint { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.35rem; }
.content-field__error { font-size: 0.74rem; color: var(--danger); margin-top: 0.35rem; font-weight: 600; }
.field-input.is-invalid,
.field-textarea.is-invalid { border-color: var(--danger); }
#content-form { padding-bottom: 6rem; }
/* lift toasts clear of the floating save bar so neither hides the other */
body:has(.action-bar:not(.hidden)) .toast { bottom: 6rem; }
