/* WearnSmile overrides for the FuHx UI */
:root,
html.dark,
.dark {
  --background: oklch(17% 0.018 55);
  --foreground: oklch(96% 0.006 80);
  --card: oklch(23% 0.022 55 / 0.82);
  --card-foreground: var(--foreground);
  --popover: oklch(22% 0.022 55);
  --popover-foreground: var(--foreground);
  --primary: oklch(64% 0.16 18);
  --primary-foreground: oklch(98% 0 0);
  --secondary: oklch(27% 0.025 55);
  --secondary-foreground: var(--foreground);
  --muted: oklch(25% 0.02 55);
  --muted-foreground: oklch(80% 0.025 75);
  --accent: oklch(32% 0.055 25);
  --accent-foreground: var(--foreground);
  --metal: oklch(84% 0.012 75);
  --border: oklch(72% 0.07 55 / 0.24);
  --input: oklch(72% 0.07 55 / 0.4);
  --ring: var(--primary);
  --carbon: oklch(19% 0.016 55);
  --gold: oklch(82% 0.13 82);
  --cyan: oklch(83% 0.11 82);
  --violet: oklch(70% 0.12 330);
  --glow: 0 0 24px oklch(60% 0.16 18 / 0.28), inset 0 1px 0 oklch(92% 0.05 82 / 0.18);
  --gradient-blood: linear-gradient(125deg, oklch(84% 0.13 82), oklch(58% 0.18 18));
  --stage-shade: linear-gradient(90deg, oklch(10% 0.02 55 / 0.92) 0%, oklch(12% 0.02 55 / 0.6) 45%, oklch(12% 0.02 55 / 0.16) 100%);
  --hero-ink: var(--foreground);
  --hero-sub: var(--muted-foreground);
  --hero-accent-a: oklch(84% 0.12 82);
  --hero-accent-b: oklch(70% 0.15 22);
}

/* The source reserves 9rem at the bottom for a fixed nav that we removed */
main.store-main {
  padding-bottom: 0;
}

.wm-brand {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Keep the clay button shape, replace the game-sky art with a quiet brand gradient */
.bg-blood,
html .bg-blood,
html.light .bg-blood,
html.dark .bg-blood {
  background-color: oklch(56% 0.16 18) !important;
  background-image: linear-gradient(160deg, oklch(68% 0.15 22), oklch(48% 0.16 16)) !important;
  color: #fff !important;
  text-shadow: none !important;
  animation: none !important;
}

.wm-hero-title {
  font-size: clamp(44px, 7vw, 76px);
}

.wm-hero-title .wm-mark {
  color: var(--gold);
}

/* Portrait hero photo in a wide stage: keep the model whole and blur the fill */
.brand-stage::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -4;
  background-image: url("../assets/wearnsmile/hero-model.jpg");
  background-size: cover;
  background-position: 50% 28%;
  filter: blur(34px) brightness(0.5) saturate(0.85);
  transform: scale(1.06);
}

.stage-image {
  inset: 0 20% 0 auto;
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: 100% 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

@media (max-width: 640px) {
  .stage-image {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* On a phone the crest card would cover the model's face; keep the hero clean */
  .brand-sculpture {
    display: none;
  }
}

.wm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: oklch(100% 0 0 / 0.04);
  color: var(--muted-foreground);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wm-product-price {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 700;
}

/* The source stylesheet has no .truncate utility; keep product titles on one line */
.category-section article h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wm-product-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}

.wm-product-actions .btn-add {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--foreground);
  background: transparent;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.wm-product-actions .btn-add:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.wm-product-actions .btn-add:active {
  transform: scale(0.98);
}

.wm-product-actions .btn-add:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.wm-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 40px 0 56px;
  color: var(--muted-foreground);
}

.wm-footer a {
  color: var(--muted-foreground);
  font-size: 13px;
}

.wm-footer a:hover {
  color: var(--foreground);
}

@media (min-width: 640px) {
  .wm-footer .col-span-2 {
    grid-column: span 1;
  }
}

.wm-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--foreground);
  color: var(--background);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 80;
}

.wm-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.wm-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 24px oklch(0% 0 0 / 0.35);
  transition: transform 180ms ease;
}

.wm-wa:hover {
  transform: translateY(-2px);
}

.wm-wa:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hang-swing,
  .crest-float,
  .brand-orbit,
  .floating-token,
  .hang-sheen {
    animation: none !important;
  }
  .wm-product-actions .btn-add {
    transition: none;
  }
}
