/* ==========================================================================
   Loop Lab V3 — Playful by Design · Route 3 "Bold Rounded" Design System
   Consolidated tokens, typography stability (RISK-04), responsive layout
   and accessible interactive control language (OPT-14 / OPT-15).
   ========================================================================== */

/* Metric-matched fallback prevents layout shift while Instrument Sans loads (RISK-04) */
@font-face {
  font-family: 'Instrument Sans Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 97%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  /* Approved Loop Lab Brand Palette */
  --cream: #f7f2e8;
  --paper: #fffaf3;
  --paper-tint: #f3ebdf;
  --neutral-pill: #efe6da;
  --brown: #221613;
  --brown-hover: #382520;
  --pink: #f6b7c3;
  --pink-soft: #f9dfe4;
  --pink-border: #dfa2b0;
  --butter: #f6e7be;
  --butter-soft: #fbf3dc;
  --butter-border: #d9c48c;
  --muted: #5f4e46;
  --line: #e4d6c7;
  --line-strong: #cfc0b0;

  /* Unified Semantic Alert & Status Tokens (WCAG AA >= 4.5:1 verified) */
  --promo-bg: #f6b7c3;
  --promo-soft: #fae3e8;
  --promo-text: #221613;
  --amber-bg: #f5e6c8;
  --amber-soft: #f5e6c8;
  --amber-border: #d9be83;
  --amber-text: #4a3208;
  --error-bg: #f6ddd8;
  --error-text: #7a211b;
  --red: #7a211b;
  --red-soft: #f6ddd8;
  --red-border: #d59d95;
  --success-bg: #dfece3;
  --success-text: #164428;
  --green: #164428;
  --green-deep: #123620;
  --green-soft: #dfece3;
  --green-border: #8eb99c;

  /* Typography */
  --font-sans: 'Instrument Sans', 'Instrument Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout & Spacing */
  --container: 1200px;
  --touch-min: 44px;
  --cta-min: 48px;
  --header-h: 64px;

  /* Phase 4D.5b Softened Bold Rounded Radii */
  --radius-pill: 999px;
  --radius-card-lg: 22px;
  --radius-preview: 20px;
  --radius-card: 16px;
  --radius-alert: 14px;
  --radius-field: 14px;
  --radius-frame: 14px;
  --radius-bleed: 0px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur-base: 180ms;

  font-family: var(--font-sans);
  font-optical-sizing: auto;
  color: var(--brown);
  background: var(--cream);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
  background: var(--cream);
  color: var(--brown);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a,
select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
}

button:hover:not(:disabled) {
  border-color: var(--brown);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 3px;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

.tabular-num {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  .category-card-trigger,
  .product-showcase-card,
  .combo-preview-card {
    transition: background-color var(--dur-fast) var(--ease-out),
      border-color var(--dur-fast) var(--ease-out),
      color var(--dur-fast) var(--ease-out),
      opacity var(--dur-fast) var(--ease-out),
      transform var(--dur-base) var(--ease-out);
  }
}

@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled) {
    transform: none;
  }
}

/* ==================== GLOBAL PROMO STRIP & SITE HEADER ==================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.global-promo-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  padding: 6px 14px;
  background: var(--brown);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
}

.global-promo-sep {
  opacity: 0.55;
}

.global-promo-sub {
  color: var(--pink);
  font-weight: 500;
}

.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
}

.brand-logo img {
  display: block;
  width: 90px;
  height: auto;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.nav-link {
  border: 0;
  padding: 8px 4px;
  min-height: var(--touch-min);
  min-width: var(--touch-min);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  position: relative;
}

.nav-link:hover:not(:disabled),
.nav-link[aria-current='page'] {
  color: var(--brown);
  border-color: transparent;
}

.nav-link[aria-current='page'] {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  flex-shrink: 0;
}

.nav-link--experience {
  color: var(--brown);
  font-weight: 600;
}

.header-action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-cta,
.header-resume,
.header-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
}

.header-cta {
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
}

.header-cta:hover:not(:disabled) {
  background: var(--brown-hover);
  border-color: var(--brown-hover);
}

.header-resume {
  background: var(--pink);
  color: var(--brown);
  border: 1.5px solid var(--brown);
}

.header-resume:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

.header-cart {
  gap: 6px;
  min-width: var(--touch-min);
  padding: 8px 10px 8px 14px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
}

.header-cart:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--pink-soft);
}

.header-cart.has-items {
  background: var(--pink-soft);
  border-color: var(--brown);
}

.header-cart[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.header-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--brown);
  color: var(--cream);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

.header-cart[aria-current='page'] .header-cart-count {
  background: var(--pink);
  color: var(--brown);
}

.mobile-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 8px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--brown);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-nav-toggle[aria-expanded='true'] {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.mobile-nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  width: 15px;
}

.mobile-nav-toggle-bars span {
  display: block;
  width: 100%;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav-drawer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 12px 16px 16px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--container);
  margin: 0 auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: var(--touch-min);
  padding: 10px 18px;
  text-align: left;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--brown);
  font-size: 14px;
  font-weight: 500;
}

.mobile-nav-link[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
  font-weight: 600;
}

.mobile-nav-link--experience {
  background: var(--pink-soft);
  border-color: var(--brown);
  font-weight: 600;
}

.mobile-nav-link--experience small {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--brown);
  border: 1px solid var(--brown);
}

.mobile-nav-link--experience[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
}

.mobile-nav-link--experience[aria-current='page'] small {
  background: var(--pink);
  color: var(--brown);
  border-color: var(--pink);
}

.mobile-nav-link--cart {
  font-weight: 600;
}

@media (min-width: 820px) {
  .site-header-inner {
    padding: 13px 32px;
    gap: 28px;
  }

  .brand-logo img {
    width: 110px;
  }

  .site-nav {
    display: flex;
  }

  .mobile-nav-toggle,
  .mobile-nav-drawer {
    display: none !important;
  }

  .header-cta,
  .header-resume {
    padding: 10px 20px;
  }
}

/* ==================== MAIN CONTAINER & SHARED BUTTON LANGUAGE ==================== */

.app-main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 16px 64px;
  min-width: 0;
}

@media (min-width: 820px) {
  .app-main {
    padding: 40px 32px 88px;
  }
}

.editorial-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Primary CTA — Bold Rounded (999px) */
.btn-editorial-primary,
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--cta-min);
  padding: 13px 26px;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.btn-editorial-primary:hover:not(:disabled),
.primary:hover:not(:disabled) {
  background: var(--brown-hover);
  border-color: var(--brown-hover);
}

/* Secondary CTA — Bold Rounded Outline (999px) */
.btn-editorial-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--cta-min);
  padding: 12px 24px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.btn-editorial-secondary:hover:not(:disabled) {
  background: var(--pink-soft);
  border-color: var(--brown);
}

/* Tertiary / Link Action */
.btn-editorial-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 8px 4px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  white-space: nowrap;
}

.btn-editorial-link:hover:not(:disabled) {
  color: var(--muted);
  border-color: transparent;
}

.text-button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  padding: 6px 2px;
  min-height: var(--touch-min);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brown);
  border-radius: var(--radius-pill);
}

.text-button:hover:not(:disabled) {
  color: var(--muted);
  border-color: transparent;
}

/* ==================== DRAFT RECOVERY & CATALOG ERROR BANNERS ==================== */

.resume-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
}

.resume-bar-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 220px;
}

.resume-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.resume-bar-copy strong {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--brown);
}

.resume-bar-note {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
}

.resume-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.resume-bar-action {
  min-height: var(--touch-min);
  padding: 10px 18px;
  background: var(--pink);
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.resume-bar-action:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

.resume-bar-secondary {
  min-height: var(--touch-min);
  padding: 10px 16px;
  background: var(--cream);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.resume-bar-secondary:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--paper);
}

.catalog-error-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: var(--red-soft);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-card);
  color: var(--brown);
}

.catalog-error-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 240px;
}

.catalog-error-copy strong {
  font-size: 14px;
  color: var(--red);
}

.catalog-error-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--brown);
}

.catalog-retry-btn {
  min-height: var(--touch-min);
  flex-shrink: 0;
}

/* ==================== REPLACEABLE PHOTOGRAPHY CONTAINERS ==================== */

.editorial-media {
  margin: 0;
  width: 100%;
  min-width: 0;
}

.photo-slot-frame {
  position: relative;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  overflow: hidden;
}

.photo-slot-frame--blush {
  background: var(--pink-soft);
  border-color: var(--pink-border);
}

.photo-slot-frame--hero,
.photo-slot-frame--category {
  aspect-ratio: 16 / 10;
}

.photo-slot-frame--product {
  aspect-ratio: 4 / 3;
}

.photo-slot-frame--example {
  aspect-ratio: 4 / 3;
  padding: 12px;
}

.photo-slot-frame::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(34, 22, 19, 0.16);
  pointer-events: none;
}

.photo-slot-frame--example::before {
  inset: 7px;
}

.photo-slot-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.photo-slot-ratio {
  font-variant-numeric: tabular-nums;
  color: var(--brown);
}

.photo-slot-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
  max-width: 28ch;
}

.photo-slot-caption strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.25;
}

.photo-slot-caption span,
.photo-slot-hint {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

@media (min-width: 820px) {
  .photo-slot-frame {
    padding: 20px;
  }

  .photo-slot-frame--example {
    padding: 14px;
  }

  .photo-slot-frame--hero,
  .photo-slot-frame--category {
    aspect-ratio: 4 / 5;
  }
}

/* ==================== VIEW 1: EDITORIAL HOME ==================== */

.editorial-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-bottom: 28px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(36px, 10.5vw, 72px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
  max-width: 11ch;
}

.hero-lead {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 22px;
}

.hero-promo-note {
  display: inline-flex;
  align-items: center;
  margin: 16px 0 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  border: 1px solid var(--pink-border);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brown);
}

@media (min-width: 820px) {
  .editorial-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
    align-items: stretch;
    padding-bottom: 56px;
  }

  .hero-lead {
    font-size: 16px;
    margin-top: 20px;
  }

  .hero-actions {
    margin-top: 28px;
  }
}

/* Mix & Match Editorial Band */

.mix-match-editorial {
  scroll-margin-top: 76px;
  padding: 24px 16px;
  background: var(--pink);
  border: 1px solid var(--pink-border);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mix-match-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: end;
}

.mix-match-copy {
  min-width: 0;
}

.mix-match-copy .editorial-kicker {
  color: var(--brown);
  opacity: 0.85;
  margin-bottom: 8px;
}

.mix-match-copy h2 {
  margin: 0;
  font-size: clamp(26px, 7.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
  max-width: 18ch;
}

.mix-match-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--brown);
  opacity: 0.92;
  max-width: 52ch;
}

.mix-match-rule {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--brown);
}

.mix-match-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.mix-match-note {
  font-size: 12px;
  color: var(--brown);
  opacity: 0.84;
}

.mix-examples {
  padding-top: 18px;
  border-top: 1px solid rgba(34, 22, 19, 0.16);
  min-width: 0;
}

.mix-examples-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brown);
  opacity: 0.88;
}

.mix-examples-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(175px, 68%);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.mix-example-item {
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.mix-example-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.3;
}

@media (min-width: 680px) {
  .mix-examples-track {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: unset;
    overflow-x: visible;
    gap: 16px;
    padding-bottom: 0;
  }
}

@media (min-width: 820px) {
  .mix-match-editorial {
    padding: 40px 44px;
    gap: 28px;
  }

  .mix-match-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
  }

  .mix-match-cta-block {
    align-items: flex-end;
  }
}

/* Home Categories Section */

.editorial-section {
  scroll-margin-top: 76px;
  padding: 36px 0 8px;
}

.section-intro {
  margin-bottom: 20px;
}

.section-intro-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-intro h2 {
  margin: 0;
  font-size: clamp(24px, 6.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
}

.section-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 44ch;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.category-card {
  min-width: 0;
}

.category-card-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-frame);
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-card-trigger:active:not(:disabled) {
  transform: none;
}

.category-card-trigger:hover .photo-slot-frame {
  border-color: var(--brown);
}

.category-card-trigger:hover .category-card-cta {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.category-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.category-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.category-card-body h3 {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.category-card-items {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.category-card-cta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
}

@media (min-width: 820px) {
  .editorial-section {
    padding: 64px 0 16px;
  }

  .section-intro {
    margin-bottom: 36px;
  }

  .section-intro-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }

  .category-card-body h3 {
    font-size: 24px;
  }
}

/* ==================== VIEW NAV BAR & BREADCRUMBS ==================== */

.view-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 8px 2px;
  min-height: var(--touch-min);
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
  border-radius: var(--radius-pill);
}

.back-link:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
  border-color: transparent;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb-btn {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 4px 2px;
  min-height: var(--touch-min);
  font-size: 12px;
  color: var(--muted);
  border-radius: var(--radius-pill);
}

.breadcrumb-btn:hover:not(:disabled) {
  color: var(--brown);
  text-decoration: underline;
  text-underline-offset: 3px;
  border-color: transparent;
}

/* ==================== VIEW 2: CATEGORY & PRODUCT SELECTION ==================== */

.category-header {
  margin-bottom: 32px;
  max-width: 60ch;
}

.category-header h1 {
  margin: 0;
  font-size: clamp(32px, 8.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.03;
  text-wrap: balance;
}

.category-lead {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.product-showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 820px) {
  .product-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
  }
}

.product-showcase-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  min-width: 0;
}

.product-showcase-card .photo-slot-frame {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.product-showcase-body {
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

@media (min-width: 820px) {
  .product-showcase-body {
    padding: 26px 26px 28px;
  }
}

.product-showcase-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--muted);
}

