/* ============================================================
   Caftan.io - Avant-Garde Editorial
   Ink black, ghost gray, oxblood, hard edges, print typography
   ============================================================ */

:root {
  --surface: #f9f9f9;
  --surface-dim: #dadada;
  --surface-bright: #ffffff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --surface-variant: #e2e2e2;
  --background: #f9f9f9;
  --on-background: #1a1c1c;
  --on-surface: #1a1c1c;
  --on-surface-variant: #4c4546;
  --inverse-surface: #2f3131;
  --inverse-on-surface: #f1f1f1;
  --outline: #7e7576;
  --outline-variant: #cfc4c5;
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1b1b1b;
  --on-primary-container: #848484;
  --inverse-primary: #c6c6c6;
  --secondary: #af2b3e;
  --on-secondary: #ffffff;
  --secondary-container: #fd6673;
  --on-secondary-container: #680018;
  --tertiary: #000000;
  --on-tertiary: #ffffff;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #93000a;
  --line: rgba(0, 0, 0, 0.16);
  --line-soft: rgba(0, 0, 0, 0.08);
  --font-display: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --font-body: 'Hanken Grotesk', 'Segoe UI', Arial, sans-serif;
  --site-margin: 80px;
  --site-gutter: 24px;
  --section-gap: 128px;
}

html[dir="rtl"] {
  --font-display: 'Amiri', 'Bodoni Moda', serif;
  --font-body: 'Tajawal', 'Hanken Grotesk', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-width: 320px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover {
  color: var(--secondary);
}

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

button {
  border-radius: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--secondary);
  color: var(--on-secondary);
}

.container {
  width: min(100%, 1400px);
  margin: 0 auto;
  padding-inline: var(--site-margin);
}

.container-narrow {
  max-width: 840px;
}

.muted {
  color: var(--on-surface-variant);
}

.small {
  font-size: 0.82rem;
}

.pos {
  color: #186142;
  font-weight: 700;
}

.neg {
  color: var(--secondary);
  font-weight: 700;
}

.lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--on-surface-variant);
}

/* Editorial labels and tags */
.kicker {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--secondary);
}

.kicker-gold {
  color: var(--inverse-primary);
}

.tag,
.badge {
  display: inline-block;
  padding: 0.28rem 0.58rem;
  border: 1px solid currentColor;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--primary);
  background: transparent;
}

.tag {
  margin-bottom: 0.65rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.82rem 1.24rem;
  border: 1px solid var(--primary);
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--on-secondary);
}

.btn-dark,
.btn-gold,
.btn-wa {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.btn-dark:hover,
.btn-gold:hover,
.btn-wa:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: var(--on-secondary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
}

.btn-ghost {
  min-height: 38px;
  padding-inline: 0.55rem;
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  border-color: transparent;
  background: transparent;
  color: var(--secondary);
}

.btn-danger {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-danger:hover {
  background: var(--secondary);
  color: var(--on-secondary);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  min-height: 34px;
  padding: 0.46rem 0.74rem;
  font-size: 0.72rem;
}

.inline-form {
  display: inline-flex;
}

/* Top navigation */
.topbar {
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-bright);
  color: var(--on-surface-variant);
  font-size: 0.72rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 8px;
}

.topbar-tag {
  overflow: hidden;
  font-weight: 800;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  color: var(--on-surface-variant);
  font-size: 0.74rem;
  font-weight: 800;
}

.lang-switch a:hover,
.lang-switch a.on {
  border-color: var(--primary);
  color: var(--primary);
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: var(--surface-bright);
  transition: border-color 0.2s ease;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 30px 24px;
  transition: padding 0.2s ease;
}

.masthead.is-condensed .masthead-inner {
  padding-block: 14px 12px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--primary);
  text-transform: uppercase;
}

.brand:hover {
  color: var(--primary);
}

.brand-dot {
  color: var(--secondary);
  font-style: italic;
  font-weight: 500;
  text-transform: none;
}

.brand-star {
  margin-inline-end: 0.35rem;
  color: var(--secondary);
  font-size: 0.82em;
  line-height: 1;
}

