:root {
  /* Atelier palette — deep teal ink + soft stone */
  --bg: #f2f3f5;
  --bg-deep: #e6e9ed;
  --surface: #ffffff;
  --ink: #1a2228;
  --muted: #65707a;
  --line: #d3d8de;
  --accent: #3d5f5a;
  --accent-soft: #e5efec;
  --accent-dark: #2a4541;
  --accent-glow: rgba(61, 95, 90, 0.16);
  --danger: #a04d4d;
  --success: #3a6b58;
  --shadow: 0 20px 55px rgba(26, 34, 40, 0.09);
  --radius: 18px;
  --container: 1180px;
  --header-h: 72px;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-bg: rgba(255, 255, 255, 0.8);
  --header-line: rgba(211, 216, 222, 0.85);
  --panel-bg: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --ghost-bg: rgba(255, 255, 255, 0.65);
  --footer-bg: rgba(247, 248, 250, 0.92);
  --chip-active: #1a2228;
  --chip-active-text: #fff;
  --btn-primary-bg: #1a2228;
  --btn-primary-text: #fff;
  --btn-primary-hover: #0f1418;
  --toast-bg: #1a2228;
  --toast-text: #fff;
  --toast-action-bg: #fff;
  --toast-action-text: #1a2228;
  --overlay: rgba(18, 24, 28, 0.45);
  --body-glow-1: #d9e6e2;
  --body-glow-2: #e4e0d8;
  --body-base-1: #f6f7f8;
  --body-base-2: #eceff2;
  --status-ok-bg: #dceae4;
  --status-fail-bg: #f3e2e2;
  --nav-mobile-bg: rgba(255, 255, 255, 0.98);
  --quiz-glow: rgba(61, 95, 90, 0.12);
  --badge-bg: rgba(255, 255, 255, 0.94);
  --hero-accent: rgba(61, 95, 90, 0.4);
  --hero-mist: rgba(232, 236, 234, 0.14);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #12171a;
  --bg-deep: #1a2126;
  --surface: #1c2429;
  --ink: #edf1f3;
  --muted: #9aa6af;
  --line: #2a333a;
  --accent: #8fbbb3;
  --accent-soft: #1e2f2c;
  --accent-dark: #b3d4cd;
  --accent-glow: rgba(143, 187, 179, 0.18);
  --danger: #d49292;
  --success: #86c4a8;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.4);
  --header-bg: rgba(14, 18, 21, 0.86);
  --header-line: rgba(42, 51, 58, 0.95);
  --panel-bg: rgba(28, 36, 41, 0.9);
  --panel-solid: #1c2429;
  --ghost-bg: rgba(28, 36, 41, 0.75);
  --footer-bg: rgba(12, 16, 19, 0.9);
  --chip-active: #edf1f3;
  --chip-active-text: #12171a;
  --btn-primary-bg: #edf1f3;
  --btn-primary-text: #12171a;
  --btn-primary-hover: #fff;
  --toast-bg: #edf1f3;
  --toast-text: #12171a;
  --toast-action-bg: #12171a;
  --toast-action-text: #edf1f3;
  --overlay: rgba(0, 0, 0, 0.58);
  --body-glow-1: #1a2826;
  --body-glow-2: #242018;
  --body-base-1: #0e1215;
  --body-base-2: #151b1f;
  --status-ok-bg: #1e2f2c;
  --status-fail-bg: #342424;
  --nav-mobile-bg: rgba(14, 18, 21, 0.98);
  --quiz-glow: rgba(143, 187, 179, 0.14);
  --badge-bg: rgba(28, 36, 41, 0.94);
  --hero-accent: rgba(143, 187, 179, 0.28);
  --hero-mist: rgba(143, 187, 179, 0.1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, var(--body-glow-1) 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 20%, var(--body-glow-2) 0%, transparent 50%),
    linear-gradient(180deg, var(--body-base-1) 0%, var(--bg) 40%, var(--body-base-2) 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s var(--ease), color 0.25s var(--ease);
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  z-index: 3;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.header-inner {
  position: relative;
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-start {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 3;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
}

.brand .brand-mark,
.brand .brand-en {
  pointer-events: auto;
}

.brand-mark {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ink) 35%, var(--accent) 145%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-en {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  font-size: 0.92rem;
  color: var(--muted);
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a.is-active {
  color: var(--accent-dark);
  font-weight: 600;
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: -0.45rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

.cart-link {
  position: relative;
  flex-shrink: 0;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s;
  padding: 0;
  color: inherit;
}

.cart-link:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  display: grid;
  place-items: center;
  font-weight: 600;
  transform-origin: center;
}

.cart-badge.is-empty {
  display: none;
}

.cart-badge.is-pop {
  animation: badge-pop 0.45s var(--ease);
}

.cart-link.is-bump {
  animation: cart-bump 0.45s var(--ease);
}

.cart-link.has-items {
  border-color: var(--accent);
}

.btn.is-added {
  background: var(--success) !important;
  color: #fff !important;
}

@keyframes badge-pop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 6px;
  flex-direction: column;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.nav-toggle.is-open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle.is-open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px var(--accent-glow);
}

.btn-accent:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--ghost-bg);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: -4%;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(18, 28, 30, 0.2) 0%, rgba(18, 28, 30, 0.62) 100%),
    radial-gradient(circle at 70% 30%, var(--hero-accent), transparent 48%),
    url("../assets/images/hero.svg") center / cover no-repeat;
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-float {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 70%, rgba(255, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at 82% 35%, var(--hero-mist), transparent 28%);
  animation: float-soft 10s ease-in-out infinite alternate;
}

@keyframes float-soft {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-12px, 10px, 0); }
}