.product-showcase-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.product-showcase-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.product-showcase-price {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-showcase-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.dog-size-group {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.dog-size-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.dog-size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dog-size-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px 10px;
  background: var(--cream);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  text-align: center;
  min-width: 0;
}

.dog-size-option:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--pink-soft);
}

.dog-size-option strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.dog-size-option small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}

.dog-size-option[aria-pressed='true'] {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.dog-size-option[aria-pressed='true'] small {
  color: rgba(247, 242, 232, 0.86);
}

.product-showcase-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-showcase-actions .btn-editorial-primary {
  width: 100%;
}

.product-draft-note {
  margin: 0;
  font-size: 12px;
  color: var(--brown);
  font-weight: 500;
}

/* ==================== VIEW 3: MIX & MATCH PRODUCT PAIR PICKER ==================== */

.combo-picker-header {
  max-width: 60ch;
  margin-bottom: 22px;
}

.combo-picker-header h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.combo-slots-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.combo-slot-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
  text-align: left;
  min-width: 0;
  width: 100%;
}

.combo-slot-pill[aria-pressed='true'] {
  background: var(--pink);
  border-color: transparent;
  box-shadow: none;
}

.combo-slot-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.combo-slot-pill[aria-pressed='true'] .combo-slot-index {
  color: var(--brown);
}

.combo-slot-pill strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
}

.combo-slot-pill small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
  max-width: 100%;
}

.combo-slot-pill[aria-pressed='true'] small {
  color: var(--brown);
}

.combo-quick-pairs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 0;
  margin-bottom: 18px;
  border-block: 1px solid var(--line);
}

.combo-quick-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.combo-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.combo-quick-btn {
  padding: 8px 15px;
  min-height: var(--touch-min);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--brown);
}

.combo-quick-btn:hover:not(:disabled) {
  background: var(--pink);
  border-color: var(--brown);
}

.combo-product-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.combo-category-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.combo-category-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.combo-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.combo-product-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 15px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  text-align: left;
  min-width: 0;
  width: 100%;
  min-height: 112px;
}

.combo-product-option:active:not(:disabled) {
  transform: none;
}

.combo-product-option:hover:not(:disabled) {
  border-color: var(--brown);
}

.combo-product-option.is-active-pick {
  border-color: transparent;
  box-shadow: none;
  background: var(--pink-soft);
}

.combo-option-top {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.combo-option-price {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
}

.combo-product-option strong {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.combo-product-option small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.combo-size-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.combo-size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 7px 9px;
  background: var(--cream);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  text-align: center;
  min-width: 0;
  width: 100%;
}

.combo-size-btn:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--pink);
}

.combo-size-btn.is-active-pick,
.combo-size-btn[aria-pressed='true'] {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}

.combo-size-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
}

.combo-size-mark {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--brown);
  color: var(--cream);
}

.combo-size-mark.is-secondary {
  background: var(--pink);
  color: var(--brown);
}

.combo-size-btn.is-active-pick .combo-size-mark {
  background: var(--pink);
  color: var(--brown);
}

.combo-size-meta {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
}

.combo-size-btn.is-active-pick .combo-size-meta {
  color: rgba(247, 242, 232, 0.88);
}

.combo-option-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 2px;
}

.combo-option-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-pill);
}

.combo-option-badge.is-secondary {
  background: var(--pink);
  color: var(--brown);
}

.combo-picker-footer {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin: 22px -16px 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1.5px solid var(--brown);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.combo-picker-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 220px;
}

.combo-picker-savings-pill {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 600;
  background: var(--pink);
  color: var(--brown);
  border: 1px solid var(--brown);
  border-radius: var(--radius-pill);
}

#combo-picker-hint {
  font-size: 13px;
  color: var(--muted);
}

#combo-picker-estimate {
  font-size: 15px;
  font-weight: 600;
  color: var(--brown);
}

.combo-picker-footer .btn-editorial-primary {
  min-height: var(--cta-min);
}

@media (min-width: 640px) {
  .combo-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .combo-picker-footer {
    margin: 24px 0 0;
    padding: 16px 20px;
    border: 1.5px solid var(--brown);
    border-radius: var(--radius-card);
  }
}

@media (min-width: 820px) {
  .combo-category-grid {
    gap: 14px;
  }

  .combo-slots-bar {
    gap: 14px;
    max-width: 680px;
  }
}

/* ==================== VIEW 4: CUSTOMIZER WORKBENCH (SINGLE & MIX & MATCH) ==================== */

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.workbench.is-combo {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 24px;
}

@media (min-width: 1024px) {
  .workbench {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
  }

  .workbench.is-combo {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    gap: 36px;
  }
}

/* Mix & Match Dual-Preview Sticky Stage (Simplified: cards are the single switcher) */

.combo-stage {
  position: sticky;
  top: calc(var(--header-h, 74px) + 12px);
  min-width: 0;
}

.combo-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.combo-stage-helper {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  min-width: 0;
}

.combo-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.combo-preview-card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.combo-preview-card[aria-current='true'] {
  border-color: var(--brown);
  opacity: 1;
}

.combo-preview-card[aria-current='false'] {
  cursor: pointer;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  opacity: 1;
}

.combo-preview-card[aria-current='false']:hover {
  border-color: var(--brown);
  opacity: 1;
}

.combo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-tint);
  min-width: 0;
}

.combo-preview-card[aria-current='true'] .combo-card-head {
  background: var(--pink);
  border-bottom-color: rgba(34, 22, 19, 0.25);
}

.combo-card-switch {
  border: 0;
  padding: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-frame);
}

.combo-card-switch:active:not(:disabled) {
  transform: none;
}

.combo-card-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.combo-preview-card[aria-current='true'] .combo-card-num {
  border-color: var(--brown);
  background: var(--brown);
  color: var(--cream);
}

.combo-card-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.combo-card-price {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.combo-preview-box {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.combo-preview-box > svg {
  width: 100%;
  height: 100%;
  display: block;
}

.combo-preview-card[aria-current='true'] .combo-preview-box [data-piece] {
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.combo-preview-box.is-dragging,
.combo-preview-box.is-dragging [data-piece] {
  touch-action: none;
  cursor: grabbing;
}

.combo-preview-box.is-dragging [data-piece] {
  pointer-events: none;
}

.combo-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  min-width: 0;
}

.combo-card-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.combo-card-state {
  font-weight: 600;
  font-size: 10.5px;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--brown);
}

.combo-preview-card[aria-current='true'] .combo-card-state {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
  letter-spacing: 0.01em;
}

.combo-stage-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin: 10px 2px 0;
}

/* Mix & Match Shared Copy Utility */

.combo-active-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.combo-copy-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.combo-utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.combo-copy-btn {
  min-height: var(--touch-min);
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--pink);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  color: var(--brown);
}

.combo-copy-btn:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

.combo-copy-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.combo-undo-bar:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  color: var(--brown);
}

.combo-undo-btn {
  padding: 7px 14px;
  min-height: var(--touch-min);
  font-size: 12px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.combo-undo-btn:hover:not(:disabled) {
  background: var(--pink);
  color: var(--brown);
}

.combo-discount-line {
  color: var(--green);
  font-weight: 600;
}

/* Single-Product Visual Panel */

.selected-product-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.selected-product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.selected-product-info strong {
  font-size: 15px;
  font-weight: 600;
}

.selected-product-info span {
  font-size: 13px;
  color: var(--muted);
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.visual-panel {
  position: sticky;
  top: calc(var(--header-h, 74px) + 12px);
  scroll-margin-top: 85px;
  min-width: 0;
}

.preview-top {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  font-weight: 600;
  font-size: 14px;
}

.preview-top-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preview-top-meta > #preview-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-count-inline {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.preview-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.preview-expand-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  color: var(--brown);
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-expand-btn:hover:not(:disabled) {
  background: var(--pink);
  border-color: var(--brown);
}

.tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.preview {
  aspect-ratio: 1 / 1;
  background: var(--paper);
  border-inline: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.preview > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.preview [data-piece],
.expanded-preview [data-piece] {
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.preview.is-dragging,
.preview.is-dragging [data-piece],
.expanded-preview.is-dragging,
.expanded-preview.is-dragging [data-piece] {
  touch-action: none;
  cursor: grabbing;
}

.preview.is-dragging [data-piece],
.expanded-preview.is-dragging [data-piece] {
  pointer-events: none;
}

.piece-in-hand {
  filter: drop-shadow(0 6px 10px rgba(34, 22, 19, 0.32));
}

/* OPT-07: Keyboard roving-tabindex focus ring on SVG pieces */
[data-piece]:focus {
  outline: none;
}

[data-piece]:focus-visible [data-focus-ring] {
  opacity: 1;
  stroke: var(--brown);
  stroke-width: 3;
}

.preview-bottom {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.preview-ready {
  color: var(--muted);
  font-size: 11.5px;
}

.photo-loading-indicator {
  margin: 6px auto 2px;
  padding: 4px 12px;
  width: fit-content;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  text-align: center;
}

.visual-note {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 10px 4px;
}

.gesture-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 4px;
}

.quick-preview {
  width: 100%;
  min-height: var(--touch-min);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
}

.return-builder {
  width: 100%;
  min-height: var(--touch-min);
  background: var(--pink);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.piece-editor {
  padding: 12px 0;
}

.piece-editor summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  list-style: none;
}

.piece-editor summary::-webkit-details-marker {
  display: none;
}

.piece-editor summary::before {
  content: '+';
  font-weight: 700;
  color: var(--brown);
}

.piece-editor[open] summary::before {
  content: '−';
}

.piece-editor[open] summary {
  margin-bottom: 10px;
  color: var(--brown);
}

.piece-editor select {
  margin: 10px 0;
}

.edit-actions {
  display: flex;
  gap: 10px;
}

.edit-actions button {
  flex: 1;
  min-height: var(--touch-min);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.section-line {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  line-height: 1.5;
}

/* ==================== BUILDER STEPS & FORM CONTROLS ==================== */

.builder {
  min-width: 0;
}

.step {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.step:first-of-type {
  padding-top: 0;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-number {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--brown);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
  align-items: end;
}

.fields > label {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.fields > [hidden] {
  display: none !important;
}

.fields.compact,
#color-combination {
  grid-template-columns: 1fr;
  margin: 14px 0;
}

/* Single-line inputs & selects: Bold Rounded capsule */
input,
select {
  width: 100%;
  min-width: 0;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  min-height: var(--cta-min);
  font-size: 14px;
  color: var(--brown);
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--brown);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brown);
}

/* Multi-line textarea: restrained comfortable radius */
textarea {
  width: 100%;
  min-width: 0;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-field);
  padding: 12px 14px;
  min-height: 48px;
  font-size: 13px;
  color: var(--brown);
}

input::placeholder {
  color: #8f776a;
}

.note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 12px 0 0;
}

.inventory-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.inventory-line .note {
  margin: 0;
}

#inventory-status[data-state='error'] {
  color: var(--red);
  font-weight: 600;
}

.inventory-line .text-button {
  font-size: 12px;
}

/* ==================== SEGMENTED CONTROLS (BOLD ROUNDED CAPSULE LANGUAGE) ==================== */

.tactile-controls-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.control-block[hidden] {
  display: none !important;
}

.control-block--pattern {
  margin-top: 12px;
}

.control-block--charm-filter {
  margin: 12px 0 4px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown);
  letter-spacing: 0.01em;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  padding: 4px;
  background: var(--paper-tint);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.segmented-control--sizes,
.segmented-control--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 9px 12px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  text-align: center;
  line-height: 1.2;
  min-width: 0;
}

.seg-btn--stack {
  flex-direction: column;
  gap: 2px;
  padding: 7px 6px;
}

.seg-btn--stack strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.1;
}

.seg-btn--stack small {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.seg-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--paper);
}

.seg-btn[aria-checked='true'],
.seg-btn[aria-pressed='true'] {
  background: var(--brown);
  border-color: var(--brown);
  color: var(--cream);
}

.seg-btn[aria-checked='true'] small,
.seg-btn[aria-pressed='true'] small {
  color: rgba(247, 242, 232, 0.88);
}

/* Compatibility notice */

.compat-notice:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--amber-soft);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--brown);
}

.compat-notice p {
  margin: 0;
}

.compat-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compat-undo-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
}

.compat-undo-btn:hover:not(:disabled) {
  background: var(--pink);
  color: var(--brown);
}

.compat-dismiss-btn {
  min-height: var(--touch-min);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

/* ==================== COLOR STUDIO: PALETTE, SWATCHES & CONTEXTUAL BEAD BAR ==================== */

.empty-design-guide {
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--pink-soft);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
}

.empty-design-guide strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 3px;
}

.empty-design-guide p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--brown);
}

.bead-context-bar:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--pink-soft);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
}

.bead-context-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 140px;
}

.bead-context-thumb {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.bead-thumb-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ctx-letter-badge {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-frame);
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
}

.bead-context-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.bead-context-copy strong {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bead-context-copy span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bead-context-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ctx-btn {
  min-height: var(--touch-min);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  color: var(--brown);
  white-space: nowrap;
}

.ctx-btn:hover:not(:disabled) {
  background: var(--pink);
}

.ctx-btn--done {
  background: var(--brown);
  color: var(--cream);
}

.ctx-btn--done:hover:not(:disabled) {
  background: var(--brown-hover);
  color: var(--cream);
}

.editing-bead-banner:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--pink);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
}

.editing-bead-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.editing-bead-banner-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
}

.editing-bead-banner-copy span {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--brown);
}