.brand-logo {
  display: block;
  width: auto;
  height: 38px;
  transition: height 0.2s ease;
}

.masthead.is-condensed .brand-logo {
  height: 28px;
}

.brand-logo-light {
  /* Texto oscuro → blanco; hue-rotate devuelve el punto dorado a su tono original */
  filter: invert(1) hue-rotate(180deg);
}

.brand-foot .brand-logo {
  height: 30px;
}

.brand-dash .brand-logo {
  height: 22px;
}

.brand-admin .brand-logo {
  height: 20px;
}

.brand-foot,
.brand-dash,
.brand-admin {
  width: fit-content;
  align-items: center;
}

.masthead-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.mainnav {
  border-top: 1px solid var(--line-soft);
}

.mainnav-inner {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-block: 13px;
  scrollbar-width: thin;
}

.mainnav a {
  flex: 0 0 auto;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  color: var(--on-surface-variant);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.mainnav a:hover,
.mainnav a.on {
  border-bottom-color: var(--secondary);
  color: var(--primary);
}

/* Flash */
.flash {
  margin-top: 16px;
  padding: 0.9rem 1.05rem;
  border: 1px solid currentColor;
  background: var(--surface-container-lowest);
  color: var(--primary);
  font-size: 0.92rem;
  word-break: break-word;
}

.flash-ok {
  color: #186142;
}

.flash-err {
  color: var(--error);
}

.flash-info {
  color: var(--on-surface-variant);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 76px 104px;
  background: var(--surface);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--site-gutter);
  align-items: start;
}

.hero-copy {
  grid-column: 1 / span 8;
  padding-top: 0;
}

.hero-title {
  max-width: 15ch;
  margin-bottom: 1.35rem;
  color: var(--primary);
  font-size: 5.2rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-sub {
  max-width: 39rem;
  margin-bottom: 2rem;
  color: var(--on-surface-variant);
  font-size: 1.14rem;
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-rule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-block: 2.2rem 1rem;
  color: var(--secondary);
}

.hero-rule::before,
.hero-rule::after {
  content: '';
  height: 1px;
  background: var(--line);
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.hero-cats a {
  border-bottom: 1px solid var(--line);
  color: var(--on-surface-variant);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-style: italic;
}

.hero-cats a:hover {
  border-bottom-color: var(--secondary);
  color: var(--secondary);
}

.hero-cover {
  grid-column: 9 / span 4;
  display: block;
  border-top: 4px solid var(--primary);
  color: var(--primary);
}

.hero-cover:hover {
  color: var(--primary);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(18%) contrast(1.05);
}

.hero-cover-cap {
  padding-top: 18px;
}

.hero-cover-cap strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.05;
}

/* Sections */
.section {
  padding-block: var(--section-gap);
}

.section-tinted {
  border-block: 1px solid var(--line-soft);
  background: var(--surface-container-low);
}

.section-dark {
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
}

.section-dark h2,
.section-dark h3 {
  color: var(--inverse-on-surface);
}

.section-dark .muted {
  color: rgba(241, 241, 241, 0.62);
}

.section-dark .kicker {
  color: var(--inverse-primary);
}

.section-dark .sec-head {
  border-bottom-color: rgba(241, 241, 241, 0.2);
}

.section-dark .see-all {
  color: var(--inverse-primary);
}

.section-last {
  padding-bottom: 144px;
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 2.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.sec-head h2 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.see-all {
  align-self: end;
  color: var(--on-surface-variant);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.see-all:hover {
  color: var(--secondary);
}

/* Grids and cards */
.grid {
  display: grid;
  gap: 32px var(--site-gutter);
}

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

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

.card-post,
.card-product,
.card-store {
  min-width: 0;
  background: transparent;
}

.card-img {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface-container-highest);
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(12%) contrast(1.02);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.card-img:hover img {
  transform: scale(1.025);
  filter: grayscale(0%) contrast(1.03);
}

.ratio-43 {
  aspect-ratio: 4 / 3;
}

.ratio-45 {
  aspect-ratio: 4 / 5;
}

.ratio-21 {
  aspect-ratio: 21 / 10;
}

.card-body {
  padding-top: 1.08rem;
}

.card-body h3 {
  margin-bottom: 0.48rem;
  font-size: 1.32rem;
  line-height: 1.08;
}

.card-body h3 a:hover {
  color: var(--secondary);
}

.card-body p {
  color: var(--on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.58;
}

.card-meta {
  margin-top: 0.6rem;
  color: var(--outline);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.price {
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1;
}

.badge-offer {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 1;
  padding: 0.32rem 0.58rem;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.store-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.store-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-container-lowest);
  object-fit: cover;
}

.store-excerpt {
  margin-top: 0.65rem;
  color: var(--on-surface-variant);
  font-size: 0.92rem;
}

/* Cities */
.city-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--site-gutter);
}

.city-tile {
  display: flex;
  min-height: 152px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 1.35rem;
  border: 1px solid rgba(241, 241, 241, 0.24);
  background: transparent;
  color: inherit;
}

.city-tile strong {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 0.98;
}

.city-orn {
  color: var(--secondary-container);
  font-size: 0.82rem;
}

.city-tile:hover {
  border-color: var(--secondary-container);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
}

.city-grid-light .city-tile {
  border-color: var(--line);
  background: var(--surface-bright);
  color: var(--primary);
}

.city-grid-light .city-tile:hover {
  border-color: var(--primary);
  background: var(--surface-container-low);
}

/* CTA */
.cta-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--site-gutter);
}