.hero-content {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto 4.5rem;
  color: #f7f8f9;
  max-width: 640px;
  animation: rise 0.9s var(--ease) both;
}

.hero-brand {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 500;
  line-height: 1.45;
}

.hero p {
  margin: 0 0 1.75rem;
  color: rgba(247, 248, 249, 0.82);
  max-width: 34ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-primary {
  background: #fff;
  color: var(--ink);
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: transparent;
}

.section {
  padding: 4.5rem 0;
}

.section-tight {
  padding-top: 0;
}

.page-content {
  padding: 2rem 0 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.link-more {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.product-media-wrap {
  position: relative;
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-deep);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-hover-actions {
  position: absolute;
  right: 0.7rem;
  left: 0.7rem;
  bottom: 0.7rem;
  display: flex;
  gap: 0.45rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 2;
}

.product-card:hover .product-hover-actions,
.product-card:focus-within .product-hover-actions {
  opacity: 1;
  transform: none;
}

.btn-chip {
  flex: 1;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.92);
  color: #1a2228;
  font-weight: 600;
  font-size: 0.82rem;
  backdrop-filter: blur(8px);
}

.btn-chip-dark {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(26, 34, 40, 0.9);
  color: #fff;
}

.btn-chip.is-added,
.btn-chip-dark.is-added {
  border-color: transparent;
  background: var(--success);
  color: #fff;
}

[data-theme="dark"] .btn-chip {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(28, 36, 41, 0.94);
  color: #edf1f3;
}

[data-theme="dark"] .btn-chip-dark {
  border-color: rgba(143, 187, 179, 0.35);
  background: var(--accent);
  color: #0f1615;
}

[data-theme="dark"] .btn-chip.is-added,
[data-theme="dark"] .btn-chip-dark.is-added {
  background: var(--success);
  color: #0f1615;
  border-color: transparent;
}

.product-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.product-swatches {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.product-swatches span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.product-meta h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.btn-card-add {
  margin-top: 0.65rem;
  min-height: 40px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}

.btn-card-add:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-card-add.is-added {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.product-cat {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.price-old {
  color: var(--muted);
  font-weight: 400;
  text-decoration: line-through;
  font-size: 0.88rem;
}

.badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  background: var(--badge-bg);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.category-tile {
  position: relative;
  min-height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 1.35rem;
  color: #fff;
  isolation: isolate;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 20%, rgba(16, 18, 22, 0.72) 100%),
    var(--tile-bg, #7d868f) center / cover no-repeat;
  transition: transform 0.7s var(--ease);
}

.category-tile:hover::before {
  transform: scale(1.05);
}

.category-tile h3 {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
}

.story-band {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 320px;
  display: grid;
  align-items: center;
  padding: 3rem;
  color: #fff;
  isolation: isolate;
}

.story-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(18, 22, 24, 0.78), rgba(18, 22, 24, 0.35)),
    url("../assets/images/story.svg") center / cover no-repeat;
}

.story-band h2 {
  margin: 0 0 0.75rem;
  max-width: 14ch;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.story-band p {
  margin: 0 0 1.4rem;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.85);
}

.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--ghost-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: all 0.2s var(--ease);
}

.chip.is-active,
.chip:hover,
a.chip.is-active,
a.chip:hover {
  background: var(--chip-active);
  border-color: var(--chip-active);
  color: var(--chip-active-text);
}

a.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sort-select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.sort-select {
  width: auto;
  min-width: 180px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.sort-select:focus {
  border-color: var(--accent);
}

.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.product-gallery {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 4 / 5;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.product-info .lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.option-group {
  margin-bottom: 1.25rem;
}

.option-group > span {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.swatches,
.size-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.swatch.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.size-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.size-btn.is-active {
  background: var(--chip-active);
  color: var(--chip-active-text);
  border-color: var(--chip-active);
}

.qty-row {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.qty-row button {
  width: 42px;
  height: 42px;
}

.qty-row span {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.25rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item img {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-deep);
}

.cart-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.cart-item .meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0 0 0.75rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.remove-btn {
  color: var(--danger);
  font-size: 0.88rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.summary-row.total {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field.full {
  grid-column: 1 / -1;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.status-page {
  min-height: calc(100vh - var(--header-h) - 180px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.status-card {
  width: min(100%, 520px);
  padding: 2.5rem 1.5rem;
  border-radius: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--line);
}

.status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.status-icon.ok {
  background: var(--status-ok-bg);
  color: var(--success);
}

.status-icon.fail {
  background: var(--status-fail-bg);
  color: var(--danger);
}

.status-card h1 {
  margin: 0 0 0.5rem;
}

.status-card p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.status-code {
  font-size: clamp(2.5rem, 8vw, 3.25rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.story-band-fill {
  min-height: 100%;
  padding: 2rem;
}

.form-submit {
  margin-top: 1rem;
}

.checkout-empty .empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
}

#product-not-found.status-page {
  min-height: auto;
  padding: 4rem 0;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.prose {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.75rem;
}

.prose h2 {
  margin-top: 0;
}

.prose p {
  color: var(--muted);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.info-item span {
  color: var(--muted);
}

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 240px at 100% 0%, var(--quiz-glow), transparent 55%),
    var(--footer-bg);
}

.footer-top {
  padding: 3.25rem 0 2.5rem;
}

.footer-inner {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.45fr 0.85fr 0.85fr 1.1fr;
  gap: 2rem 1.75rem;
}

.footer-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  line-height: 1.1;
}

.footer-logo-fa {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--ink) 30%, var(--accent) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-logo-en {
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 500;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.footer-trust span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 95, 90, 0.12);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

.footer-col h3 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
  width: fit-content;
  transition: color 0.22s var(--ease), transform 0.22s var(--ease);
}

.footer-col a:hover {
  color: var(--accent-dark);
  transform: translateX(-3px);
}

.footer-contact p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-contact-link {
  color: var(--ink) !important;
  font-weight: 600;
}

.footer-note {
  margin-top: 0.55rem !important;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
  font-size: 0.85rem !important;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .footer-bottom {
  background: rgba(255, 255, 255, 0.02);
}

.footer-bottom-inner {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
}

.copy {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-bottom-links a {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 500;
}

.footer-bottom-links a:hover {
  color: var(--accent-dark);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.cart-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  max-width: 560px;
  margin-inline: auto;
}

.cart-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.cart-empty h2 {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
}

.cart-empty p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.cart-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cart-filled-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.cart-filled-head h2,
.cart-summary h2 {
  margin: 0;
  font-size: 1.15rem;
}

.cart-filled-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-summary h2 {
  margin-bottom: 1rem;
}

.coupon-box {
  margin-bottom: 1.15rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.coupon-box label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.coupon-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.coupon-form input {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.55rem 0.85rem;
  outline: none;
}

.coupon-form input:focus {
  border-color: var(--accent);
}

.coupon-form .btn {
  min-height: 44px;
  padding-inline: 1rem;
}

.coupon-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(92, 107, 94, 0.25);
}

.coupon-applied strong {
  display: block;
  font-size: 0.95rem;
}

.coupon-applied span {
  color: var(--muted);
  font-size: 0.8rem;
}

.coupon-msg {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
}

.coupon-msg.is-error {
  color: var(--danger);
}

.coupon-msg.is-ok {
  color: var(--success);
}

.summary-discount {
  color: var(--success) !important;
  font-weight: 600;
}

.cart-summary .btn-block {
  margin-top: 0.65rem;
}

.cart-summary .btn-accent {
  margin-top: 1rem;
}

.cart-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.cart-line-price {
  font-weight: 700;
  white-space: nowrap;
}

.cart-line-price small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}

.meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 0.85rem 0.9rem 0.85rem 1.15rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 200;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast-msg {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-action {
  flex-shrink: 0;
  background: var(--toast-action-bg);
  color: var(--toast-action-text);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail,
  .cart-layout,
  .checkout-layout,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: calc(var(--header-h) + 1px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-mobile-bg);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
    display: none;
    z-index: 60;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.4rem;
  }

  .nav a.is-active::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .product-grid,
  .category-grid,
  .form-grid,
  .looks-grid,
  .product-grid-3,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-top {
    padding: 2.5rem 0 1.75rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-content {
    margin-bottom: 3rem;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
  }

  .cart-item > div:last-child {
    grid-column: 2;
  }

  .story-band {
    padding: 2rem 1.25rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .product-hover-actions {
    opacity: 1;
    transform: none;
  }

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

  .cart-drawer {
    width: min(100%, 100vw);
  }
}

/* —— Creative UI: drawer, quick view, looks, quiz —— */
body.ui-lock {
  overflow: hidden;
}

.ui-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  z-index: 80;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.ui-overlay.is-show {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(420px, 92vw);
  background: var(--panel-solid);
  z-index: 90;
  transform: translateX(-105%);
  transition: transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.12);
}

.cart-drawer.is-open {
  transform: none;
}

.drawer-head,
.drawer-foot {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.drawer-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.drawer-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 1.35rem;
  line-height: 1;
  background: var(--surface);
}

.drawer-body {
  padding: 1rem 1.15rem;
  overflow: auto;
  flex: 1;
}

.drawer-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.drawer-item img {
  width: 72px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-deep);
}

.drawer-item-info h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
}

.drawer-item-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.drawer-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.drawer-remove {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.qty-row-sm button,
.qty-row-sm span {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 0.85rem;
}

.drawer-pairs {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.drawer-pairs h4,
.qv-pairs h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.drawer-pair-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-pair {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.drawer-pair img {
  width: 48px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.drawer-pair p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.drawer-pair span {
  color: var(--muted);
  font-size: 0.78rem;
}

.btn-mini {
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}

.qv-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease);
}

.qv-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qv-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: var(--panel-solid);
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(18, 28, 30, 0.22);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

[data-theme="dark"] .qv-panel {
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

.qv-modal.is-open .qv-panel {
  transform: none;
}

.qv-close {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.qv-close:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.qv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.qv-media {
  position: relative;
  min-height: 420px;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 45%),
    linear-gradient(160deg, var(--bg-deep), var(--accent-soft));
  border-left: 1px solid var(--line);
}

.qv-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 420px;
}

.qv-color-bar {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

[data-theme="dark"] .qv-color-bar {
  background: rgba(28, 36, 41, 0.88);
  border-color: var(--line);
}

.qv-color-bar i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.qv-info {
  padding: 2rem 1.6rem 1.75rem;
  background:
    linear-gradient(180deg, var(--panel-solid), var(--panel-solid)),
    var(--panel-solid);
}

.qv-info .product-cat {
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.82rem;
}

.qv-info h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.qv-tagline {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
}

.qv-price {
  margin-bottom: 0.9rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.qv-desc {
  color: var(--muted);
  margin: 0 0 1.2rem;
  font-size: 0.92rem;
  line-height: 1.75;
}

.qv-info .option-group > span {
  color: var(--ink);
}

.qv-info .swatch {
  width: 30px;
  height: 30px;
  border: 2px solid var(--panel-solid);
  box-shadow: 0 0 0 1px var(--line);
}

.qv-info .swatch.is-active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--accent);
}

.qv-info .size-btn {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
}

.qv-info .size-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.qv-info .size-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.qv-info .qty-row {
  background: var(--bg);
  border-color: var(--line);
}

.qv-info .buy-row .btn-ghost {
  background: var(--bg);
}

.qv-pairs {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.qv-pairs h4 {
  color: var(--ink);
}

.qv-pair-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.qv-pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.8rem;
  transition: border-color 0.2s, background 0.2s;
}

.qv-pair-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.qv-pair-chip img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--bg-deep);
}

.looks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.look-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-bg);
}

.look-mosaic {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.3rem;
  height: 240px;
  padding: 0.3rem;
  background: var(--bg-deep);
}

.look-tile {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.look-tile-1 {
  grid-row: 1 / 3;
}

.look-card:hover .look-tile {
  filter: saturate(1.05);
}

.look-card:hover .look-tile-1 {
  transform: scale(1.02);
}

.look-meta {
  padding: 1rem 1.1rem 1.15rem;
}

.look-meta h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.look-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.look-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.look-actions span {
  font-weight: 700;
  font-size: 0.92rem;
}

.quiz-shell {
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 220px at 100% 0%, var(--quiz-glow), transparent 60%),
    var(--panel-bg);
}

.quiz-steps {
  display: grid;
  gap: 1.1rem;
}

.quiz-label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.quiz-hint {
  color: var(--muted);
  margin: 1.25rem 0 0;
}

.product-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.pairs-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.pairs-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.pairs-section > p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .looks-grid,
  .product-grid-3,
  .qv-grid {
    grid-template-columns: 1fr;
  }

  .qv-media {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    min-height: 280px;
  }

  .qv-media img {
    min-height: 280px;
  }

  .qv-info {
    padding: 1.4rem 1.2rem 1.5rem;
  }
}

/* پیش‌نمایش سکشن‌ها */
.preview-badge {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}

.preview-badge-link {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.preview-badge-link:hover {
  color: var(--ink);
}

.preview-note {
  margin: 0;
  color: var(--muted);
}

.preview-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.preview-index-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.preview-index-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.preview-index-item span {
  font-weight: 600;
}

.preview-index-item small {
  color: var(--accent);
  font-size: 0.8rem;
}