.editing-bead-exit {
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.palette-tray {
  margin: 14px 0 12px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.palette-tray-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.palette-tray-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.palette-tray-title strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.palette-tray-title span {
  font-size: 12px;
  color: var(--muted);
}

.palette-tray-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.palette-tray-actions .text-button {
  min-height: var(--touch-min);
  padding: 2px 0;
  font-size: 12px;
}

.palette-tray-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.palette-tray-empty {
  font-size: 12px;
  color: var(--muted);
}

.palette-tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 8px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12px;
  max-width: 100%;
}

.palette-tray-chip.is-sold-out {
  border-color: var(--red);
}

.palette-tray-chip.is-unverified {
  border-style: dashed;
}

.palette-tray-thumb {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.palette-tray-name {
  font-weight: 500;
  color: var(--brown);
  line-height: 1.2;
}

.palette-tray-remove {
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brown);
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
}

.palette-tray-remove:hover:not(:disabled) {
  background: var(--pink);
}

.palette-subhead {
  margin-top: 8px;
}

.palette {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 12px;
  margin: 16px 0 22px;
}

.palette-stock-legend {
  margin: 6px 0;
}

.swatch {
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line-strong);
  position: relative;
  background: var(--swatch);
}

.swatch[aria-pressed='true'] {
  box-shadow: 0 0 0 2.5px var(--brown);
}

.swatch:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 3px;
}

.swatch.selected-color::after {
  content: '✓';
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  color: var(--mark);
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 1px #0002;
}

.swatch.stock-pending {
  border: 2px dashed var(--brown);
}

.sold-out-badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--brown);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--brown);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.unverified-badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px dashed var(--brown);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--brown);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* Sold-out materials preserve their real color/photography at full opacity */
.swatch.stock-unavailable:disabled,
.charm-card:disabled:has(.sold-out-badge) {
  opacity: 1;
}

.swatch .sold-out-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  font-size: 9.5px;
  padding: 1px 6px;
  pointer-events: none;
}

.stock-guide {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stock-guide #stock-message {
  color: var(--brown);
}

.stock-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.stock-suggestions button {
  font-size: 12.5px;
  font-weight: 600;
  min-height: var(--touch-min);
  padding: 8px 16px;
  background: var(--pink);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  color: var(--brown);
}

.stock-suggestions button:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

/* ==================== LETTERS & CHARMS ==================== */

.letter-controls-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: end;
}

.letter-live-cost {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
}

.letter-feedback:not([hidden]) {
  margin: 8px 0 0;
  padding: 9px 12px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-card);
  font-size: 12px;
  line-height: 1.4;
  color: var(--brown);
}

.unavailable-letters-note {
  margin: 8px 0 6px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--brown);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.unavailable-letters-note[data-tone='sold-out'] {
  background: var(--pink-soft);
  border-color: var(--brown);
}

.unavailable-letters-note[data-tone='unverified'] {
  border-style: dashed;
}

.charm-slot-status {
  margin: 0 0 10px;
  padding: 9px 12px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--brown);
}

.charm-replace-banner:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 10px 0;
  padding: 9px 12px;
  background: var(--pink);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--brown);
}

.charm-step-hint {
  margin-top: 10px;
}

.charm-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.charm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--paper);
  border: 1.5px solid var(--line);
  padding: 9px 6px;
  gap: 4px;
  min-height: 92px;
  min-width: 0;
  border-radius: var(--radius-card);
}

.charm-card:active:not(:disabled) {
  transform: none;
}

.charm-card > svg {
  width: 40px;
  height: 40px;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.charm-card strong {
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: break-word;
  max-width: 100%;
}

.charm-card small {
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
}

.charm-card[aria-pressed='true'] {
  border: 2px solid var(--brown);
  background: var(--pink);
  padding: 8px 5px;
}

.charm-card[aria-pressed='true'] small {
  color: var(--brown);
}

.charm-card .sold-out-badge {
  color: var(--brown);
  font-size: 10px;
}

.charm-gallery.has-model {
  grid-template-columns: 1fr;
}

.charm-gallery.has-model .charm-card {
  flex-direction: row;
  text-align: left;
  min-height: 54px;
  gap: 12px;
  padding: 10px 14px;
}

.charm-gallery.has-model .charm-card small {
  margin-left: auto;
}

.charm-gallery-heading {
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 0;
}

#charm-variant-panel {
  scroll-margin: 24px;
}

#change-charm-model {
  margin-top: 8px;
  font-size: 12.5px;
}

.charm-choice {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  padding: 14px;
  margin-top: 14px;
  border-radius: var(--radius-card);
}

.charm-choice #charm-icon {
  width: 48px;
  height: 48px;
}

.charm-choice #charm-icon > svg {
  width: 100%;
  height: 100%;
}

.charm-choice strong {
  font-size: 13.5px;
}

.charm-choice p {
  margin-top: 3px;
}

.charm-choice button {
  min-height: var(--touch-min);
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.charm-choice button:hover:not(:disabled) {
  background: var(--brown-hover);
}

.selected-charms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.charm-chip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: var(--pink);
  border: 1px solid rgba(34, 22, 19, 0.25);
  padding: 4px 6px 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  max-width: 100%;
}

.charm-chip-label {
  font-weight: 600;
  color: var(--brown);
}

.charm-chip-replace {
  padding: 6px 12px;
  min-height: var(--touch-min);
  font-size: 12px;
  font-weight: 600;
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  color: var(--brown);
}

.charm-chip-replace:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

.charm-chip-remove {
  padding: 2px;
  border: 0;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  font-size: 18px;
  line-height: 1;
  color: var(--brown);
  background: transparent;
  border-radius: 50%;
}

.charm-chip-remove:hover:not(:disabled) {
  background: rgba(34, 22, 19, 0.08);
}

/* ==================== EXPANDED DETAIL PREVIEW MODAL ==================== */

body.is-expand-open {
  overflow: hidden;
}

.expand-modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.expand-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 22, 19, 0.56);
}

.expand-modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
}

.expand-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.expand-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.expand-modal-heading strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.expand-modal-heading span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.expand-close-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.expanded-preview {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-height: min(54dvh, 460px);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.expanded-preview > svg {
  width: 100%;
  height: 100%;
  display: block;
}

.expand-modal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--pink-soft);
  border-bottom: 1px solid var(--line);
}

.expand-modal-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
}

.expand-modal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.expand-palette-wrap {
  padding: 10px 14px 14px;
  background: var(--cream);
}

.expand-palette-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.expand-quick-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 12px;
  padding-bottom: 10px;
}

/* ==================== TOTALS, POST-ADD CONFIRMATION & ACTIONABLE ERRORS ==================== */

.total-section {
  padding: 24px 0;
}

.total-section .section-line {
  margin: 8px 0;
  font-size: 14px;
}

.total-line {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.total-line strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.customizer-promo-note {
  margin: 12px 0;
  padding: 9px 13px;
  background: var(--pink-soft);
  border: 1px solid var(--pink-border);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--brown);
}

.total-section .primary {
  margin-top: 14px;
  width: 100%;
}

.customizer-secondary-action {
  width: 100%;
  min-height: var(--touch-min);
  margin-top: 10px;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.customizer-secondary-action:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--cream);
}

.cart-added-confirm:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 14px;
  background: var(--green-soft);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-card);
  color: var(--green-deep);
}

.cart-added-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cart-added-copy strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.cart-added-copy p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: inherit;
}

.cart-added-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cart-added-actions button {
  min-height: var(--touch-min);
  padding: 9px 12px;
  font-size: 12.5px;
  white-space: nowrap;
}

.center {
  text-align: center;
}

#errors {
  font-size: 12.5px;
  color: var(--red);
  line-height: 1.5;
}

#errors p {
  margin: 8px 0;
}

.error-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--pink-soft);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-card);
}

.error-item p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--brown);
  flex: 1 1 180px;
}

.error-action-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.error-action-btn:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

.empty-preview {
  padding: 30px;
  text-align: center;
  max-width: 380px;
}

.empty-preview h2 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 20px 0;
}

.empty-preview p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.loading {
  font-size: 14px;
  color: var(--muted);
}

.mobile-order-bar {
  display: none;
}

/* ==================== VIEW 5: MI BOLSA, ORDER REVIEW & WHATSAPP CHECKOUT ==================== */

.view-review {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0;
}

.review-header {
  max-width: 60ch;
  margin-bottom: 20px;
}

.review-header h1 {
  margin: 10px 0 0;
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.review-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.cart-discount-banner:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: var(--radius-card);
  background: var(--pink-soft);
  border: 1.5px solid var(--brown);
  color: var(--brown);
}

.cart-discount-banner[data-tone='celebrate'] {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-deep);
}

.cart-discount-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-discount-copy strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.cart-discount-copy p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: inherit;
}

.cart-discount-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.review-empty-cart:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 28px 22px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.review-empty-cart h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.review-empty-cart p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 48ch;
}

.review-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.review-quick-summary:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.review-quick-totals {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.review-quick-meta {
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--muted);
}

.review-quick-totals strong {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.review-quick-cta {
  min-height: var(--touch-min);
  padding: 10px 18px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.review-alert {
  background: var(--red-soft);
  border: 1.5px solid var(--red-border);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-alert-body strong {
  display: block;
  font-size: 14px;
  color: var(--red);
  margin-bottom: 6px;
}

#review-errors p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--brown);
}

.review-alert-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.review-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.review-items-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.review-checkout-column {
  scroll-margin-top: calc(var(--header-h, 74px) + 14px);
}

.review-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.review-items.is-combo {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-combo-group {
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.review-combo-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.review-combo-group-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.review-combo-group-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.review-combo-group-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.review-price-tag {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
  margin-right: 4px;
}

.review-combo-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-preview-tile {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-frame);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.review-preview-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  background: var(--paper-tint);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
}

.review-preview-tile-head span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.review-preview-tile-head span:last-child {
  white-space: nowrap;
  flex-shrink: 0;
}

.review-preview-tile .review-item-preview {
  border-bottom: 0;
}

.review-preview-tile-cap {
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.review-item-card {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.review-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-tint);
}

.review-item-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.review-item-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.review-item-price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.review-item-preview {
  background: var(--paper);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.review-item-preview > svg {
  width: 100%;
  height: 100%;
  display: block;
}

.review-spec-list {
  margin: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.review-spec-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.review-spec-row dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.review-spec-row dd {
  margin: 0;
  color: var(--brown);
  text-align: right;
  word-break: break-word;
  min-width: 0;
}

.review-spec-row--price {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.review-item-foot {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.review-edit-btn {
  min-height: var(--touch-min);
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
}

.review-item-foot .review-edit-btn {
  width: auto;
  flex: 1 1 120px;
}

.review-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 9px 15px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 1 auto;
}

.review-mini-btn:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--cream);
}

.review-mini-btn--danger {
  color: var(--red);
  border-color: var(--red-border);
}

.review-mini-btn--danger:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.cart-continue-bar:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
}

.cart-continue-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-continue-copy strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
}

.cart-continue-copy span {
  font-size: 12.5px;
  color: var(--muted);
}

.cart-continue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

/* Order Summary & Simplified WhatsApp Checkout Card */

.review-summary-card {
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-card-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.review-pricing {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.review-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.review-price-row--sub {
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
}

.review-price-row--discount {
  color: var(--green);
  font-weight: 600;
}

.review-price-row--total {
  padding-top: 10px;
  border-top: 1px solid var(--line-strong);
  font-size: 16px;
}

.review-price-row--total strong:last-child {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.review-whatsapp-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-whatsapp-instruction {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.review-config-note {
  margin: 0;
  padding: 11px 13px;
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-card);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--brown);
}

.review-whatsapp-cta {
  width: 100%;
  min-height: 52px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.review-multisheet-bar:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
}

.review-multisheet-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--brown);
}

.review-multisheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-sheet-action-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 12.5px;
}

.review-sheet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-sheet-chip {
  min-height: var(--touch-min);
  padding: 7px 14px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.review-sheet-chip:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--pink-soft);
}

.review-checkout-status:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--line-strong);
  background: var(--cream);
}

.review-checkout-status[data-tone='success'] {
  background: var(--green-soft);
  border-color: var(--green-border);
  color: var(--green-deep);
}

.review-checkout-status[data-tone='warning'] {
  background: var(--amber-soft);
  border-color: var(--amber-border);
  color: var(--amber-text);
}

.review-checkout-status p {
  margin: 0;
  font-weight: 500;
}

.review-contextual-actions:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.review-contextual-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 8px 18px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.review-contextual-btn:hover:not(:disabled) {
  background: var(--pink-soft);
}

.review-contextual-btn--emphasis {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

.review-contextual-btn--emphasis:hover:not(:disabled) {
  background: var(--brown-hover);
  border-color: var(--brown-hover);
}

.review-direct-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 8px 18px;
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
}

.review-direct-link:hover {
  background: var(--brown-hover);
}

.review-help-details {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.review-help-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch-min);
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.review-help-details > summary::-webkit-details-marker {
  display: none;
}

.review-help-details > summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1;
}

.review-help-details[open] > summary {
  color: var(--brown);
  font-weight: 600;
}

.review-help-details[open] > summary::after {
  content: '−';
}

.review-help-body {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-help-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  padding: 8px 15px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
}

.review-help-action:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--cream);
}

.order-details {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch-min);
  cursor: pointer;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  list-style: none;
}

.order-details summary::-webkit-details-marker {
  display: none;
}

.order-details summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 600;
  color: var(--brown);
}

.order-details[open] summary {
  color: var(--brown);
  font-weight: 600;
}

.order-details[open] summary::after {
  content: '−';
}

.order-details textarea {
  margin-top: 8px;
  width: 100%;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  min-height: 155px;
}

.review-disclaimer {
  margin: 0;
}

@media (min-width: 640px) {
  .review-combo-previews,
  .review-specs-grid {
    gap: 16px;
  }

  .review-specs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-item-head,
  .review-spec-list,
  .review-item-foot {
    padding-inline: 16px;
  }
}