.cta-panel {
  min-height: 300px;
  padding: 3rem;
  border-top: 4px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.cta-bordeaux {
  background: var(--secondary);
  border-top-color: var(--secondary);
}

.cta-emerald {
  background: var(--inverse-surface);
  border-top-color: var(--primary);
}

.cta-panel h3 {
  max-width: 12ch;
  margin-bottom: 1rem;
  color: inherit;
  font-size: 2.35rem;
  line-height: 1;
}

.cta-panel p {
  max-width: 34rem;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.62;
}

.cta-panel .btn {
  border-color: var(--on-primary);
  background: var(--on-primary);
  color: var(--primary);
}

.cta-panel .btn:hover {
  border-color: var(--on-primary);
  background: transparent;
  color: var(--on-primary);
}

/* Editorial list */
.edito-list {
  border-top: 1px solid var(--line);
}

.edito-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.edito-row:hover {
  color: inherit;
}

.edito-num {
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-style: italic;
  line-height: 1;
}

.edito-title {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.02;
}

.edito-row:hover .edito-title {
  color: var(--secondary);
}

.edito-cat {
  margin: 0;
}

/* Page heads and filters */
.page-head {
  padding-block: 92px 58px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.page-head h1 {
  max-width: 14ch;
  margin-bottom: 0.75rem;
  font-size: 4.8rem;
  line-height: 0.94;
  overflow-wrap: break-word;
}

.page-head .lead {
  max-width: 48rem;
}

.cat-bar,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2.4rem;
}

.cat-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.46rem 0.72rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--on-surface-variant);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cat-bar a:hover,
.cat-bar a.on {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.filter-bar input[type="search"] {
  flex: 2 1 260px;
}

.filter-bar select {
  flex: 1 1 180px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0.72rem 0;
  border: 0;
  border-bottom: 1px solid var(--primary);
  border-radius: 0;
  background: transparent;
  color: var(--primary);
}

.filter-bar input:focus,
.filter-bar select:focus {
  outline: 0;
  border-bottom-color: var(--secondary);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 3.2rem;
}

.pagination a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  font-weight: 800;
}

.pagination a:hover,
.pagination a.on {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.empty {
  padding-block: 3rem;
  color: var(--on-surface-variant);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  text-align: center;
}

/* Article */
.crumbs {
  margin-bottom: 1.6rem;
  color: var(--outline);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.crumbs a:hover {
  color: var(--secondary);
}

.post-head {
  padding-block: 74px 36px;
  text-align: center;
}

.post-head h1 {
  max-width: 12ch;
  margin: 0.7rem auto 1rem;
  font-size: 4.4rem;
  line-height: 0.96;
}

.post-meta {
  color: var(--outline);
  font-size: 0.86rem;
}

.post-cover {
  margin-bottom: 3rem;
  border-top: 4px solid var(--primary);
}

.post-cover img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  filter: grayscale(12%) contrast(1.03);
}

.post-body,
.landing-content {
  color: var(--on-surface);
  font-size: 1.08rem;
  line-height: 1.85;
}

.post-body p,
.landing-content p {
  margin-bottom: 1.35rem;
}

.post-body h2,
.landing-content h2 {
  margin: 2.6rem 0 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  font-size: 2.2rem;
}

.post-body figure,
.landing-content figure {
  margin: 2rem 0;
}

.post-body img,
.landing-content img {
  display: block;
  max-width: 100%;
  height: auto;
}

.post-body figcaption,
.landing-content figcaption {
  margin-top: 0.55rem;
  color: var(--outline);
  font-size: 0.86rem;
  line-height: 1.45;
}

.post-body > p:first-of-type::first-letter {
  float: inline-start;
  padding-inline-end: 0.5rem;
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 0.85;
}

.post-end {
  padding-block: 2.8rem 1rem;
  color: var(--secondary);
  letter-spacing: 0;
  text-align: center;
}

/* Product and store pages */
.product-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--site-gutter);
  align-items: start;
}

.product-media {
  grid-column: 1 / span 6;
}

.product-info {
  grid-column: 8 / span 5;
}

.product-main-img {
  border-top: 4px solid var(--primary);
}

.product-main-img img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.product-thumbs img {
  width: 84px;
  height: 100px;
  border: 1px solid var(--line);
  object-fit: cover;
}

/* Clickable photos: reuse the .gen-preview image modal */
.product-main-img .gen-preview img {
  display: block;
}

.product-thumbs .gen-preview {
  width: auto;
}

.product-info h1 {
  margin-bottom: 1rem;
  font-size: 3.5rem;
  line-height: 0.98;
}

.product-price {
  margin-bottom: 1.35rem;
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.product-desc {
  margin-bottom: 1.8rem;
  color: var(--on-surface-variant);
  font-size: 1rem;
  line-height: 1.7;
}

.product-store {
  margin-bottom: 1.8rem;
  padding-block: 1.15rem;
  border-block: 1px solid var(--line);
}

.store-link {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.store-link:hover {
  color: var(--secondary);
}

.product-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-hero {
  margin-bottom: 88px;
}

.store-hero-img {
  height: 360px;
  overflow: hidden;
  background: var(--surface-container-highest);
}

.store-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(12%) contrast(1.03);
}

.store-hero-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: -72px;
  padding-block: 1.4rem;
  border-top: 4px solid var(--primary);
  background: var(--surface-bright);
}

.store-logo-lg {
  width: 92px;
  height: 92px;
}

.store-hero-info {
  min-width: 220px;
  flex: 1;
}

.store-hero-info h1 {
  font-size: 3rem;
  line-height: 0.98;
}