@media (min-width: 768px) {
  .cart-discount-banner:not([hidden]) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
  }

  .cart-continue-bar:not([hidden]) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
  }
}

@media (min-width: 920px) {
  .review-quick-summary:not([hidden]) {
    display: none;
  }

  .review-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.85fr);
    gap: 36px;
  }

  .review-checkout-column {
    position: sticky;
    top: calc(var(--header-h, 74px) + 18px);
  }

  .review-summary-card {
    padding: 26px 24px 28px;
  }
}

/* ==================== SITE FOOTER ==================== */

.site-footer {
  border-top: 1px solid var(--line);
  width: 100%;
  background: var(--cream);
}

.site-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand {
  display: inline-block;
  width: fit-content;
  line-height: 0;
}

.footer-logo {
  display: block;
  width: 96px;
  height: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
}

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

.footer-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 6px 2px;
  min-height: var(--touch-min);
  font-size: 13px;
  font-weight: 500;
  color: var(--brown);
  border-radius: var(--radius-pill);
}

.footer-link:hover:not(:disabled) {
  text-decoration: underline;
  text-underline-offset: 4px;
  border-color: transparent;
}

.footer-tagline {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 820px) {
  .site-footer-inner {
    padding: 36px 32px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-logo {
    width: 108px;
  }
}

/* ==================== TOAST FEEDBACK (BOLD ROUNDED) ==================== */

#toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--brown);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  z-index: 50;
  font-size: 13px;
  font-weight: 500;
  max-width: min(92vw, 440px);
  text-align: center;
}

/* ==================== MOBILE BREAKPOINTS (320px - 767px) ==================== */

@media (max-width: 767px) {
  .workbench,
  .workbench.is-combo {
    display: block;
  }

  .combo-stage {
    position: sticky;
    top: var(--header-h, 64px);
    z-index: 30;
    background: var(--cream);
    border-bottom: 1px solid var(--line-strong);
    margin: 0 -16px 14px;
    padding: 6px 16px 8px;
  }

  .combo-stage-top {
    margin-bottom: 6px;
  }

  .combo-stage-helper {
    font-size: 11px;
    line-height: 1.3;
  }

  .combo-stage-grid {
    gap: 8px;
  }

  .combo-card-head {
    padding: 5px 7px;
  }

  .combo-card-num {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .combo-card-title,
  .combo-card-price {
    font-size: 11px;
  }

  .combo-preview-box {
    aspect-ratio: auto;
    height: 106px;
  }

  .combo-card-foot {
    padding: 4px 7px;
    font-size: 10px;
  }

  .combo-card-state {
    font-size: 9.5px;
    padding: 2px 7px;
  }

  .combo-stage-note {
    display: none;
  }

  /* Compact sticky single-product preview on mobile (OPT-03) */
  .visual-panel {
    position: sticky;
    top: var(--header-h, 64px);
    z-index: 30;
    background: var(--cream);
    border-bottom: 1px solid var(--line-strong);
    margin: 0 -16px 14px;
    padding: 6px 16px 8px;
    scroll-margin-top: 68px;
  }

  .preview-top {
    padding: 6px 10px;
    font-size: 13px;
  }

  .preview-top .tag {
    display: none;
  }

  .preview {
    aspect-ratio: auto;
    height: 148px;
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }

  .preview-bottom,
  .visual-note,
  .gesture-note {
    display: none;
  }

  .bead-context-bar:not([hidden]) {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .bead-context-copy span {
    display: none;
  }

  .builder {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .step {
    padding: 20px 0;
  }

  .fields {
    gap: 10px;
  }

  .letter-controls-grid {
    grid-template-columns: 1fr;
  }

  .charm-choice {
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    padding: 12px;
  }

  .charm-choice #charm-icon {
    width: 40px;
    height: 40px;
  }

  .mobile-order-bar:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 35;
    max-width: 100%;
    background: var(--paper);
    border-top: 1px solid var(--line-strong);
  }

  .mobile-order-guidance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    background: var(--pink-soft);
    border-bottom: 1px solid var(--line-strong);
    min-width: 0;
  }

  #mobile-order-guidance-text {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--brown);
    line-height: 1.3;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .mobile-order-guidance-btn {
    min-height: 36px;
    padding: 6px 12px;
    background: var(--paper);
    color: var(--brown);
    border: 1.5px solid var(--brown);
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-added-confirm:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 12px;
    background: var(--green-soft);
    border-bottom: 1px solid var(--green);
    color: var(--green-deep);
  }

  .mobile-added-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
  }

  .mobile-added-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-added-btn {
    min-height: var(--touch-min);
    padding: 8px 12px;
    background: var(--paper);
    color: var(--brown);
    border: 1.5px solid var(--brown);
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-added-btn--primary {
    background: var(--brown);
    color: var(--cream);
    border-color: var(--brown);
  }

  .mobile-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .mobile-preview {
    min-height: var(--touch-min);
    padding: 9px 14px;
    background: var(--cream);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-price {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    min-width: 0;
    flex: 0 1 auto;
  }

  .mobile-order-bar.is-combo .mobile-price {
    margin-left: 0;
  }

  .mobile-price small {
    font-size: 10.5px;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-price strong {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-order-bar .primary {
    min-height: var(--touch-min);
    padding: 10px 16px;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  body[data-view='customizer'] #toast {
    bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .order-details textarea {
    max-height: 175px;
  }
}

/* Compact phone polish (<= 440px) */
@media (max-width: 440px) {
  .global-promo-sep,
  .global-promo-sub {
    display: none;
  }

  .header-cart {
    padding: 8px 8px 8px 12px;
    gap: 5px;
    font-size: 12.5px;
  }
}

/* Narrow mobile polish (320px - 400px) */
@media (max-width: 400px) {
  .site-header-inner {
    padding: 9px 14px;
    gap: 8px;
  }

  .brand-logo img {
    width: 82px;
  }

  /* Keep ultra-narrow header clean: hero & menu already expose Personalizar */
  #header-cta {
    display: none;
  }

  .header-resume {
    padding: 8px 11px;
    font-size: 12px;
  }

  .mobile-nav-toggle {
    padding: 8px 10px;
  }

  .mobile-nav-toggle-label {
    display: none;
  }

  .app-main {
    padding: 20px 14px 56px;
  }

  .fields {
    grid-template-columns: 1fr;
  }

  .charm-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .product-showcase-body {
    padding: 18px 14px 20px;
  }

  .product-showcase-head h2 {
    font-size: 20px;
  }

  .dog-size-options {
    gap: 6px;
  }

  .dog-size-option {
    padding: 7px 6px;
  }

  .dog-size-option small {
    font-size: 10.5px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-editorial-primary,
  .mix-match-cta-block,
  .mix-match-cta-block .btn-editorial-primary,
  .combo-picker-footer .btn-editorial-primary {
    width: 100%;
  }

  .resume-bar-actions {
    width: 100%;
  }

  .resume-bar-action,
  .resume-bar-secondary {
    flex: 1 1 auto;
    text-align: center;
  }

  .combo-stage,
  .visual-panel {
    margin: 0 -14px 12px;
    padding: 6px 14px 8px;
  }

  .combo-preview-box {
    height: 100px;
  }

  .preview {
    height: 140px;
  }

  .combo-slots-bar {
    gap: 8px;
  }

  .combo-slot-pill {
    padding: 10px;
  }

  .combo-slot-pill strong {
    font-size: 13px;
  }

  .combo-product-grid {
    grid-template-columns: 1fr;
  }

  .review-quick-summary:not([hidden]) {
    padding: 10px 12px;
    gap: 8px;
  }

  .review-quick-totals strong {
    font-size: 18px;
  }

  .review-quick-cta {
    padding: 9px 14px;
    font-size: 12px;
  }

  .review-combo-previews {
    gap: 8px;
  }

  .review-preview-tile-head {
    padding: 6px 8px;
    font-size: 10.5px;
  }

  .review-preview-tile-cap {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  .review-item-head {
    padding: 11px 12px 9px;
  }

  .review-item-head h3 {
    font-size: 14px;
  }

  .review-item-price {
    font-size: 13.5px;
  }

  .review-spec-list {
    padding: 12px;
    gap: 7px;
  }

  .review-spec-row {
    font-size: 12.5px;
  }

  .review-item-foot {
    padding: 9px 12px 11px;
  }

  .review-summary-card {
    padding: 16px 14px 18px;
  }
}

/* Ultra-narrow mobile safety (320px - 374px) */
@media (max-width: 374px) {
  .preview {
    height: 132px;
  }

  .segmented-control {
    padding: 3px;
    gap: 3px;
  }

  .seg-btn {
    padding: 8px 6px;
    font-size: 12px;
  }

  .seg-btn--stack small {
    font-size: 10px;
  }

  .ctx-btn {
    padding: 6px 9px;
    font-size: 11px;
  }

  .mobile-order-row {
    gap: 6px;
    padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .mobile-preview {
    padding: 9px 10px;
    font-size: 11.5px;
  }

  .mobile-price strong {
    font-size: 14px;
  }

  .mobile-order-bar .primary {
    padding: 10px 12px;
    font-size: 11.5px;
  }
}

@media (max-width: 360px) {
  .cart-added-actions,
  .mobile-added-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PHASE 4D.5 — PLAYFUL BY DESIGN: EDITORIAL HOME, STUDIO WORKBENCH & BAG/CHECKOUT
   ========================================================================== */

/* Additional editorial photography slot variants */
.photo-slot-frame--butter {
  background: var(--butter-soft);
  border-color: var(--butter-border);
}

.photo-slot-frame--mix {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border-color: rgba(34, 22, 19, 0.2);
}

.photo-slot-frame--material {
  aspect-ratio: 1 / 1;
}

/* ---------- 1. EDITORIAL HOME ("PLAYFUL BY DESIGN") ---------- */

.view-home {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.editorial-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0;
  border-bottom: 0;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.editorial-hero h1 {
  margin: 0;
  font-size: clamp(2.45rem, 11vw, 4.75rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--brown);
}

.editorial-hero h1 span {
  display: inline-block;
  background: var(--pink);
  padding: 0 12px 4px;
  border-radius: var(--radius-card);
  margin-top: 4px;
}

.hero-lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.48;
  color: var(--muted);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.editorial-media--hero .photo-slot-frame--hero {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border: 1.5px solid var(--brown);
}

/* Home Section 2: Categories ("¿Qué vamos a diseñar?") */
.home-categories {
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: calc(var(--header-h, 72px) + 16px);
}

.home-categories .section-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-categories h2,
.materials-editorial h2,
.mix-match-editorial h2 {
  margin: 0;
  font-size: clamp(1.75rem, 5.2vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--brown);
}

.section-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.category-card {
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.category-card:hover {
  border-color: var(--brown);
  transform: translateY(-2px);
}

.category-card-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}

.category-card-trigger .photo-slot-frame--category {
  aspect-ratio: 4 / 3;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.category-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.category-card-body h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--brown);
}

.category-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  white-space: nowrap;
}

.category-card-items {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.category-card-cta {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Home Section 3: Mix & Match Color-Blocked Editorial Showcase */
.mix-match-editorial {
  background: var(--pink-soft);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: calc(var(--header-h, 72px) + 16px);
}

.mix-match-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
}

.mix-match-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.mix-match-lead {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--brown);
}

.mix-match-sub {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--brown);
  max-width: 44ch;
}

.mix-match-cta-block {
  margin-top: 6px;
}

.mix-quick-strip {
  padding-top: 18px;
  border-top: 1px solid rgba(34, 22, 19, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mix-quick-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brown);
  letter-spacing: 0.01em;
}

.mix-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mix-quick-list .combo-quick-btn {
  background: var(--paper);
  border: 1.5px solid var(--brown);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
}

.mix-quick-list .combo-quick-btn:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

/* Home Section 4: Creative Materials ("Tú haces las reglas.") */
.materials-editorial {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.materials-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.materials-header-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.materials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.material-pillar {
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.material-pillar .photo-slot-frame--material {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.material-pillar-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.material-pillar-body h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brown);
}

.material-pillar-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.48;
  color: var(--muted);
}

/* Home Section 5: Single Commercial Benefit Band */
.benefit-band {
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-card);
  padding: 28px 22px;
}

.benefit-band-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.benefit-band-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefit-band-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
}

.benefit-band h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4.5vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--cream);
}

.benefit-band p:last-child {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(247, 242, 232, 0.86);
  max-width: 52ch;
}

.btn-editorial-inverse {
  min-height: var(--cta-min);
  padding: 12px 24px;
  background: var(--pink);
  color: var(--brown);
  border: 1.5px solid var(--pink);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-editorial-inverse:hover:not(:disabled) {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--brown);
}

/* ---------- 2. CATEGORY VIEW REFINEMENTS ---------- */

.category-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-switch-btn {
  min-height: 36px;
  padding: 6px 14px;
  background: var(--paper);
  color: var(--brown);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
}

.cat-switch-btn[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
  font-weight: 600;
}

.cat-switch-btn:hover:not([aria-current='page']) {
  border-color: var(--brown);
}

.product-showcase-specs {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- 3. MIX & MATCH PICKER REFINEMENTS ---------- */

.combo-carried-note {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: var(--pink-soft);
  border: 1px solid var(--pink-border);
  border-radius: var(--radius-card);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--brown);
}

.combo-option-top {
  align-items: baseline;
}

.combo-option-top strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
}

/* ---------- 4. CUSTOMIZER: COMPACT CONFIG SUMMARY & MATERIAL TABS ---------- */

.step--config {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line);
}

.config-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.selected-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.config-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.config-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.config-product-name {
  margin: 0;
  font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--brown);
}

.config-base-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
}