.store-cols {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.store-aside {
  position: sticky;
  top: 116px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  background: var(--surface-bright);
}

.store-aside h3 {
  margin-bottom: 1rem;
  font-size: 1.45rem;
}

.store-aside p {
  margin-bottom: 1rem;
  color: var(--on-surface-variant);
  font-size: 0.94rem;
}

.store-desc {
  margin-top: 0.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  color: var(--on-surface-variant);
  font-size: 0.94rem;
}

/* Auth and errors */
.auth-wrap {
  display: grid;
  min-height: 70vh;
  place-items: center;
  padding: 86px 28px 112px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 2.7rem 2.4rem;
  border-top: 4px solid var(--primary);
  background: var(--surface-bright);
  text-align: center;
}

.auth-orn {
  margin-bottom: 0.8rem;
  color: var(--secondary);
  font-size: 1.25rem;
}

.auth-card h1 {
  margin-bottom: 0.65rem;
  font-size: 2.6rem;
}

.auth-card .lead {
  margin-bottom: 1.8rem;
  font-size: 0.98rem;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 1.5rem;
  font-size: 0.88rem;
}

.auth-links a {
  color: var(--secondary);
  font-weight: 700;
}

.err-card .err-code {
  margin-bottom: 0.65rem;
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 5.4rem;
  font-style: italic;
  line-height: 0.9;
}

/* Forms */
.form {
  text-align: start;
}

.form label {
  display: block;
  margin-bottom: 1.15rem;
  color: var(--on-surface);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form label small {
  color: var(--outline);
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: none;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.72rem 0;
  border: 0;
  border-bottom: 1px solid var(--primary);
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  resize: vertical;
}

.form textarea {
  min-height: 130px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 0;
  border-bottom-color: var(--secondary);
}

.form input[type="file"] {
  padding-block: 0.8rem;
}

.form-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.form-2col .span2 {
  grid-column: span 2;
}

.check {
  display: flex !important;
  align-items: center;
  gap: 9px;
  text-transform: none !important;
}

.check input {
  width: auto !important;
  margin: 0 !important;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 44px;
  padding-block: 68px 44px;
}

.brand-foot {
  margin-bottom: 1rem;
  color: var(--on-primary);
  font-size: 1.72rem;
}

.footer-brand p {
  max-width: 27rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.94rem;
}

.footer h4 {
  margin-bottom: 1rem;
  color: var(--inverse-primary);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer a {
  display: block;
  padding-block: 0.24rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.93rem;
}

.footer a:hover {
  color: var(--secondary-container);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-block: 22px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
}

.footer-orn {
  color: var(--secondary-container);
  letter-spacing: 0;
  white-space: nowrap;
}

/* Dashboard */
.dash-body {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--surface-container-low);
  direction: ltr;
}

.dash-side {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: var(--primary);
  color: var(--on-primary);
  min-width: 0;
  max-width: 100%;
}

.brand-dash {
  color: var(--on-primary);
  font-size: 1.28rem;
}

.brand-dash:hover {
  color: var(--on-primary);
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.dash-user strong {
  display: block;
  color: var(--on-primary);
  font-size: 0.96rem;
}

.dash-user .muted {
  color: var(--inverse-primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dash-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.dash-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.68rem 0.78rem;
  border-left: 2px solid transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  font-weight: 700;
}

.dash-nav a .ic {
  width: 1.1rem;
  color: var(--inverse-primary);
  text-align: center;
}

.dash-nav a:hover,
.dash-nav a.on {
  border-left-color: var(--secondary-container);
  background: rgba(255, 255, 255, 0.06);
  color: var(--on-primary);
}

.dash-admin-link {
  margin-top: 12px;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.dash-side-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-side-foot .lang-switch a {
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.68);
}

.dash-side-foot .lang-switch a.on,
.dash-side-foot .lang-switch a:hover {
  border-color: var(--on-primary);
  color: var(--on-primary);
}

.dash-side-foot .btn-outline {
  border-color: rgba(255, 255, 255, 0.46);
  color: var(--on-primary);
}

.dash-side-foot .btn-outline:hover {
  border-color: var(--secondary-container);
  background: var(--secondary);
}

.dash-main {
  grid-column: 2;
  grid-row: 1;
  width: min(100%, 1220px);
  max-width: 100%;
  padding: 40px 44px 72px;
  min-width: 0;
}

.dash-body.rtl .dash-main,
.dash-body.rtl .dash-user > div,
.dash-body.rtl .dash-side-foot {
  direction: rtl;
}

.dash-body.rtl .dash-nav a {
  direction: rtl;
  text-align: right;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.65rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.dash-head h1 {
  font-size: 3rem;
  line-height: 0.98;
}

.dash-head .orn {
  color: var(--secondary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 1.8rem;
}

.stat-card,
.panel,
.plan-card,
.package-card,
.gen-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-bright);
}

.stat-card {
  padding: 1.25rem 1.3rem;
}

.stat-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--outline);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.stat-link {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.panel {
  margin-bottom: 1.6rem;
  padding: 1.7rem;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}

.panel-head h2 {
  font-size: 1.7rem;
  line-height: 1;
}

.lang-block {
  margin-bottom: 0.9rem;
  border: 1px solid var(--line-soft);
}

.lang-block summary {
  padding: 0.8rem 1rem;
  cursor: pointer;
  user-select: none;
}

.lang-block summary em {
  color: var(--ink-soft, #8a8a8a);
  font-style: normal;
  font-size: 0.85em;
}

.lang-block label {
  display: block;
  padding: 0 1rem;
  margin-bottom: 0.9rem;
}

.panel-cta {
  padding: 3.2rem 2rem;
  text-align: center;
}

.panel-cta h2 {
  margin-bottom: 1.4rem;
}

.panel-locked {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  text-align: center;
}

.panel-locked h2 {
  margin-bottom: 1rem;
  color: var(--on-primary);
  font-size: 2.4rem;
}

.panel-locked p {
  max-width: 38rem;
  margin: 0 auto 1.8rem;
  color: rgba(255, 255, 255, 0.72);
}

.locked-orn {
  margin-bottom: 1.4rem;
  color: var(--secondary-container);
  letter-spacing: 0;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.52rem 0.9rem;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.84rem;
  font-weight: 800;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  padding: 0.64rem 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--outline);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: start;
  text-transform: uppercase;
}

.table td {
  padding: 0.78rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table .actions {
  white-space: nowrap;
}

.thumb {
  width: 52px;
  height: 62px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.thumb-wide {
  width: 90px;
  height: 44px;
}

.badge-approved,
.badge-paid {
  color: #186142;
}

.badge-pending {
  color: var(--outline);
}

.badge-rejected,
.badge-suspended,
.badge-deleted {
  color: var(--secondary);
}

/* Plans and packages */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 1.8rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 0.82rem;
  padding: 1.45rem 1.15rem;
}

.plan-card.highlight {
  border-top: 4px solid var(--secondary);
}

.plan-card.current {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.plan-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.plan-price {
  color: var(--secondary);
  font-size: 1.28rem;
  font-weight: 800;
}

.plan-price span {
  color: var(--outline);
  font-size: 0.76rem;
  font-weight: 500;
}

.plan-feats {
  counter-reset: plan-feature;
  flex: 1;
  list-style: none;
  font-size: 0.84rem;
}

.plan-feats li {
  counter-increment: plan-feature;
  padding-block: 0.34rem;
  border-bottom: 1px solid var(--line-soft);
}

.plan-feats li::before {
  content: counter(plan-feature, decimal-leading-zero);
  margin-inline-end: 0.45rem;
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.plan-feats li.off {
  color: rgba(26, 28, 28, 0.38);
  text-decoration: line-through;
}

.plan-choice-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-period-options {
  display: grid;
  gap: 7px;
}

.plan-period-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--surface-bright);
  font-size: 0.8rem;
}

.plan-period-option input {
  margin: 0;
}

.plan-period-option strong {
  white-space: nowrap;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.package-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.55rem;
  text-align: center;
}

.package-credits {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 0.95;
}

.package-name {
  margin-top: 0.45rem;
  font-weight: 800;
}

.package-price {
  margin-bottom: 0.8rem;
  color: var(--secondary);
  font-weight: 800;
}

/* Studio */
.studio-cols {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.studio-left {
  min-width: 0;
}

.studio-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: -1px;
}

.studio-tab {
  padding: 0.62rem 1.1rem;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface-container-low);
  color: var(--outline);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.studio-tab + .studio-tab {
  border-left: 0;
}

.studio-tab:hover:not(.is-active) {
  color: var(--on-surface);
}

.studio-tab.is-active {
  background: var(--surface-bright);
  color: var(--primary);
}

.studio-hide {
  display: none !important;
}

.gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.gen-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gen-card {
  overflow: hidden;
}

.gen-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.gen-preview:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
}

.gen-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.gen-card figcaption {
  padding: 0.55rem 0.65rem;
  color: var(--on-surface-variant);
  font-size: 0.72rem;
}

.gen-card .dl {
  display: block;
  margin-top: 0.25rem;
  color: var(--secondary);
  font-weight: 800;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.88);
}

.image-modal.is-open {
  display: flex;
}

.image-modal-panel {
  position: relative;
  display: grid;
  max-width: min(96vw, 1200px);
  max-height: 94vh;
  gap: 12px;
}

.image-modal img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 76px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: contain;
}

.image-modal-caption {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.image-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--on-primary);
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
  border-color: var(--secondary);
  background: var(--secondary);
}

/* Row forms */
.row-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.row-form input,
.row-form select {
  max-width: 220px;
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-bright);
  color: var(--primary);
  font-size: 0.84rem;
}