.config-summary-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.config-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.config-toggle-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.config-toggle-btn[aria-expanded='true'] {
  background: var(--brown);
  color: var(--cream);
}

.config-toggle-btn:hover:not(:disabled) {
  background: var(--brown);
  color: var(--cream);
}

#config-controls-panel:not([hidden]) {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Single Bold Rounded Material Tab Bar (lower visual weight than primary CTA) */
.material-tabs:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 14px 0 4px;
  background: var(--paper-tint);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
}

.material-tab {
  min-height: var(--touch-min);
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.material-tab:hover:not([aria-selected='true']) {
  color: var(--brown);
}

.material-tab[aria-selected='true'] {
  background: var(--paper);
  color: var(--brown);
  border-color: var(--brown);
  font-weight: 700;
}

.material-tab-meta:empty {
  display: none;
}

.material-tab-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  color: var(--brown);
  font-size: 11px;
  font-weight: 700;
}

.step--material {
  padding: 18px 0 22px;
  border-bottom: 0;
}

/* Streamlined borderless Tu paleta & charm status */
.palette-tray {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 0;
}

.charm-slot-status {
  background: var(--paper-tint);
  border: 0;
  border-radius: var(--radius-card);
  padding: 10px 14px;
}

/* Secondary entry from Single Customizer into Mix & Match */
.customizer-mix-entry {
  width: 100%;
  min-height: var(--touch-min);
  padding: 11px 18px;
  margin-top: 10px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customizer-mix-entry:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--pink-soft);
}

/* ---------- 5. MI BOLSA (SIMPLIFIED ROWS + ACCESSIBLE CONTEXTUAL MENU) ---------- */

.view-bag,
.view-checkout {
  max-width: 1120px;
  margin: 0 auto;
}

.bag-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bag-row {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 14px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.bag-row--sub {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 12px;
}

.bag-row-thumb {
  width: 88px;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bag-row--sub .bag-row-thumb {
  background: var(--paper);
}

.bag-row-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bag-row-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.bag-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bag-row-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bag-row-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.bag-row-head h3,
.checkout-item-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--brown);
}

.bag-row-price,
.checkout-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
}

.bag-row-specs,
.checkout-item-specs {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
}

.bag-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.bag-edit-btn {
  min-height: var(--touch-min);
  padding: 8px 16px;
  background: var(--cream);
  color: var(--brown);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.bag-edit-btn:hover:not(:disabled) {
  border-color: var(--brown);
  background: var(--paper);
}

/* Accessible contextual menu (<details class="bag-row-menu">) */
.bag-row-menu {
  position: relative;
}

.bag-row-menu-trigger {
  list-style: none;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.bag-row-menu-trigger::-webkit-details-marker {
  display: none;
}

.bag-row-menu-trigger:hover,
.bag-row-menu[open] .bag-row-menu-trigger {
  border-color: var(--brown);
  background: var(--pink-soft);
}

.bag-row-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 25;
  min-width: 156px;
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bag-row-menu-item {
  width: 100%;
  min-height: var(--touch-min);
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--brown);
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
}

.bag-row-menu-item:hover:not(:disabled) {
  background: var(--paper-tint);
}

.bag-row-menu-item--danger {
  color: var(--red);
}

.bag-row-menu-item--danger:hover:not(:disabled) {
  background: var(--red-soft);
}

/* Grouped Mix & Match card inside Mi bolsa */
.bag-combo-group {
  background: var(--paper);
  border: 1.5px solid var(--brown);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bag-combo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bag-combo-title {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--brown);
}

.bag-combo-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bag-combo-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bag-promo-caption {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.bag-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.bag-summary-actions .btn-editorial-secondary {
  width: 100%;
}

/* ---------- 6. CHECKOUT (READ-ONLY FINAL REVIEW) ---------- */

.checkout-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-item-row {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 14px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.checkout-item-thumb {
  width: 76px;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-frame);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-item-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.checkout-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.checkout-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

/* ---------- 7. RESPONSIVE DESKTOP / TABLET ELEVATION ---------- */

@media (min-width: 768px) {
  .view-home {
    gap: 72px;
  }

  .editorial-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 40px;
    padding: 20px 0 36px;
  }

  .editorial-media--hero .photo-slot-frame--hero {
    aspect-ratio: 4 / 5;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .category-card-trigger .photo-slot-frame--category {
    aspect-ratio: 4 / 5;
  }

  .mix-match-editorial {
    padding: 36px 36px 32px;
    gap: 28px;
  }

  .mix-match-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 36px;
  }

  .materials-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .materials-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .benefit-band {
    padding: 36px 40px;
  }

  .benefit-band-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }

  .bag-row {
    grid-template-columns: 104px minmax(0, 1fr);
    padding: 16px;
  }

  .bag-row-thumb {
    width: 104px;
  }
}

/* Ultra-narrow mobile safety (<= 400px) */
@media (max-width: 400px) {
  .bag-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .bag-row-thumb {
    width: 72px;
  }

  .checkout-item-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .checkout-item-thumb {
    width: 64px;
  }

  .config-summary-header {
    flex-direction: column;
    align-items: stretch;
  }

  .config-summary-actions {
    justify-content: flex-start;
  }

  .material-tab {
    font-size: 12.5px;
    padding: 8px 6px;
    gap: 4px;
  }

  .category-switcher {
    gap: 4px;
  }

  .cat-switch-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ==========================================================================
   PHASE 4D.5b — GLOBAL VISUAL REFINEMENT, SOFTENED RADII, BORDER REDUCTION,
   CLEAN PHOTOGRAPHY SURFACES, COMPACT S/M/L CAPSULES & SEMANTIC ALERTS
   ========================================================================== */

/* ---------- 1. STICKY HEADER OFFSET & SCROLL SAFETY ---------- */

html {
  scroll-padding-top: calc(var(--header-h, 64px) + 16px);
}

section[id],
[id^="view-"],
#home-categories,
#home-mix-match,
#home-materials,
#home-benefit-band,
#color-step,
#name-step,
#charm-step {
  scroll-margin-top: calc(var(--header-h, 64px) + 16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 242, 232, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34, 22, 19, 0.08);
}

.site-main {
  padding-top: 12px;
}

/* Guard sticky mobile previews precisely beneath the measured header */
@media (max-width: 767px) {
  .visual-panel,
  .combo-stage {
    top: calc(var(--header-h, 64px) + 6px);
  }
}

/* ---------- 2. INTERACTION STATES (TOUCH-SAFE HOVER + FOCUS-VISIBLE) ---------- */

@media (hover: none) {
  button:hover:not(:disabled),
  .btn-editorial-primary:hover:not(:disabled),
  .btn-editorial-secondary:hover:not(:disabled),
  .btn-editorial-inverse:hover:not(:disabled),
  .combo-quick-btn:hover:not(:disabled),
  .category-card-trigger:hover,
  .product-showcase-card:hover,
  .combo-product-option:hover:not(:disabled),
  .combo-preview-card[aria-current='false']:hover,
  .size-capsule:hover:not(:disabled) {
    transform: none;
  }
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[data-piece]:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

/* ---------- 3. CLEAN PHOTOGRAPHY-READY SURFACES (ZERO PLACEHOLDER COPY) ---------- */

.photo-slot-surface {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  border: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #efe4d6 0%, #e5d4c2 100%);
}

.photo-slot-surface img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-slot-surface--hero {
  aspect-ratio: 4 / 5;
  background: linear-gradient(155deg, #f3d7df 0%, #f1e1ce 52%, #e9d7bf 100%);
}

.photo-slot-surface--category {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--product {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--mix {
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #fae2e8 0%, #f3d3dc 55%, #edd5c9 100%);
}

.photo-slot-surface--material {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--sand {
  background: linear-gradient(145deg, #efe3d2 0%, #e2cfb8 100%);
}

.photo-slot-surface--blush {
  background: linear-gradient(145deg, #f8dce3 0%, #efc5d0 100%);
}

.photo-slot-surface--butter {
  background: linear-gradient(145deg, #f7ebca 0%, #ecd9a6 100%);
}

/* ---------- 4. HOME REFINEMENT (HERO, FLUSH CARDS, FULL-BLEED BANDS) ---------- */

.view-home {
  gap: 52px;
}

.editorial-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0 0 8px;
  align-items: center;
}

.editorial-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.editorial-hero-copy h1 {
  margin: 0;
}

.editorial-media {
  margin: 0;
  overflow: hidden;
}

/* Mobile Hero Photo: full-bleed edge-to-edge (0px outer radius) */
@media (max-width: 767px) {
  .editorial-hero {
    gap: 20px;
  }

  .editorial-media--hero {
    order: -1;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    border-radius: var(--radius-bleed);
  }

  .editorial-media--hero .photo-slot-surface--hero {
    aspect-ratio: 4 / 4.2;
    border-radius: var(--radius-bleed);
  }
}

/* Desktop Hero: clean split composition with 22px contained editorial photo */
@media (min-width: 768px) {
  .view-home {
    gap: 72px;
  }

  .editorial-hero {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 44px;
    padding: 18px 0 12px;
  }

  .editorial-media--hero {
    border-radius: var(--radius-card-lg);
  }

  .editorial-media--hero .photo-slot-surface--hero {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-card-lg);
  }
}

/* Category & Product Cards: borderless surface contrast, flush edge-to-edge photos */
.category-card {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(34, 22, 19, 0.05);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.category-card-trigger {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  overflow: hidden;
}

.category-card-trigger .editorial-media--category {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
}

.category-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.category-card-cta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brown);
}

@media (hover: hover) {
  .category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(34, 22, 19, 0.09);
  }
}

/* Product Showcase Cards (Category views) */
.product-showcase-card {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 14px rgba(34, 22, 19, 0.05);
  display: flex;
  flex-direction: column;
}

.product-showcase-card .editorial-media--product {
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

.product-showcase-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-showcase-cta {
  margin-top: auto;
  padding-top: 6px;
}

/* Full-width Edge-to-Edge Pink Mix & Match Editorial Block (0px outer radius) */
.mix-match-editorial {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  border: 0;
  border-radius: var(--radius-bleed);
  background: var(--pink);
  color: var(--brown);
  padding: 0;
  overflow: hidden;
}

.mix-match-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.mix-match-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.mix-match-copy {
  padding: 36px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.mix-match-editorial .editorial-media--mix {
  width: 100%;
  margin: 0;
  border-radius: var(--radius-bleed);
  min-height: 250px;
}

.mix-match-editorial .photo-slot-surface--mix {
  height: 100%;
  min-height: 250px;
  border-radius: var(--radius-bleed);
}

.mix-match-editorial .combo-quick-btn {
  background: rgba(255, 250, 243, 0.88);
  border: 0;
  color: var(--brown);
}

@media (hover: hover) {
  .mix-match-editorial .combo-quick-btn:hover:not(:disabled) {
    background: var(--paper);
  }
}

@media (min-width: 768px) {
  .mix-match-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 460px;
  }

  .mix-match-copy {
    padding: 52px 40px 52px 24px;
    justify-content: center;
  }

  .mix-match-editorial .editorial-media--mix {
    height: 100%;
    min-height: 460px;
  }

  .mix-match-editorial .photo-slot-surface--mix {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* Creative Materials Pillars — clean borderless cards */
.material-pillar {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 12px rgba(34, 22, 19, 0.04);
  display: flex;
  flex-direction: column;
}

.material-pillar .editorial-media--material {
  width: 100%;
  border-radius: 0;
  margin: 0;
}

.material-pillar-body {
  padding: 18px 20px 20px;
}

.material-pillar-body h3 {
  margin: 0 0 6px;
}

.material-pillar-body p {
  margin: 0;
}

/* Full-width Edge-to-Edge Warm-Brown Commercial Benefit Band (0px outer radius) */
.benefit-band {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  border: 0;
  border-radius: var(--radius-bleed);
  background: var(--brown);
  color: var(--cream);
  padding: 40px 20px;
}

.benefit-band-inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.benefit-band-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
}

.benefit-band h2 {
  margin: 0 0 8px;
  color: var(--cream);
}

.benefit-band p {
  margin: 0;
  color: rgba(247, 242, 232, 0.86);
}

.btn-editorial-inverse {
  background: var(--pink);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  min-height: var(--cta-min);
  padding: 12px 26px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (hover: hover) {
  .btn-editorial-inverse:hover:not(:disabled) {
    background: var(--pink-soft);
  }
}

@media (min-width: 768px) {
  .benefit-band {
    padding: 48px 24px;
  }

  .benefit-band-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
}

/* ---------- 5. COMPACT S/M/L CAPSULE SIZE SELECTORS ---------- */

.size-capsule-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.size-capsule {
  position: relative;
  min-height: var(--touch-min);
  padding: 7px 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--neutral-pill);
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  width: 100%;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.size-capsule[aria-pressed='true'],
.size-capsule[aria-checked='true'],
.size-capsule.is-active-pick {
  background: var(--brown);
  color: var(--cream);
}

@media (hover: hover) {
  .size-capsule:hover:not(:disabled):not([aria-pressed='true']):not([aria-checked='true']):not(.is-active-pick) {
    background: var(--pink-soft);
  }
}

.size-cap-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.size-cap-letter b {
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.size-cap-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}

.size-cap-cm {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.78;
  white-space: nowrap;
}

.size-cap-price {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.size-capsule[aria-pressed='true'] .size-cap-cm,
.size-capsule[aria-checked='true'] .size-cap-cm,
.size-capsule.is-active-pick .size-cap-cm {
  opacity: 0.86;
}

.size-cap-slot-badge {
  position: absolute;
  top: -6px;
  right: 6px;
  background: var(--pink);
  color: var(--brown);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 4px rgba(34, 22, 19, 0.16);
}

/* Customizer #size-seg wrapper for compact capsules */
#size-seg.seg-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

@media (max-width: 360px) {
  .size-capsule {
    flex-direction: column;
    gap: 2px;
    padding: 7px 4px;
    border-radius: 18px;
  }

  .size-cap-meta {
    align-items: center;
    text-align: center;
  }

  .size-cap-cm,
  .size-cap-price {
    font-size: 10.5px;
  }
}

/* ---------- 6. MIX & MATCH PICKER & CUSTOMIZER REFINEMENTS ---------- */

.combo-slot-pill {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: 0 2px 10px rgba(34, 22, 19, 0.04);
}

.combo-slot-pill[aria-pressed='true'] {
  background: var(--pink);
  border: 0;
  box-shadow: none;
}

.combo-product-option {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: 0 2px 10px rgba(34, 22, 19, 0.04);
}

.combo-product-option.is-active-pick {
  background: var(--pink-soft);
  border: 0;
  box-shadow: none;
}

.combo-family-card {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(34, 22, 19, 0.04);
}

.combo-family-card.is-active-pick {
  background: var(--pink-soft);
  border: 0;
  box-shadow: none;
}

.combo-family-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.combo-family-head strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--brown);
}

.combo-family-head small {
  font-size: 12.5px;
  color: var(--muted);
}

/* Warm-brown Mix & Match picker bottom action bar with dominant pink CTA */
.combo-picker-footer {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius-preview);
  padding: 16px 20px;
  box-shadow: 0 10px 28px rgba(34, 22, 19, 0.18);
}

.combo-picker-summary span {
  color: rgba(247, 242, 232, 0.84);
}

.combo-picker-summary strong {
  color: var(--cream);
}

#combo-start-btn.btn-editorial-primary {
  background: var(--pink);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

#combo-start-btn.btn-editorial-primary:disabled {
  background: rgba(246, 183, 195, 0.28);
  color: rgba(247, 242, 232, 0.72);
  opacity: 1;
}

@media (hover: hover) {
  #combo-start-btn.btn-editorial-primary:hover:not(:disabled) {
    background: var(--pink-soft);
  }
}

/* Mix & Match Customizer Preview Cards: 20px radius, ZERO dimming on inactive card */
.combo-preview-card {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-preview);
  box-shadow: 0 2px 14px rgba(34, 22, 19, 0.06);
  opacity: 1;
}

.combo-preview-card[aria-current='false'] {
  background: var(--paper);
  border: 0;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(34, 22, 19, 0.04);
}

.combo-preview-card[aria-current='true'] {
  background: var(--paper);
  border: 0;
  opacity: 1;
  box-shadow: 0 6px 20px rgba(34, 22, 19, 0.11);
}

.combo-card-head {
  background: var(--paper-tint);
  border-bottom: 1px solid rgba(34, 22, 19, 0.06);
}

.combo-preview-card[aria-current='true'] .combo-card-head {
  background: var(--pink);
  border-bottom: 0;
}

.combo-card-state {
  background: var(--neutral-pill);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-weight: 700;
}

.combo-preview-card[aria-current='true'] .combo-card-state {
  background: var(--brown);
  color: var(--cream);
  border: 0;
}

/* Single preview panel & customizer cards — reduced borders, softer corners */
.visual-panel {
  border: 0;
  border-radius: var(--radius-preview);
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(34, 22, 19, 0.05);
}

.step-card,
.config-summary-card,
.review-summary-card,
.combo-active-bar {
  border: 0;
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(34, 22, 19, 0.04);
}

/* ---------- 7. UNIFIED SEMANTIC ALERT SYSTEM (14px RADIUS, BORDERLESS, WCAG AA) ---------- */

.cart-discount-banner:not([hidden]),
.review-inventory-alert:not([hidden]),
.error-item,
.mobile-order-guidance:not([hidden]),
.compat-notice:not([hidden]),
.stock-guide:not([hidden]),
.cart-added-confirm:not([hidden]),
.review-checkout-status:not([hidden]),
.unavailable-letters-note:not([hidden]),
.letter-feedback:not([hidden]),
.bag-row-stock-flag {
  border: 0;
  border-radius: var(--radius-alert);
  box-shadow: none;
}

/* Promotion tone (pink bg, warm brown text) */
[data-tone='promo'],
[data-tone='nudge'],
.cart-discount-banner[data-tone='promo'],
.customizer-promo-note[data-tone='promo'] {
  background: var(--promo-soft);
  color: var(--promo-text);
}

.cart-discount-banner[data-tone='promo'] {
  background: var(--promo-bg);
  color: var(--promo-text);
}

/* Pending / Info / Low-stock tone (muted amber bg, dark amber-brown text) */
[data-tone='pending'],
[data-tone='warning'],
[data-tone='info'],
[data-tone='low-stock'],
.error-item[data-tone='pending'],
.mobile-order-guidance[data-tone='pending'],
.stock-guide[data-tone='pending'],
.unavailable-letters-note[data-tone='pending'],
.review-inventory-alert[data-tone='pending'],
.compat-notice:not([hidden]) {
  background: var(--amber-bg);
  color: var(--amber-text);
}

/* Error / Blocking stock conflict tone (soft terracotta bg, dark error text) */
[data-tone='error'],
[data-tone='sold-out'],
.error-item[data-tone='error'],
.mobile-order-guidance[data-tone='error'],
.stock-guide[data-tone='error'],
.unavailable-letters-note[data-tone='error'],
.review-inventory-alert[data-tone='error'],
.bag-row-stock-flag {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Success tone (muted sage green bg, dark forest green text) */
[data-tone='success'],
[data-tone='celebrate'],
.cart-discount-banner[data-tone='success'],
.customizer-promo-note[data-tone='success'],
.stock-guide[data-tone='success'],
.cart-added-confirm:not([hidden]),
.review-checkout-status[data-tone='success'] {
  background: var(--success-bg);
  color: var(--success-text);
}

.error-item {
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.error-item-body {
  flex: 1 1 200px;
  min-width: 0;
}

.error-item p {
  margin: 0;
  color: inherit;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.4;
}

.alert-bullets {
  margin: 6px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  line-height: 1.38;
  color: inherit;
}

.error-action-btn,
.mobile-order-guidance-btn,
.bag-row-fix-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brown);
  color: var(--cream);
  padding: 8px 14px;
  min-height: 36px;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.customizer-promo-note {
  border: 0;
  border-radius: var(--radius-alert);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}

.inline-alert-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--error-text);
  color: #fffaf3;
  font-size: 11px;
  font-weight: 700;
  margin-right: 4px;
}

.inline-alert-tag--used {
  background: var(--amber-text);
  color: #fffaf3;
}

/* Bag/slot-consumed swatch state preserves authentic material color */
.swatch.stock-consumed {
  opacity: 1;
  background: var(--swatch);
  border-color: var(--paper);
}

.used-up-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- 8. FLATTER MI BOLSA & CHECKOUT SURFACES ---------- */

.bag-combo-group {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card-lg);
  padding: 18px;
  box-shadow: 0 2px 14px rgba(34, 22, 19, 0.05);
}

.bag-combo-group.is-flagged {
  box-shadow: inset 0 0 0 2px var(--error-text);
}

.bag-combo-items {
  gap: 0;
}

.bag-row {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px rgba(34, 22, 19, 0.04);
}

.bag-row.is-flagged {
  box-shadow: inset 0 0 0 1.5px var(--error-text);
}

.bag-row--sub {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-top: 1px solid var(--line);
  padding: 14px 0 4px;
}

.bag-row--sub.is-flagged {
  box-shadow: none;
}

.bag-row-thumb,
.checkout-item-thumb {
  border: 0;
  border-radius: var(--radius-frame);
  background: var(--cream);
}

.bag-row-stock-flag {
  margin-top: 8px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.bag-row-stock-text {
  flex: 1 1 160px;
  min-width: 0;
}

.checkout-item-row {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: 0 2px 12px rgba(34, 22, 19, 0.04);
}

.bag-edit-btn {
  background: var(--neutral-pill);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--brown);
  font-weight: 700;
}

@media (hover: hover) {
  .bag-edit-btn:hover:not(:disabled) {
    background: var(--pink-soft);
  }
}

.bag-row-menu-trigger {
  border: 0;
  background: var(--neutral-pill);
  border-radius: var(--radius-pill);
}

/* ==================== PHASE 4D.5d: BORDERLESS BOLD ROUNDED POLISH & COMPACT MOBILE STACKING ==================== */

/* 1. Borderless Material Tabs (neutral pill track, warm brown filled active tab) */
.material-tabs:not([hidden]) {
  background: var(--neutral-pill);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.material-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: background-color 140ms ease, color 140ms ease;
}

@media (hover: hover) {
  .material-tab:hover:not([aria-selected='true']) {
    background: rgba(34, 22, 19, 0.06);
    color: var(--brown);
  }
}

.material-tab[aria-selected='true'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  font-weight: 700;
}

.material-tab[aria-selected='true'] .material-tab-meta {
  background: rgba(247, 242, 232, 0.22);
  color: var(--cream);
}

/* 2. Instructional Empty Design Guide (borderless muted amber, not promotional pink) */
.empty-design-guide {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 0;
  border-radius: var(--radius-alert);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.empty-design-guide strong {
  color: var(--amber-text);
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.empty-design-guide p {
  color: var(--amber-text);
  font-size: 12.5px;
  line-height: 1.4;
}

/* 3. Borderless Contextual Bead Bar, Editing Banner & Compact Actions */
.bead-context-bar:not([hidden]) {
  background: var(--paper-tint);
  border: 0;
  border-radius: var(--radius-alert);
  padding: 9px 12px;
  gap: 8px 10px;
}

.ctx-btn {
  border: 0;
  background: var(--neutral-pill);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 7px 13px;
  font-weight: 600;
}

@media (hover: hover) {
  .ctx-btn:hover:not(:disabled) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.ctx-btn--done {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  font-weight: 700;
}

@media (hover: hover) {
  .ctx-btn--done:hover:not(:disabled) {
    background: var(--brown-hover);
    color: var(--cream);
  }
}

.ctx-letter-badge {
  border: 0;
  background: var(--paper);
}

.editing-bead-banner:not([hidden]) {
  background: var(--paper-tint);
  border: 0;
  border-radius: var(--radius-alert);
  padding: 10px 12px;
}

.editing-bead-exit {
  border: 0;
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-weight: 700;
}

@media (hover: hover) {
  .editing-bead-exit:hover:not(:disabled) {
    background: var(--brown-hover);
  }
}

/* 4. Compact Borderless Palette Tray Chips & Filled Secondary Controls */
.palette-tray-chip {
  background: var(--neutral-pill);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 2px 2px 2px 6px;
  gap: 6px;
}

.palette-tray-chip.is-sold-out {
  background: var(--error-bg);
  color: var(--error-text);
}

.palette-tray-chip.is-unverified,
.palette-tray-chip.is-exhausted {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.config-toggle-btn,
.customizer-mix-entry,
.customizer-secondary-action,
.cart-added-actions .btn-editorial-secondary {
  background: var(--neutral-pill);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

@media (hover: hover) {
  .config-toggle-btn:hover:not(:disabled),
  .customizer-mix-entry:hover:not(:disabled),
  .customizer-secondary-action:hover:not(:disabled),
  .cart-added-actions .btn-editorial-secondary:hover:not(:disabled) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.config-toggle-btn[aria-expanded='true'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
}

.stock-suggestions button {
  background: var(--paper);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

@media (hover: hover) {
  .stock-suggestions button:hover:not(:disabled) {
    background: var(--brown);
    color: var(--cream);
  }
}

/* 5. Customer-Safe Low-Stock Swatch Indicator */
.low-stock-badge {
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(34, 22, 19, 0.12);
}

.post-commit-preview h2 {
  font-size: clamp(24px, 4.5vw, 32px);
  margin: 12px 0 10px;
}

.post-commit-preview p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 34ch;
}

/* 6. Compact Non-Stacked Mobile Sticky Controls & Safe-Area Scroll Clearance */
@media (max-width: 767px) {
  body[data-view='customizer'] .view-customizer {
    padding-bottom: calc(136px + env(safe-area-inset-bottom));
  }

  .mobile-order-bar:not([hidden]) {
    border-top: 1px solid rgba(34, 22, 19, 0.08);
    box-shadow: 0 -4px 18px rgba(34, 22, 19, 0.08);
  }

  .mobile-order-bar.is-post-commit .mobile-order-row,
  .mobile-order-bar.is-post-commit .mobile-order-guidance {
    display: none;
  }

  .mobile-order-guidance:not([hidden]) {
    border: 0;
    border-radius: 0;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }

  .mobile-order-guidance-btn {
    min-height: var(--touch-min);
    padding: 8px 14px;
    border: 0;
    background: var(--brown);
    color: var(--cream);
    font-weight: 700;
  }

  .mobile-added-confirm:not([hidden]) {
    border: 0;
    border-radius: 0;
    background: var(--success-bg);
    color: var(--success-text);
    padding: 12px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    gap: 10px;
  }

  .mobile-added-btn {
    border: 0;
    background: var(--paper);
    color: var(--brown);
    min-height: var(--touch-min);
    font-weight: 600;
  }

  .mobile-added-btn--primary {
    border: 0;
    background: var(--brown);
    color: var(--cream);
    font-weight: 700;
  }

  .mobile-preview {
    border: 0;
    background: var(--neutral-pill);
    color: var(--brown);
    min-height: var(--touch-min);
  }
}

/* ==========================================================================
   LOOP LAB V3 — DEFINITIVE BORDERLESS BOLD ROUNDED SYSTEM & LAYOUT POLISH
   ========================================================================== */

/* 1. Borderless Filled Buttons, Header Controls & Icon-Only Mobile Menu */
.btn-editorial-primary,
.primary {
  border: 0;
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-pill);
  box-shadow: none;
}

@media (hover: hover) {
  .btn-editorial-primary:hover:not(:disabled),
  .primary:hover:not(:disabled) {
    background: var(--brown-hover);
    color: var(--cream);
  }
}

.btn-editorial-secondary {
  border: 0;
  background: var(--neutral-pill);
  color: var(--brown);
  border-radius: var(--radius-pill);
  box-shadow: none;
}

@media (hover: hover) {
  .btn-editorial-secondary:hover:not(:disabled) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.header-resume {
  border: 0;
  background: var(--pink);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

@media (hover: hover) {
  .header-resume:hover:not(:disabled) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.header-cart {
  border: 0;
  background: var(--neutral-pill);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  padding: 8px 10px 8px 14px;
  box-shadow: none;
}

.header-cart.has-items,
.header-cart[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
}

.header-cart.has-items .header-cart-count,
.header-cart[aria-current='page'] .header-cart-count {
  background: var(--pink);
  color: var(--brown);
}

@media (hover: hover) {
  .header-cart:hover:not(:disabled):not(.has-items):not([aria-current='page']) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.mobile-nav-toggle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.mobile-nav-toggle[aria-expanded='true'] {
  background: var(--neutral-pill);
  color: var(--brown);
  border: 0;
  box-shadow: none;
}

.mobile-nav-toggle:active:not(:disabled) {
  background: rgba(34, 22, 19, 0.1);
  color: var(--brown);
}

@media (hover: hover) {
  .mobile-nav-toggle:hover:not(:disabled) {
    background: var(--neutral-pill);
    color: var(--brown);
  }
}

.cat-switch-btn {
  border: 0;
  background: var(--neutral-pill);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 7px 15px;
  font-weight: 600;
}

.cat-switch-btn[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  font-weight: 700;
}

@media (hover: hover) {
  .cat-switch-btn:hover:not([aria-current='page']) {
    background: var(--pink-soft);
  }
}

.combo-carried-note {
  border: 0;
  background: var(--pink-soft);
  color: var(--brown);
  border-radius: var(--radius-alert);
}

.bag-row-menu-panel {
  border: 0;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 28px rgba(34, 22, 19, 0.14);
}

/* 2. Compact Borderless Draft Recovery Strip */
.resume-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 9px 14px;
  margin: 0 0 14px;
  background: var(--paper-tint);
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: none;
}

.resume-bar-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 10px;
  min-width: 0;
  flex: 1 1 220px;
}

.resume-bar-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--brown);
}

.resume-bar-copy strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.resume-bar-note {
  font-size: 12px;
  color: var(--muted);
}

.resume-bar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.resume-bar-action {
  border: 0;
  background: var(--brown);
  color: var(--cream);
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (hover: hover) {
  .resume-bar-action:hover:not(:disabled) {
    background: var(--brown-hover);
    color: var(--cream);
  }
}

.resume-bar-secondary {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

@media (hover: hover) {
  .resume-bar-secondary:hover:not(:disabled) {
    background: rgba(34, 22, 19, 0.06);
    color: var(--brown);
  }
}

@media (max-width: 520px) {
  .resume-bar {
    padding: 9px 12px;
    gap: 8px;
  }

  .resume-bar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .resume-bar-action {
    flex: 0 1 auto;
  }

  .resume-bar-secondary {
    flex: 0 0 auto;
  }
}

/* 3. Home Mix & Match Strict 2x2 Shortcut Grid */
.mix-quick-strip {
  width: 100%;
  border-top: 1px solid rgba(34, 22, 19, 0.14);
}

.mix-quick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.mix-quick-list .combo-quick-btn {
  width: 100%;
  min-height: var(--touch-min);
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 243, 0.9);
  color: var(--brown);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

@media (hover: hover) {
  .mix-quick-list .combo-quick-btn:hover:not(:disabled) {
    background: var(--paper);
    color: var(--brown);
  }
}

/* 4. Balanced Category Showcase Grid (No Awkward Dead Whitespace) */
.product-showcase-grid {
  align-items: start;
}

.product-showcase-card--unsized .product-showcase-actions {
  margin-top: 6px;
  padding-top: 8px;
}

/* 5. Compact S/M/L Capsules (Horizontal on Desktop, Clean 2-Line on Mobile) */
.size-capsule-group,
.dog-size-options,
#size-seg.seg-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.size-capsule,
.dog-size-option.size-capsule,
.combo-size-btn.size-capsule {
  position: relative;
  border: 0;
  background: var(--neutral-pill);
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  max-height: 54px;
  padding: 8px 10px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  box-shadow: none;
  text-align: center;
}

.size-capsule[aria-pressed='true'],
.size-capsule[aria-checked='true'],
.size-capsule.is-active-pick,
.dog-size-option.size-capsule[aria-pressed='true'],
.combo-size-btn.size-capsule.is-active-pick,
.combo-size-btn.size-capsule[aria-pressed='true'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  box-shadow: none;
}

.size-cap-letter b {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.size-cap-meta {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  line-height: 1.15;
  white-space: nowrap;
  min-width: 0;
}

.size-cap-cm {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.82;
}

.size-cap-sep {
  font-size: 11px;
  opacity: 0.55;
  line-height: 1;
}

.size-cap-price {
  font-size: 12px;
  font-weight: 700;
}

.combo-size-btn.size-capsule .combo-size-mark {
  position: absolute;
  top: -6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--pink);
  color: var(--brown);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 1px 4px rgba(34, 22, 19, 0.16);
}

.combo-size-btn.size-capsule .combo-size-mark:empty {
  display: none;
}

@media (max-width: 639px) {
  .size-capsule,
  .dog-size-option.size-capsule,
  .combo-size-btn.size-capsule {
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    max-height: 60px;
    padding: 7px 6px;
    border-radius: 18px;
  }

  .size-cap-meta {
    gap: 3px;
    flex-wrap: nowrap;
  }

  .size-cap-cm,
  .size-cap-price {
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .size-capsule-group,
  .dog-size-options,
  #size-seg.seg-group {
    gap: 6px;
  }

  .size-cap-cm,
  .size-cap-price {
    font-size: 10px;
  }
}

/* 6. Discoverable Bead Diameter Selector with Proportional Visual Dots */
.control-block--diameter:not([hidden]) {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.segmented-control {
  border: 0;
  background: var(--neutral-pill);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--brown);
  border-radius: var(--radius-pill);
  min-height: var(--touch-min);
  font-weight: 600;
  box-shadow: none;
}

.seg-btn[aria-checked='true'],
.seg-btn[aria-pressed='true'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  font-weight: 700;
}

@media (hover: hover) {
  .seg-btn:hover:not(:disabled):not([aria-checked='true']):not([aria-pressed='true']) {
    background: rgba(34, 22, 19, 0.06);
  }
}

.segmented-control--diameter {
  display: inline-flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.seg-btn--diam {
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
}

.diam-dot {
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.78;
}

.diam-dot--9 {
  width: 9px;
  height: 9px;
}

.diam-dot--12 {
  width: 12px;
  height: 12px;
}

.diam-dot--15 {
  width: 15px;
  height: 15px;
}

/* 7. Inspírame Button (Borderless Bold Rounded Accent) */
.inspire-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--pink-soft);
  color: var(--brown);
  min-height: var(--touch-min);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

@media (hover: hover) {
  .inspire-btn:hover:not(:disabled) {
    background: var(--pink);
    color: var(--brown);
  }
}

/* 8. Saved Design Migration & Price-Change Notice */
.migration-notice:not([hidden]) {
  margin-top: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-alert);
  background: var(--amber-bg);
  color: var(--amber-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.migration-notice[data-tone='info'] {
  background: var(--paper-tint);
  color: var(--brown);
}

.migration-notice p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.42;
  color: inherit;
}

.migration-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.migration-action-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brown);
  color: var(--cream);
  min-height: var(--touch-min);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
}

.migration-action-btn--ghost {
  background: var(--paper);
  color: var(--brown);
}

@media (hover: hover) {
  .migration-action-btn:hover:not(:disabled) {
    background: var(--brown-hover);
    color: var(--cream);
  }

  .migration-action-btn--ghost:hover:not(:disabled) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.bag-row-price-note {
  margin: 2px 0 0;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  width: fit-content;
}

/* 9. Clean Focus Visibility on Dark Surfaces */
.combo-picker-footer :focus-visible,
.benefit-band :focus-visible {
  outline: 2.5px solid var(--cream);
  outline-offset: 2px;
}

/* ==================== TARGETED UI POLISH & SELECTION REFINEMENTS ==================== */

/* 1. Consistent internal padding & gaps for contained alerts and utility surfaces */
.stock-guide:not([hidden]),
.compat-notice:not([hidden]),
.error-item,
.migration-notice:not([hidden]),
.empty-design-guide,
.combo-copy-box,
.bead-context-bar:not([hidden]),
.editing-bead-banner:not([hidden]),
.review-inventory-alert:not([hidden]),
.bag-row-stock-flag,
.unavailable-letters-note:not([hidden]),
.combo-picker-undo:not([hidden]) {
  padding: 14px 16px;
  gap: 10px 12px;
}

@media (min-width: 768px) {
  .stock-guide:not([hidden]),
  .compat-notice:not([hidden]),
  .error-item,
  .migration-notice:not([hidden]),
  .empty-design-guide,
  .combo-copy-box,
  .review-inventory-alert:not([hidden]),
  .unavailable-letters-note:not([hidden]),
  .combo-picker-undo:not([hidden]) {
    padding: 16px 20px;
  }
}

/* 2. Incomplete-design guidance (.stock-guide): compact color chips + discreet text link */
.stock-guide:not([hidden]) {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius-alert);
}

.stock-guide #stock-message {
  margin: 0;
  color: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.42;
}

.stock-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 0;
}

.stock-suggest-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.stock-suggest-label {
  font-size: 12.5px;
  font-weight: 600;
  color: inherit;
  opacity: 0.9;
}

.stock-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.stock-suggestions .stock-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 12px 6px 8px;
  background: var(--paper);
  color: var(--brown);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(34, 22, 19, 0.08);
}

@media (hover: hover) {
  .stock-suggestions .stock-suggest-chip:hover:not(:disabled) {
    background: var(--brown);
    color: var(--cream);
  }
}

.stock-suggest-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(34, 22, 19, 0.16);
  flex-shrink: 0;
}

.stock-guide-secondary {
  display: flex;
  align-items: center;
}

.stock-suggestions .stock-focus-link {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 36px;
  padding: 4px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

@media (hover: hover) {
  .stock-suggestions .stock-focus-link:hover:not(:disabled) {
    background: transparent;
    color: inherit;
    opacity: 0.78;
  }
}

/* 3. Center actions vertically in inventory alerts (.error-item), clean mobile stack */
.error-item {
  align-items: center;
}

@media (max-width: 479px) {
  .error-item {
    flex-direction: column;
    align-items: stretch;
  }

  .error-item .error-action-btn {
    align-self: flex-start;
  }
}

/* 4. Simplified size & diameter change notifications (.compat-notice) */
.compat-notice:not([hidden]) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius-alert);
}

.compat-notice[data-tone='info']:not([hidden]) {
  background: var(--paper-tint);
  color: var(--brown);
}

.compat-notice[data-tone='pending']:not([hidden]) {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.compat-notice[data-tone='error']:not([hidden]) {
  background: var(--error-bg);
  color: var(--error-text);
}

.compat-notice p {
  margin: 0;
  flex: 1 1 200px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: inherit;
}

.compat-notice-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.compat-undo-btn {
  min-height: 36px;
  padding: 6px 4px;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .compat-undo-btn:hover:not(:disabled) {
    background: transparent;
    color: inherit;
    opacity: 0.78;
  }
}

.compat-dismiss-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
}

.compat-dismiss-btn[hidden] {
  display: none;
}

@media (hover: hover) {
  .compat-dismiss-btn:hover:not(:disabled) {
    background: rgba(34, 22, 19, 0.08);
  }
}

/* 5. Unified swatch badges positioned outside swatch center with reserved row space */
.palette,
.expand-quick-palette {
  gap: 26px 14px;
  padding-bottom: 12px;
}

.swatch.stock-consumed {
  background: var(--swatch);
  opacity: 1;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.swatch.stock-consumed:disabled {
  opacity: 1;
}

.swatch .sold-out-badge,
.swatch .used-up-badge,
.swatch .low-stock-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(100% + 3px);
  bottom: auto;
  transform: translateX(-50%);
  margin: 0;
  padding: 1.5px 6px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(34, 22, 19, 0.14);
}

.swatch .sold-out-badge,
.swatch .used-up-badge {
  background: var(--paper);
  color: var(--brown);
  box-shadow: 0 1px 3px rgba(34, 22, 19, 0.16), inset 0 0 0 1px rgba(34, 22, 19, 0.22);
}

.swatch .low-stock-badge {
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 8.5px;
  padding: 1.5px 5px;
  letter-spacing: -0.01em;
}

.palette-tray-chip .sold-out-badge,
.palette-tray-chip .used-up-badge {
  position: static;
  transform: none;
  margin-top: 0;
  border: 0;
  padding: 2px 7px;
  font-size: 10px;
}

.palette-tray-chip .used-up-badge {
  background: var(--paper);
  color: var(--amber-text);
}

/* 6. Mix & Match color-copy container (.combo-copy-box, .combo-copy-btn) */
.combo-copy-box {
  background: var(--paper-tint);
  border-radius: var(--radius-alert);
  display: flex;
  flex-direction: column;
}

.combo-copy-btn {
  border: 0;
  background: var(--pink);
  color: var(--brown);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  min-height: var(--touch-min);
}

@media (hover: hover) {
  .combo-copy-btn:hover:not(:disabled) {
    background: var(--brown);
    color: var(--cream);
  }
}

.combo-copy-btn:disabled {
  background: var(--neutral-pill);
  color: var(--muted);
  opacity: 0.72;
}

.combo-copy-note {
  font-size: 12px;
  color: var(--muted);
}

/* 7. Reduced Home hero-to-categories vertical spacing (~36px mobile, ~56px desktop) */
.view-home {
  gap: 32px;
}

.editorial-hero {
  padding: 0;
  border-bottom: 0;
}

.editorial-section {
  padding: 4px 0 8px;
}

@media (min-width: 768px) {
  .view-home {
    gap: 48px;
  }

  .editorial-hero {
    padding: 12px 0 0;
    border-bottom: 0;
  }

  .editorial-section {
    padding: 8px 0 12px;
  }
}

/* 8, 9 & 10. Mix & Match picker: borderless cards, explicit slot remove, undo, high-contrast summary, compact single-size cards */
.combo-slot-wrap {
  position: relative;
  display: flex;
  min-width: 0;
}

.combo-slot-wrap .combo-slot-pill.is-filled {
  padding-right: 46px;
}

.combo-slot-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--brown);
  display: grid;
  place-items: center;
  z-index: 2;
  cursor: pointer;
}