.row-form input[type="number"] {
  width: 90px;
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  animation: rise 0.62s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.reveal.d1 {
  animation-delay: 0.1s;
}

.reveal.d2 {
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* RTL */
html[dir="rtl"] body {
  letter-spacing: 0;
}

html[dir="rtl"] .hero-title,
html[dir="rtl"] .page-head h1,
html[dir="rtl"] .post-head h1 {
  line-height: 1.25;
}

/* Responsive */
@media (max-width: 1180px) {
  :root {
    --site-margin: 48px;
    --section-gap: 104px;
  }

  .hero-title {
    font-size: 4.5rem;
  }

  .page-head h1,
  .post-head h1 {
    font-size: 3.9rem;
  }

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

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

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

  .studio-cols {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  :root {
    --site-margin: 28px;
    --section-gap: 84px;
  }

  .topbar-inner,
  .masthead-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead-side {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mainnav-inner {
    gap: 1.25rem;
  }

  .hero {
    padding-top: 72px;
  }

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

  .hero-copy,
  .hero-cover,
  .product-media,
  .product-info {
    grid-column: auto;
  }

  .hero-title {
    max-width: 10ch;
    font-size: 3.7rem;
  }

  .hero-cover {
    width: min(100%, 520px);
  }

  .sec-head {
    grid-template-columns: 1fr;
  }

  .sec-head h2,
  .dash-head h1 {
    font-size: 2.45rem;
  }

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

  .cta-duo,
  .store-cols {
    grid-template-columns: 1fr;
  }

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

  .store-aside {
    position: static;
  }

  .dash-body {
    grid-template-columns: 1fr;
  }

  .dash-side,
  .dash-main {
    grid-column: 1;
    grid-row: auto;
  }

  .dash-side {
    position: static;
    height: auto;
  }

  .dash-main {
    padding: 28px 24px 56px;
  }

  .form-2col {
    grid-template-columns: 1fr;
  }

  .form-2col .span2 {
    grid-column: span 1;
  }

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

@media (max-width: 620px) {
  :root {
    --site-margin: 20px;
    --section-gap: 72px;
  }

  .brand {
    font-size: 1.72rem;
  }

  .brand-logo {
    height: 30px;
  }

  .topbar-tag {
    white-space: normal;
  }

  .hero-title {
    font-size: 3.2rem;
  }

  .hero-sub,
  .lead {
    font-size: 1rem;
  }

  .page-head {
    padding-block: 64px 42px;
  }

  .page-head h1,
  .post-head h1,
  .product-info h1 {
    font-size: 3rem;
  }

  .sec-head h2,
  .dash-head h1 {
    font-size: 2.2rem;
  }

  .grid-3,
  .grid-4,
  .city-grid,
  .plan-grid,
  .package-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    min-height: auto;
    padding: 2rem;
  }

  .cta-panel h3 {
    font-size: 2rem;
  }

  .edito-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .edito-title {
    font-size: 1.58rem;
  }

  .store-hero-img {
    height: 240px;
  }

  .store-hero-card {
    margin-top: 0;
  }

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

  .footer-bottom {
    flex-direction: column;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Studio - visual pickers */
.form .picker {
  margin-bottom: 1.15rem;
  padding: 0;
  border: 0;
}

.form .picker legend {
  margin-bottom: 0.5rem;
  color: var(--on-surface);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form .picker small {
  display: block;
  margin-top: 0.4rem;
}

.pick-grid {
  display: grid;
  gap: 8px;
}

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

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

.pick-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form .pick-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  text-transform: none;
}

.form .pick-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}

.pick-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 100%;
  padding: 10px 6px;
  border: 1px solid var(--line);
  background: var(--surface-container-lowest);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pick-card:hover .pick-body {
  border-color: var(--outline);
}

.pick-card input:checked + .pick-body {
  border-color: var(--primary);
  background: var(--surface-container-low);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.pick-card input:focus-visible + .pick-body {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.pick-card.is-locked {
  cursor: not-allowed;
  opacity: 0.45;
}

.pick-icon {
  width: 32px;
  height: 40px;
  color: var(--on-surface-variant);
}

.pick-icon svg {
  width: 100%;
  height: 100%;
}

.pick-card input:checked + .pick-body .pick-icon,
.pick-card input:checked + .pick-body .pick-ratio {
  color: var(--secondary);
}

.pick-name {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.pick-sub {
  color: var(--on-surface-variant);
  font-size: 0.62rem;
  line-height: 1.3;
}

.pick-swatch {
  position: relative;
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
}

.pick-style-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  object-fit: cover;
}

.pick-swatch i {
  position: absolute;
  inset-inline-end: 5px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.pick-ratio-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
}

.pick-ratio {
  display: block;
  height: 38px;
  border: 1.6px solid currentColor;
  color: var(--on-surface-variant);
}

.pick-cost {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 800;
}

.form .upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 18px 10px;
  border: 1px dashed var(--outline);
  cursor: pointer;
  text-transform: none;
  transition: border-color 0.15s ease;
}

.form .upload-zone:hover {
  border-color: var(--primary);
}

.form .upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}

.form .upload-zone.is-locked {
  cursor: not-allowed;
  opacity: 0.5;
}

.upload-icon {
  font-size: 1.1rem;
}

.upload-hint {
  color: var(--on-surface-variant);
  font-size: 0.68rem;
}

.ref-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ref-previews img {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.scene-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.scene-ref-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.scene-ref-label {
  color: var(--outline);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.form .upload-zone-sm {
  padding: 12px 8px;
}

@media (max-width: 480px) {
  .scene-ref-grid {
    grid-template-columns: 1fr;
  }
}

/* Studio - async generation states */
.gen-loading {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 4 / 5;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-container);
}

.gen-loading-ref {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: grayscale(0.4) blur(1.5px);
}

.gen-spinner {
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: gen-spin 0.9s linear infinite;
}

@keyframes gen-spin {
  to { transform: rotate(360deg); }
}

.gen-loading-text {
  position: relative;
  max-width: 90%;
  color: var(--on-surface-variant);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.gen-card.is-failed .gen-loading {
  border-color: var(--error);
}

.gen-failed-mark {
  position: relative;
  color: var(--error);
  font-size: 1.3rem;
  font-weight: 800;
}

.gen-card.is-failed .gen-loading-text {
  color: var(--error);
  text-transform: none;
}

#studio-form button[type="submit"].is-loading {
  opacity: 0.6;
  pointer-events: none;
}

form[data-loading] button.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

form[data-loading] button.is-loading::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-inline-start: 0.5em;
  vertical-align: -0.1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: gen-spin 0.8s linear infinite;
}

.pick-body-row {
  padding: 8px 6px;
}

.gen-card button.dl {
  padding: 0;
  border: 0;
  background: none;
  color: var(--secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  font-weight: 800;
}

.make-product {
  margin: 0;
}

.product-studio .studio-cols {
  grid-template-columns: 280px minmax(0, 1fr);
}

@media (prefers-reduced-motion: reduce) {
  .gen-spinner {
    animation-duration: 2.5s;
  }
}