.combo-slot-remove-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(34, 22, 19, 0.08);
  color: var(--brown);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background-color 140ms ease, color 140ms ease;
}

.combo-slot-remove[hidden] {
  display: none;
}

.combo-slot-remove:active:not(:disabled) .combo-slot-remove-icon {
  background: var(--brown);
  color: var(--cream);
}

@media (hover: hover) {
  .combo-slot-remove:hover:not(:disabled) .combo-slot-remove-icon {
    background: var(--brown);
    color: var(--cream);
  }
}

.combo-picker-undo:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
  background: var(--paper-tint);
  border: 0;
  border-radius: var(--radius-alert);
  font-size: 13px;
  font-weight: 500;
  color: var(--brown);
}

#combo-picker-undo-text {
  flex: 1 1 180px;
  min-width: 0;
  line-height: 1.42;
}

.combo-picker-undo .text-button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 6px 4px;
  margin: -6px 0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.combo-product-option {
  border: 0;
  box-shadow: 0 2px 10px rgba(34, 22, 19, 0.04);
}

@media (hover: hover) {
  .combo-product-option:hover:not(:disabled) {
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(34, 22, 19, 0.08);
  }
}

.combo-product-option.is-active-pick,
.combo-family-card.is-active-pick {
  background: var(--pink-soft);
  border: 0;
  box-shadow: none;
}

.combo-product-option--single {
  min-height: 0;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px 16px;
  align-self: start;
}

.combo-product-option--single .combo-option-badges {
  margin-top: 4px;
}

.combo-product-option:focus-visible,
.combo-size-btn:focus-visible,
.combo-slot-pill:focus-visible,
.combo-slot-remove:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

.combo-picker-footer #combo-picker-hint {
  color: rgba(247, 242, 232, 0.92);
  font-size: 13.5px;
  font-weight: 500;
}

.combo-picker-footer #combo-picker-estimate {
  color: var(--cream);
  font-size: 15px;
  font-weight: 700;
}

.combo-picker-footer .combo-estimate-savings {
  color: var(--pink);
  font-weight: 600;
}

/* ==================== FINAL MOBILE NAVIGATION & MENU TOGGLE POLISH ==================== */

.mobile-nav-toggle:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

.mobile-nav-toggle-bars {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  width: 18px;
  height: 14px;
}

.mobile-nav-toggle-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 160ms var(--ease-out), opacity 140ms ease;
}

.mobile-nav-toggle[aria-expanded='true'] .mobile-nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded='true'] .mobile-nav-toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-nav-toggle[aria-expanded='true'] .mobile-nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-drawer {
  border-top: 1px solid rgba(34, 22, 19, 0.08);
  background: var(--paper);
  padding: 12px 16px 16px;
  box-shadow: 0 10px 24px rgba(34, 22, 19, 0.08);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--brown);
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.mobile-nav-link:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

@media (hover: hover) {
  .mobile-nav-link:hover:not([aria-current='page']):not(.mobile-nav-link--experience):not(.mobile-nav-link--cart) {
    background: var(--neutral-pill);
    color: var(--brown);
  }
}

.mobile-nav-link[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  font-weight: 700;
}

.mobile-nav-link--experience {
  background: var(--pink);
  color: var(--brown);
  border: 0;
  font-weight: 700;
  margin-top: 2px;
}

@media (hover: hover) {
  .mobile-nav-link--experience:hover:not([aria-current='page']) {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.mobile-nav-link--experience[aria-current='page'] {
  background: var(--brown);
  color: var(--cream);
  border: 0;
}

.mobile-nav-arrow {
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
  color: currentColor;
}

.mobile-nav-link--experience[aria-current='page'] .mobile-nav-arrow {
  color: var(--pink);
}

.mobile-nav-bag-section {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 22, 19, 0.08);
}

.mobile-nav-link--cart {
  background: var(--brown);
  color: var(--cream);
  border: 0;
  border-radius: var(--radius-card);
  min-height: 46px;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 700;
}

@media (hover: hover) {
  .mobile-nav-link--cart:hover:not(:disabled) {
    background: var(--brown-hover);
    color: var(--cream);
  }
}

.mobile-nav-link--cart[aria-current='page'] {
  background: var(--brown-hover);
  color: var(--cream);
  border: 0;
}

.mobile-nav-cart-lead {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mobile-nav-bag-icon {
  flex-shrink: 0;
  color: var(--pink);
}

.mobile-nav-cart-badge {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(247, 242, 232, 0.16);
  color: var(--cream);
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-nav-link--cart.has-items .mobile-nav-cart-badge {
  background: var(--pink);
  color: var(--brown);
}

.combo-slot-remove:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: -3px;
}

@media (max-width: 360px) {
  .mobile-nav-drawer {
    padding: 10px 12px 14px;
  }

  .mobile-nav-link,
  .mobile-nav-link--cart {
    padding: 10px 14px;
    font-size: 14px;
  }
}

/* ==================== EXPANDED MOBILE PREVIEW UX CORRECTION ==================== */

.expand-modal:not([hidden]) {
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

.expand-modal-backdrop {
  background: rgba(34, 22, 19, 0.56);
  backdrop-filter: blur(2px);
}

.expand-modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 16px));
  overflow: hidden;
  background: var(--cream);
  border: 0;
  border-radius: var(--radius-preview);
  box-shadow: 0 24px 60px rgba(34, 22, 19, 0.28);
  display: flex;
  flex-direction: column;
}

.expand-modal-sheet:focus:not(:focus-visible) {
  outline: none;
}

.expand-modal-sheet:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

.expand-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.expand-modal-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.expand-modal-heading strong {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brown);
}

.expand-modal-heading span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.expand-modal-heading span[hidden] {
  display: none;
}

.expand-close-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  color: var(--brown);
  border: 0;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.expand-close-btn svg {
  display: block;
  pointer-events: none;
}

@media (hover: hover) {
  .expand-close-btn:hover {
    background: var(--pink-soft);
    color: var(--brown);
  }
}

.expand-close-btn:active {
  background: var(--pink);
  transform: scale(0.95);
}

.expand-close-btn:focus:not(:focus-visible) {
  outline: none;
}

.expand-close-btn:focus-visible {
  outline: 2.5px solid var(--brown);
  outline-offset: 2px;
}

.expand-modal-sheet:not(.is-editing) .expanded-preview {
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 260px;
  max-height: min(74dvh, 520px);
  padding: 12px;
  background: var(--paper);
  border-bottom: 0;
}

.expand-modal-sheet.is-editing .expanded-preview {
  flex: 1 1 auto;
  width: 100%;
  aspect-ratio: auto;
  min-height: clamp(190px, 34dvh, 270px);
  max-height: 44dvh;
  padding: 8px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.expanded-preview > svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.expand-modal-bar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 10px 14px;
  background: var(--pink-soft);
  border-bottom: 1px solid var(--line);
}

.expand-modal-bar[hidden] {
  display: none;
}

.expand-palette-wrap {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(32dvh, 236px);
  padding: 12px 14px max(14px, env(safe-area-inset-bottom));
  background: var(--cream);
  overflow: hidden;
}

.expand-palette-wrap[hidden] {
  display: none;
}

.expand-palette-label {
  flex: 0 0 auto;
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.expand-quick-palette {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  justify-items: center;
  align-items: start;
  row-gap: 28px;
  column-gap: 8px;
  padding: 4px 4px 22px;
}

.expand-quick-palette .swatch {
  position: relative;
  flex: none;
}

.expand-quick-palette .swatch.stock-unavailable,
.expand-quick-palette .swatch.stock-consumed {
  background: var(--swatch);
  opacity: 1;
}

@media (max-width: 360px) {
  .expand-modal-head {
    padding: 10px 10px 10px 14px;
  }

  .expand-modal-heading strong {
    font-size: 13.5px;
  }

  .expand-modal-bar {
    padding: 10px 12px;
  }

  .expand-palette-wrap {
    padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  }

  .expand-quick-palette {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    row-gap: 26px;
    column-gap: 6px;
  }
}

@media (min-width: 768px) {
  .expand-modal-head {
    padding: 14px 16px 12px 20px;
  }

  .expand-modal-sheet:not(.is-editing) .expanded-preview {
    padding: 16px;
  }

  .expand-modal-bar {
    padding: 12px 20px;
  }

  .expand-palette-wrap {
    padding: 14px 20px 18px;
    max-height: 256px;
  }
}

/* ==================== PROGRESSIVE PHOTOGRAPHY INTEGRATION (BATCH 1) ==================== */

.photo-slot-surface--has-photo {
  background: transparent;
  min-height: 0;
  height: auto;
  border: 0;
  box-shadow: none;
  filter: none;
}

.photo-slot-surface--has-photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.photo-slot-surface--has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  box-shadow: none;
  filter: none;
}

/* Hero framing: exact native ratios per breakpoint (4:3 mobile, 4:5 desktop) */
@media (max-width: 767px) {
  .editorial-media--hero .photo-slot-surface--hero.photo-slot-surface--has-photo {
    aspect-ratio: 4 / 3;
  }

  .editorial-media--hero .photo-slot-surface--hero.photo-slot-surface--has-photo img {
    object-fit: cover;
    object-position: 50% 25%;
  }
}

@media (min-width: 768px) {
  .editorial-media--hero .photo-slot-surface--hero.photo-slot-surface--has-photo {
    aspect-ratio: 4 / 5;
  }

  .editorial-media--hero .photo-slot-surface--hero.photo-slot-surface--has-photo img {
    object-fit: cover;
    object-position: 50% 28%;
  }
}

/* Editorial category photography (4:3) */
.photo-slot-surface--category.photo-slot-surface--has-photo {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--category.photo-slot-surface--has-photo img {
  object-fit: cover;
  object-position: 50% 25%;
}

/* Product showcase photography (4:3): complete, centered, uncropped, coherent scale */
.photo-slot-surface--product.photo-slot-surface--has-photo {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--product.photo-slot-surface--has-photo img {
  object-fit: contain;
  object-position: center center;
}

/* Home materials photography (4:3): full composition, centered, unstretched */
.photo-slot-surface--material.photo-slot-surface--has-photo {
  aspect-ratio: 4 / 3;
}

.photo-slot-surface--material.photo-slot-surface--has-photo img {
  object-fit: cover;
  object-position: center center;
}

/* Mix & Match editorial photography (4:3 mobile, 4:5 desktop): preserve both faces, collar and bracelet */
@media (max-width: 767px) {
  .mix-match-editorial .editorial-media--mix {
    min-height: 0;
  }

  .mix-match-editorial .photo-slot-surface--mix.photo-slot-surface--has-photo {
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 0;
  }

  .mix-match-editorial .photo-slot-surface--mix.photo-slot-surface--has-photo img {
    object-fit: cover;
    object-position: 50% 42%;
  }
}

@media (min-width: 768px) {
  .mix-match-editorial .editorial-media--mix {
    height: auto;
    min-height: 100%;
    display: flex;
  }

  .mix-match-editorial .photo-slot-surface--mix.photo-slot-surface--has-photo {
    aspect-ratio: 4 / 5;
    width: 100%;
    height: auto;
    min-height: 100%;
  }

  .mix-match-editorial .photo-slot-surface--mix.photo-slot-surface--has-photo img {
    object-fit: cover;
    object-position: 50% 45%;
  }
}

/* ==================== V3 COMMERCIAL FINAL: DIAMETER LABELS & CUSTOM LENGTH STEPPER ==================== */
.seg-btn--diam {
  padding: 8px 14px;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.diam-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.diam-mm {
  font-weight: 700;
  white-space: nowrap;
}

.diam-tag {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.78;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .segmented-control--diameter {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 6px;
  }

  .seg-btn--diam {
    padding: 8px 10px;
    gap: 6px;
  }

  .diam-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }

  .diam-tag {
    font-size: 11px;
  }
}

.size-extension-box:not([hidden]) {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.size-ext-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.size-ext-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
}

.size-ext-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.size-ext-tag.is-custom {
  color: var(--brown);
}

.size-ext-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.size-ext-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--cream);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.size-ext-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--brown);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease, opacity 140ms ease;
}

.size-ext-btn:hover:not(:disabled) {
  background: var(--pink-soft);
}

.size-ext-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.size-ext-value {
  min-width: 62px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  padding: 0 6px;
}

.size-ext-reset {
  font-size: 12.5px;
  white-space: nowrap;
}

.size-ext-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.combo-copy-btn--secondary {
  background: var(--paper);
}




