@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --bg: #07090e;
  --bg-glow: #0e1320;
  --panel: #101522;
  --panel-2: #151c2c;
  --text: #f5f7fc;
  --muted: #9aa6bd;
  --blue: #5b8cff;
  --blue-strong: #3d74ff;
  --line: rgba(148, 163, 194, 0.16);
  --line-strong: rgba(148, 163, 194, 0.28);
  --line-soft: rgba(91, 140, 255, 0.16);
  --danger: #ff6b7a;
  --ok: #5ddea4;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 12px 32px rgba(61, 116, 255, 0.22);
  --surface:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--panel);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 480px at 8% -8%, rgba(91, 140, 255, 0.14), transparent 58%),
    radial-gradient(900px 420px at 92% 0%, rgba(64, 201, 255, 0.07), transparent 52%),
    radial-gradient(700px 360px at 50% 100%, rgba(91, 140, 255, 0.05), transparent 60%),
    linear-gradient(180deg, var(--bg-glow), var(--bg) 48%);
  background-attachment: fixed;
  color: var(--text);
  color-scheme: dark;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(91, 140, 255, 0.35);
  color: #fff;
}

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

/* Site-wide native dropdowns */
select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 40px 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background-color: rgba(15, 20, 32, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa6bd 50%),
    linear-gradient(135deg, #9aa6bd 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    auto;
  background-repeat: no-repeat;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color-scheme: dark;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s var(--ease-out),
    background-color 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

select:hover {
  border-color: rgba(91, 140, 255, 0.4);
  background-color: rgba(18, 24, 38, 0.98);
}

select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(91, 140, 255, 0.18);
  background-image:
    linear-gradient(45deg, transparent 50%, #c7d2fe 50%),
    linear-gradient(135deg, #c7d2fe 50%, transparent 50%),
    linear-gradient(180deg, rgba(91, 140, 255, 0.08), transparent 55%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    auto;
  background-repeat: no-repeat;
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select option,
select optgroup {
  background: #101522;
  color: var(--text);
}

/* Site-wide checkboxes: forced square, rounded corners, brand-colored */
input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 20px !important;
  flex-shrink: 0 !important;
  vertical-align: middle;
  border: 1.5px solid var(--line-strong) !important;
  border-radius: 6px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel-2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: inline-grid !important;
  place-content: center;
  line-height: 0 !important;
  transition:
    border-color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.14s var(--ease-out);
  background-color: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:hover {
  border-color: rgba(91, 140, 255, 0.55) !important;
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.1), transparent 55%),
    var(--panel-2) !important;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.22);
}

input[type="checkbox"]:checked {
  border-color: var(--blue-strong) !important;
  background: linear-gradient(180deg, #6b97ff 0%, var(--blue-strong) 100%) !important;
  box-shadow: 0 4px 14px rgba(61, 116, 255, 0.28);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:checked:hover {
  filter: brightness(1.06);
}

input[type="checkbox"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

input[type="checkbox"]:disabled:hover {
  border-color: var(--line-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel-2) !important;
}

main {
  flex: 1 0 auto;
  width: 100%;
  animation: pageEnter 0.45s var(--ease-out);
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }

  .shop-card,
  .shop-card:hover,
  .shop-card:hover .model-image img,
  .btn-primary,
  .btn-secondary,
  .card-bottom button,
  .project-asset-card {
    transition: none;
    transform: none;
  }

  .model-image-main,
  .shop-card:hover .model-image-main {
    transition: none;
    transform: translate(-50%, -50%);
  }
}

.nav {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: none;
  height: 80px;
  margin: 0;
  padding: 0 clamp(20px, 3vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  flex-shrink: 0;
  box-sizing: border-box;
  background: transparent;
  border-bottom: 0;
}

.logo {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  color: white;
  font-size: clamp(42px, 4.2vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  z-index: 2;
  margin-left: clamp(18px, 4.5vw, 72px);
  transition: opacity 0.2s var(--ease-out);
}

.logo:hover {
  opacity: 0.88;
}

.logo span {
  color: var(--blue);
}

.nav > nav,
.nav-actions {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  margin: 0;
  min-width: 0;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.nav nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out);
}

.nav nav a:hover,
.nav nav a.nav-active,
.admin-nav-link:hover,
.admin-nav-link.nav-active {
  color: white;
  background: rgba(91, 140, 255, 0.14);
}

.admin-nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out);
}

.admin-nav-link[hidden] {
  display: none !important;
}

.shop-hero {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 75px 24px 35px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: #9bb4ff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 12px 0;
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}

h2 {
  margin: 8px 0 0;
  font-size: 32px;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.intro {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.shop-section {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  padding: 30px clamp(16px, 2.5vw, 36px) 85px;
}

.shop-section-top {
  padding-top: 18px;
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
}

.shop-market-heading {
  width: 100%;
  margin: 0 auto 28px;
  text-align: center;
}

.shop-market-heading h1 {
  margin: 0;
  font-size: clamp(40px, 5.6vw, 65px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--text);
}

.shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
}

.shop-search {
  display: block;
  width: 100%;
}

.shop-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 14px 16px;
  background: rgba(15, 20, 32, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  color-scheme: dark;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.shop-search input:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(91, 140, 255, 0.16);
}

.shop-search input::placeholder {
  color: #7d8699;
}

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

.shop-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  gap: clamp(16px, 1.8vw, 28px);
  align-items: start;
  min-height: min(52vh, 480px);
}

/* Balance the left filters column so the product grid sits in the true center */
.shop-layout::after {
  content: "";
  display: block;
  min-width: 0;
  pointer-events: none;
}

.shop-filters-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(30, 41, 59, 0.8);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.shop-filter-block h3,
.shop-filters-panel .shop-max-price-header h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.shop-max-price-header h3 {
  margin: 0;
}

.shop-sidebar h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-max-price {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.shop-max-price-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.7);
  color: #94a3b8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out);
}

.price-toggle:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(71, 85, 105, 0.95);
}

.shop-max-price-controls {
  display: none;
  align-items: center;
}

.shop-max-price.is-on .shop-max-price-controls {
  display: flex;
}

.shop-max-price.is-on .price-toggle {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
}

.shop-max-price-controls input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
}

.shop-max-price-controls input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.collection-combo {
  position: relative;
  width: 100%;
}

.collection-combo-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 55%),
    rgba(15, 20, 32, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.collection-combo-trigger:hover {
  border-color: rgba(91, 140, 255, 0.4);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.08), transparent 55%),
    rgba(18, 24, 38, 0.98);
}

.collection-combo-trigger[aria-expanded="true"] {
  border-color: var(--blue);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.1), transparent 55%),
    rgba(18, 24, 38, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 3px rgba(91, 140, 255, 0.16);
}

.collection-combo-trigger[aria-expanded="true"] .collection-combo-caret {
  transform: rotate(180deg);
  border-top-color: #c7d2fe;
}

.collection-combo-caret {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #9aa6bd;
  flex-shrink: 0;
  transition: transform 0.18s var(--ease-out), border-top-color 0.18s var(--ease-out);
}

.collection-combo-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(12, 17, 28, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.collection-combo-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 32, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  color-scheme: dark;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.collection-combo-search::placeholder {
  color: #7f8aa3;
  opacity: 1;
}

.collection-combo-search:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.16);
}

.collection-combo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow: auto;
  padding-right: 2px;
}

.collection-combo-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    color 0.15s var(--ease-out),
    background 0.15s var(--ease-out),
    border-color 0.15s var(--ease-out);
}

.collection-combo-option:hover {
  color: var(--text);
  background: rgba(91, 140, 255, 0.1);
  border-color: rgba(91, 140, 255, 0.18);
}

.collection-combo-option.is-active {
  color: #e8eeff;
  background: rgba(91, 140, 255, 0.16);
  border-color: rgba(91, 140, 255, 0.32);
}

.collection-combo-empty {
  margin: 0;
  padding: 14px 12px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.shop-results-box {
  position: relative;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(18px, 2.2vw, 28px);
  background:
    linear-gradient(180deg, rgba(22, 32, 52, 0.92), rgba(12, 18, 32, 0.88));
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(0, 0, 0, 0.22);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2vw, 28px);
  min-width: 0;
  width: 100%;
}

.shop-grid.is-empty {
  position: relative;
  min-height: min(48vh, 440px);
  width: 100%;
}

.shop-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 4px;
}

.shop-pagination[hidden] {
  display: none !important;
}

.shop-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out);
}

.shop-page-btn:hover {
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(100, 116, 139, 0.95);
}

.shop-page-btn.is-active {
  color: #f8fafc;
  background: rgba(91, 140, 255, 0.22);
  border-color: rgba(91, 140, 255, 0.55);
  cursor: default;
}

.shop-page-meta {
  width: 100%;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.shop-empty-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin: 0;
  padding: 0 24px;
  width: max-content;
  max-width: min(90vw, 640px);
  text-align: center;
  color: var(--muted);
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 500;
  line-height: 1.35;
  background: none;
  border: none;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .shop-layout {
    grid-template-columns: 240px minmax(0, 1fr) 240px;
  }
}

/* Tablets */
@media (max-width: 900px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

/* Phones / narrow tablets */
@media (max-width: 800px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-layout::after {
    display: none;
  }

  .shop-results-box {
    padding: 14px;
    border-radius: 16px;
    gap: 14px;
  }

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

  .shop-card {
    border-radius: 14px;
  }

  .model-image,
  .model-image-empty {
    height: 0;
    padding-bottom: 80%;
  }

  .model-image-main {
    width: 74%;
    height: 74%;
  }

  .card-content {
    padding: 8px;
    gap: 0;
  }

  /* Keep phone cards compact — mostly the square preview */
  .card-collections,
  .card-content > p:not(.card-collections) {
    display: none;
  }

  .card-content h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-bottom {
    margin-top: 8px;
    padding-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
  }

  .card-bottom .card-price {
    font-size: 13px;
  }

  .card-bottom span {
    flex-shrink: 0;
  }

  .card-bottom button {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 6px;
  }
}

.shop-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 1.15rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    background 0.3s var(--ease-out);
  cursor: pointer;
}

.shop-card:hover {
  transform: translateY(-4px);
  border-color: #334155;
  background: rgba(15, 23, 42, 0.78);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(6, 182, 212, 0.05),
    0 12px 36px rgba(6, 182, 212, 0.05);
}

.card-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.card-collection-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.model-image,
.model-image-empty {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 80%;
  aspect-ratio: unset;
  flex: 0 0 auto;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.55)),
    radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.12), transparent 55%),
    #0b1220;
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

.model-image img {
  position: absolute;
  display: block;
}

.model-image-blur {
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  object-position: center;
  filter: blur(18px) saturate(1.05) brightness(0.72);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.model-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.28), transparent 18%, transparent 82%, rgba(2, 6, 23, 0.28)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12), transparent 30%, transparent 70%, rgba(2, 6, 23, 0.22));
}

.model-image-main {
  left: 50%;
  top: 50%;
  width: 78%;
  height: 78%;
  object-fit: contain;
  object-position: center;
  transform: translate(-50%, -50%);
  z-index: 2;
  border-radius: 10px;
  transition: transform 0.45s var(--ease-out);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.shop-card:hover .model-image-main {
  transform: translate(-50%, -50%) scale(1.04);
}

/* Fallback if older markup has a bare img */
.model-image > img:not(.model-image-blur):not(.model-image-main) {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
}

.test-shape-frame {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.5)),
    radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.16), transparent 55%),
    #0b1220;
}

.test-shape {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 34%;
  aspect-ratio: 1 / 1;
  height: auto;
  z-index: 2;
  background: rgba(91, 140, 255, 0.78);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
}

.test-shape-circle {
  border-radius: 50%;
}

.test-shape-square {
  border-radius: 4px;
}

.test-shape-rounded {
  border-radius: 18%;
}

.test-shape-triangle {
  width: 0;
  height: 0;
  aspect-ratio: auto;
  background: transparent;
  border-left: 2.4rem solid transparent;
  border-right: 2.4rem solid transparent;
  border-bottom: 4.1rem solid rgba(91, 140, 255, 0.78);
  box-shadow: none;
}

.test-shape-diamond {
  border-radius: 6px;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.78);
}

.test-shape-ring {
  border-radius: 50%;
  background: transparent;
  border: 0.55rem solid rgba(91, 140, 255, 0.78);
  box-shadow: none;
  box-sizing: border-box;
}

.test-shape-pill {
  width: 54%;
  aspect-ratio: 1.7 / 1;
  border-radius: 999px;
}

.test-shape-hex {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  border-radius: 0;
}

.test-market-card {
  cursor: default;
}

.test-market-card:hover {
  transform: translateY(-4px);
}

.test-market-card .add-to-cart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.card-content {
  padding: 14px 16px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 40%);
}

.card-content h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #ffffff;
}

.card-content > p:not(.card-collections) {
  margin: 0;
  color: #94a3b8;
  line-height: 1.35;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.card-price {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.card-bottom button,
.card-bottom .add-to-cart {
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    filter 0.18s var(--ease-out),
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.card-bottom button:hover:not(:disabled),
.card-bottom .add-to-cart:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 12px 22px rgba(37, 99, 235, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-bottom button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.card-bottom button.in-cart,
.card-bottom button:disabled {
  background: #2a3144;
  color: var(--muted);
  cursor: default;
  filter: none;
}

.cart-auth-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(920px, calc(100vw - 32px));
  padding: 16px 18px;
  background: rgba(16, 21, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cart-auth-toast p {
  margin: 0;
  flex: 1 1 220px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.cart-auth-toast .btn-primary,
.cart-auth-toast .btn-secondary {
  text-decoration: none;
  white-space: nowrap;
}

.site-footer {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 32px 24px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.footer-tagline {
  margin-top: 8px !important;
  font-size: 13px !important;
  font-weight: 400;
  line-height: 1.5;
}

.footer-links {
  position: absolute;
  right: clamp(28px, 8vw, 72px);
  top: 50%;
  transform: translateY(-50%);
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 8px;
  max-width: min(420px, 55vw);
}

.footer-link-sep {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.footer-contact-link,
.footer-legal-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible,
.footer-legal-link:hover,
.footer-legal-link:focus-visible {
  color: var(--blue);
  border-bottom-color: rgba(96, 165, 250, 0.55);
  outline: none;
}

.legal-doc {
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 24px 40px;
  display: grid;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.legal-note {
  margin: 0;
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 50%),
    var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.legal-note:hover {
  border-color: rgba(91, 140, 255, 0.28);
}

.legal-doc h2,
.legal-note h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.15rem;
}

.legal-doc p,
.legal-doc ul,
.legal-note p,
.legal-note ul {
  margin: 0 0 12px;
}

.legal-note p:last-child,
.legal-note ul:last-child {
  margin-bottom: 0;
}

.legal-doc ul,
.legal-note ul {
  padding-left: 1.25rem;
}

.legal-doc a,
.legal-note a {
  color: var(--blue);
}

@media (max-width: 640px) {
  .site-footer {
    padding-bottom: 52px;
  }

  .footer-links {
    right: 24px;
    top: auto;
    bottom: 18px;
    transform: none;
  }
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  background: var(--blue);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.page-section {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 85px;
}

.seller-section {
  max-width: 1180px;
}

.seller-hero .intro {
  max-width: 40rem;
}

.seller-layout {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

#seller-app[hidden],
.seller-layout[hidden] {
  display: none !important;
}

.seller-layout.is-empty {
  align-items: stretch;
}

.seller-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 20px;
}

.seller-layout.is-empty .seller-sidebar {
  position: static;
  height: 100%;
  min-height: 100%;
  gap: 10px;
}

.seller-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1 1 0;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.1), transparent 55%),
    var(--panel);
  box-shadow: none;
}

.seller-layout.is-empty .seller-stat {
  min-height: 0;
  padding: 14px 14px;
}

.seller-stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.seller-stat-value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.1;
}

.seller-layout.is-empty .seller-stat-value {
  font-size: 22px;
}

.seller-stat-listings {
  border-color: rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 55%),
    var(--panel);
}

.seller-stat-listings .seller-stat-label,
.seller-stat-listings .seller-stat-value {
  color: #e8edf7;
}

.seller-stat-active {
  border-color: rgba(122, 230, 182, 0.32);
  background:
    linear-gradient(180deg, rgba(122, 230, 182, 0.13), transparent 55%),
    var(--panel);
}

.seller-stat-active .seller-stat-label,
.seller-stat-active .seller-stat-value {
  color: #8edfbc;
}

.seller-stat-rejected {
  border-color: rgba(255, 130, 142, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 130, 142, 0.13), transparent 55%),
    var(--panel);
}

.seller-stat-rejected .seller-stat-label,
.seller-stat-rejected .seller-stat-value {
  color: #eb929c;
}

.seller-stat-draft {
  border-color: rgba(116, 160, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(116, 160, 255, 0.13), transparent 55%),
    var(--panel);
}

.seller-stat-draft .seller-stat-label,
.seller-stat-draft .seller-stat-value {
  color: #91b1f2;
}

.seller-stat-pending {
  border-color: rgba(238, 210, 115, 0.32);
  background:
    linear-gradient(180deg, rgba(238, 210, 115, 0.13), transparent 55%),
    var(--panel);
}

.seller-stat-pending .seller-stat-label,
.seller-stat-pending .seller-stat-value {
  color: #dabf73;
}

.seller-stat-inactive {
  border-color: rgba(169, 179, 199, 0.25);
  background:
    linear-gradient(180deg, rgba(169, 179, 199, 0.09), transparent 55%),
    var(--panel);
}

.seller-stat-inactive .seller-stat-label,
.seller-stat-inactive .seller-stat-value {
  color: #a9b3c7;
}

.seller-main {
  min-width: 0;
}

.seller-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.seller-search {
  flex: 1 1 220px;
  min-width: 180px;
}

.seller-search input,
.seller-product-form input,
.seller-product-form textarea,
.seller-product-form select {
  color-scheme: dark;
}

.seller-search input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 32, 0.88);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

.seller-search input::placeholder {
  color: #7f8aa3;
  opacity: 1;
}

.seller-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.seller-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1420;
}

.seller-filter {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.seller-filter.is-active,
.seller-filter:hover {
  color: var(--text);
  background: rgba(91, 140, 255, 0.16);
}

.seller-editor {
  margin: 0 0 18px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.06), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
}

.seller-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.seller-editor-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.seller-form-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 14px;
}

.seller-collections {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f1420;
}

.seller-collections legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.seller-collections legend span {
  color: var(--muted);
  font-weight: 500;
}

.seller-collection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.seller-collection-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.seller-collection-chip input {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--blue);
}

.seller-collection-chip:has(input:checked) {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.55);
  background: rgba(91, 140, 255, 0.14);
}

.seller-terms {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.seller-terms input {
  margin-top: 3px !important;
}

.seller-toolbar-create {
  margin-left: auto;
}

.seller-toolbar-create[hidden] {
  display: none !important;
}

.seller-filter-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: var(--panel);
}

.seller-empty {
  padding: 48px 28px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(91, 140, 255, 0.14), transparent 70%),
    var(--panel);
}

.seller-empty h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.seller-empty p {
  margin: 0 auto 20px;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.55;
}

.seller-empty .form-actions {
  justify-content: center;
}

.seller-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seller-listing {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.seller-listing:hover {
  border-color: rgba(91, 140, 255, 0.28);
  box-shadow: var(--shadow);
}

.seller-listing-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #0d111a;
  border: 1px solid var(--line);
}

.seller-listing-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(91, 140, 255, 0.18), transparent 55%),
    linear-gradient(145deg, #1a2233 0%, #10151f 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.seller-listing-thumb-cube {
  width: 52px;
  height: 52px;
  color: #8ea0c4;
  opacity: 0.9;
}

.seller-listing-main h3 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.seller-listing-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font);
}

.seller-listing-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.seller-listing-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.seller-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.seller-status-active {
  color: #8ef0c2;
  background: rgba(93, 222, 164, 0.12);
  border: 1px solid rgba(93, 222, 164, 0.28);
}

.seller-status-inactive {
  color: #c2c8d6;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.seller-status-pending {
  color: #f0d48e;
  background: rgba(240, 212, 142, 0.12);
  border: 1px solid rgba(240, 212, 142, 0.3);
}

.seller-status-rejected {
  color: #f0a0a0;
  background: rgba(240, 112, 112, 0.12);
  border: 1px solid rgba(240, 112, 112, 0.28);
}

.seller-upload-panel {
  margin: 0 0 20px;
}

.seller-block-reasons {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(240, 112, 112, 0.35);
  background: rgba(240, 112, 112, 0.1);
  color: #f5c4c4;
}

.seller-block-reasons p {
  margin: 0 0 8px;
}

.seller-block-reasons ul {
  margin: 0;
  padding-left: 1.2em;
}

.seller-block-reasons li {
  margin: 0 0 4px;
}

.seller-upload-error {
  color: #f0a0a0;
}

.seller-upload-ok {
  color: #8ef0c2;
}

.seller-reject-reason {
  margin: 8px 0 0;
  color: #f0a0a0;
  font-size: 13px;
  line-height: 1.45;
}

.admin-review-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 12px;
}

.admin-review-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-review-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font);
}

.admin-review-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.admin-review-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0d111a;
}

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

.admin-review-reject-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-review-reject-box[hidden],
.admin-review-reject-box label[hidden],
.admin-review-reject-box .review-message-fields[hidden],
.admin-review-reject-box .item-message-fields[hidden],
.admin-review-reject-box .item-message-toggle-row[hidden] {
  display: none !important;
}

.admin-action-warn {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(240, 212, 142, 0.35);
  background: rgba(240, 212, 142, 0.1);
  color: #f5e6b8;
  font-size: 14px;
  line-height: 1.45;
}

.admin-action-warn strong {
  color: #ffe29a;
}

.admin-review-reject-box label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.admin-review-reject-box textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  margin-top: 6px;
  padding: 12px 14px;
  resize: vertical;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.admin-review-reject-box textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.admin-items-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
}

.admin-items-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.admin-items-search input[type="search"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.admin-card-span {
  grid-column: 1 / -1;
}

.seller-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.seller-listing-actions .btn-secondary,
.seller-listing-actions .btn-primary,
.seller-listing-actions .btn-danger {
  padding: 10px 14px;
  font-size: 13px;
}

.seller-reject-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(240, 112, 112, 0.35);
  background: rgba(240, 112, 112, 0.1);
}

.seller-reject-panel p {
  margin: 0 0 10px;
  color: #f5c4c4;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.seller-reject-panel p:last-of-type {
  margin-bottom: 12px;
}

.seller-reject-panel strong {
  color: #ffd0d0;
}

.seller-action-warn {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(240, 212, 142, 0.35);
  background: rgba(240, 212, 142, 0.1);
}

.seller-action-warn p {
  margin: 0 0 10px;
  color: #f5e6b8;
  font-size: 13px;
  line-height: 1.45;
}

.seller-action-warn strong {
  color: #ffe29a;
}

.project-top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .seller-layout {
    grid-template-columns: 1fr;
  }

  .seller-sidebar,
  .seller-layout.is-empty .seller-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    height: auto;
    min-height: 0;
  }

  .seller-stat,
  .seller-layout.is-empty .seller-stat {
    flex: none;
    padding: 10px 12px;
  }

  .seller-stat-value,
  .seller-layout.is-empty .seller-stat-value {
    font-size: 18px;
  }

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

  .seller-listing {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .seller-listing-thumb {
    width: 72px;
    height: 72px;
  }

  .seller-listing-side {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 640px) {
  .seller-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-editor {
  max-width: 1180px;
}

.project-editor-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.project-editor-top h1 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.project-save-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--font);
}

.project-editor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-stepper {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.project-stepper-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-stepper-list > li {
  display: flex;
  align-items: center;
  min-width: 0;
}

.project-stepper-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-stepper-item:hover {
  color: var(--text);
  background: rgba(91, 140, 255, 0.08);
}

.project-stepper-item.is-current {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.14);
}

.project-stepper-item.is-done {
  color: var(--text);
}

.project-stepper-item.is-done .project-stepper-num {
  background: rgba(93, 222, 164, 0.18);
  border-color: rgba(93, 222, 164, 0.4);
  color: #8ef0c2;
}

.project-stepper-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: #0f1420;
}

.project-stepper-item.is-current .project-stepper-num {
  border-color: rgba(91, 140, 255, 0.7);
  background: rgba(91, 140, 255, 0.2);
  color: var(--text);
}

.project-stepper-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.project-stepper-text strong {
  font-size: 14px;
  font-weight: 700;
}

.project-stepper-text small {
  font-size: 12px;
  color: #7f8aa3;
}

.project-stepper-line {
  flex: 1 1 24px;
  height: 2px;
  min-width: 16px;
  background: var(--line);
  border-radius: 999px;
}

.project-stepper-line.is-done {
  background: rgba(93, 222, 164, 0.55);
}

.project-step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.project-ready-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-ready-list li {
  font-size: 14px;
  color: var(--muted);
}

.project-ready-list li.is-done {
  color: #8ef0c2;
}

.project-ready-list li.is-missing {
  color: #f0a0a0;
}

@media (max-width: 700px) {
  .project-stepper-text strong {
    font-size: 13px;
  }

  .project-stepper-text small {
    display: none;
  }
}

.field-req {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #ffe566;
}

.field-req[hidden] {
  display: none !important;
}

#req-files,
#req-details {
  font-size: 13px;
  font-weight: 700;
}

.field-req.is-ok {
  color: #8ef0c2;
}

.field-req.is-missing {
  color: #ffe566;
}

.field-req-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 229, 102, 0.45);
  background: rgba(255, 229, 102, 0.14);
  color: #ffe566;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.project-file-slot.is-ready .field-req-tag {
  color: #8ef0c2;
  border-color: rgba(142, 240, 194, 0.35);
  background: rgba(142, 240, 194, 0.1);
}

.project-price-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.project-price-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-price-title {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.project-price-block .project-price-free-row {
  margin: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.project-price-block .project-price-free-row span {
  display: inline-flex;
  align-items: center;
  line-height: 20px;
}

.project-price-block .project-price-free-row input[type="checkbox"] {
  margin: 0 !important;
  align-self: center;
}

.project-price-block #project-price-label,
.project-price-block .project-price-input-wrap {
  display: block;
  margin: 0;
  width: 100%;
  min-width: 0;
  color: inherit;
}

.project-price-block .project-price-input-wrap input[type="number"] {
  display: block;
  width: 100%;
  margin: 0;
}

.project-price-block .field-hint {
  margin: 0;
}

.project-price-block .field-hint[hidden] {
  display: none !important;
}

.project-price-block input[type="number"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.project-collections-block {
  margin: 0 0 16px;
}

.project-collections-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.project-collections-label span {
  color: #7f8aa3;
}

.project-collection-combo {
  max-width: 100%;
}

.project-collection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.project-collection-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(91, 140, 255, 0.4);
  background: rgba(91, 140, 255, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.project-collection-tag span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}

.project-collection-tag:hover {
  border-color: rgba(91, 140, 255, 0.7);
  background: rgba(91, 140, 255, 0.2);
}

.project-asset-type {
  margin: 4px 0 18px;
}

.project-asset-type-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-asset-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.project-asset-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}

.project-asset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 140, 255, 0.5);
  box-shadow: var(--shadow-soft);
}

.project-asset-card.is-active {
  border-color: var(--blue);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.12), transparent 60%),
    var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.35);
}

.project-asset-card-title {
  font-size: 15px;
  font-weight: 700;
}

.project-asset-card-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .project-asset-type-grid {
    grid-template-columns: 1fr;
  }
}

.project-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: start;
}

.project-editor-grid.no-viewport {
  grid-template-columns: 1fr;
}

.project-editor-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-step h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

/* Asset-type scoped visibility (individual vs pack) */
body[data-project-asset-type="individual"] [data-asset-scope="pack"],
body[data-project-asset-type="pack"] [data-asset-scope="individual"] {
  display: none !important;
}

body.site-confirm-open {
  overflow: hidden;
}

.site-confirm {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  z-index: 100000;
  display: grid !important;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.site-confirm[hidden] {
  display: none !important;
}

.site-confirm-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(6px);
}

.site-confirm-dialog {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  width: min(480px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
  text-align: left;
  margin: 0;
}

.site-confirm-dialog h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-confirm-dialog > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.site-confirm-dialog > p[hidden] {
  display: none !important;
}

.site-confirm-list {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.site-confirm-list[hidden] {
  display: none !important;
}

.site-confirm-list li {
  position: relative;
  padding: 5px 0 5px 16px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.site-confirm-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.site-confirm-dialog.has-asset-type {
  width: min(560px, calc(100vw - 48px));
  gap: 14px;
}

.site-confirm-dialog.has-asset-type h2 {
  font-size: 1.4rem;
}

.site-confirm-asset-type {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-confirm-asset-type[hidden] {
  display: none !important;
}

.site-confirm-asset-type-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-confirm-asset-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.site-confirm-asset-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 55%),
    var(--panel-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.site-confirm-asset-card:hover {
  border-color: rgba(91, 140, 255, 0.45);
  transform: translateY(-1px);
}

.site-confirm-asset-card.is-active {
  border-color: var(--blue);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.14), transparent 60%),
    var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.35);
}

.site-confirm-asset-card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-confirm-asset-card-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .site-confirm-asset-type-grid {
    grid-template-columns: 1fr;
  }
}

.site-confirm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-confirm-field-guide {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.site-confirm-field-guide[hidden] {
  display: none !important;
}

.site-confirm-field[hidden] {
  display: none !important;
}

.site-confirm-field label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.site-confirm-field label[hidden] {
  display: none !important;
}

.site-confirm-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.site-confirm-field input[type="text"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.22);
}

.site-confirm-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.site-confirm-hint:empty {
  display: none;
}

.site-confirm-hint.is-error {
  color: #ff8f8f;
}

.site-confirm-hint.is-ok {
  color: #8ef0c2;
}

.site-confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 2px;
}

.site-confirm-actions .btn-secondary,
.site-confirm-actions .btn-primary,
.site-confirm-actions .btn-danger {
  min-width: 120px;
}

@media (max-width: 480px) {
  .site-confirm-dialog {
    width: 100%;
    padding: 22px 18px;
  }

  .site-confirm-actions {
    justify-content: stretch;
  }

  .site-confirm-actions .btn-secondary,
  .site-confirm-actions .btn-primary,
  .site-confirm-actions .btn-danger {
    flex: 1;
    min-width: 0;
  }
}

.project-file-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 18px;
}

.project-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.project-image-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d111a;
}

.project-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: rgba(10, 13, 20, 0.78);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.project-image-remove:hover {
  background: rgba(220, 60, 60, 0.9);
}

.project-file-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 55%),
    var(--panel-2);
}

.project-file-slot.is-ready {
  border-color: rgba(142, 240, 194, 0.35);
  background:
    linear-gradient(180deg, rgba(142, 240, 194, 0.06), transparent 50%),
    var(--panel-2);
}

.project-file-slot-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-file-slot-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.project-file-slot-copy .field-hint {
  margin: 0;
  line-height: 1.4;
}

.project-file-pick {
  flex-shrink: 0;
  margin: 0 !important;
  cursor: pointer;
}

.project-file-pick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.12);
  color: #d7e4ff;
  font-size: 13px;
  font-weight: 650;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.project-file-pick:hover .project-file-pick-btn,
.project-file-pick:focus-within .project-file-pick-btn {
  background: rgba(91, 140, 255, 0.22);
  border-color: var(--blue);
}

.project-file-slot.is-ready .project-file-pick-btn {
  min-width: 96px;
}

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

.project-file-actions .project-file-pick,
.project-file-actions .project-file-pick-btn,
.project-file-actions .btn-secondary {
  min-width: 96px;
}

.project-file-actions .btn-secondary {
  padding: 10px 14px;
  font-size: 13px;
}

.project-file-slot-downloads {
  flex-direction: column;
  align-items: stretch;
}

.project-file-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-download-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.project-download-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
}

.project-download-item .btn-secondary {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .project-file-slot-head {
    flex-direction: column;
    align-items: stretch;
  }
}

.project-textures {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
}

.project-texture-toggle {
  margin: 0 0 8px;
  align-items: flex-start;
  color: var(--text);
  font-weight: 600;
}

.project-texture-toggle span {
  line-height: 1.4;
}

.project-texture-fields {
  margin-top: 12px;
}

.project-texture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.project-advanced-textures-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.project-advanced-textures-toggle:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.project-advanced-textures-chevron {
  width: 0.55em;
  height: 0.55em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

.project-advanced-textures-toggle[aria-expanded="true"] .project-advanced-textures-chevron {
  transform: rotate(45deg);
}

.project-texture-advanced {
  margin-top: 10px;
}

.project-texture-advanced[hidden] {
  display: none !important;
}

.project-advanced-textures-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-file-slot-compact {
  padding: 12px;
  flex-direction: column;
  align-items: stretch;
}

.project-texture-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.project-file-slot-compact .project-file-pick,
.project-file-slot-compact .project-file-pick-btn,
.project-texture-actions .btn-secondary {
  width: 100%;
  min-width: 0;
}

.project-texture-actions .btn-secondary {
  padding: 10px 14px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .project-file-slot:not(.project-file-slot-compact) {
    flex-direction: column;
    align-items: stretch;
  }

  .project-file-pick-btn {
    width: 100%;
  }

  .project-file-actions {
    width: 100%;
    flex-direction: column;
  }

  .project-file-actions .project-file-pick,
  .project-file-actions .project-file-pick-btn,
  .project-file-actions .btn-secondary {
    width: 100%;
  }

  .project-texture-grid {
    grid-template-columns: 1fr;
  }
}

.project-viewport-panel {
  position: sticky;
  top: 16px;
}

.project-viewport-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(91, 140, 255, 0.06), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
}

.project-viewport-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.project-viewport-head h2 {
  margin: 0;
  font-size: 18px;
}

.project-viewport {
  min-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0b0f18;
  overflow: hidden;
}

.project-viewport-empty {
  margin: 0;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.project-model-viewer {
  width: 100%;
  height: 360px;
  background: #0b0f18;
}

.project-viewport-stats,
.project-mesh-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.project-viewport-stats[hidden],
.project-mesh-totals[hidden],
.project-viewport-stat[hidden] {
  display: none !important;
}

.project-file-slots .project-mesh-totals {
  margin-top: 0;
}

.project-mesh-totals .field-hint {
  margin: 2px 0 0;
}

.project-viewport-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-viewport-stats span,
.project-mesh-totals span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-viewport-stats strong,
.project-mesh-totals strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .project-editor-grid {
    grid-template-columns: 1fr;
  }

  .project-viewport-panel {
    position: static;
    order: -1;
  }
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.profile-card .btn-secondary {
  margin-left: 0;
}

.profile-card-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.account-loading {
  text-align: center;
  color: var(--muted);
}

.account-loading p {
  margin: 0;
}

.password-field {
  position: relative;
  display: block;
  margin-top: 6px;
}

.password-field input {
  width: 100%;
  margin-top: 0 !important;
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #20263a;
  border-radius: 50%;
  color: var(--blue);
  font-size: 28px;
  font-weight: 700;
}

.profile-card h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.profile-meta {
  margin: 0;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.info-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.info-card h3 {
  margin: 8px 0;
  font-size: 22px;
}

.info-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
}

.cart-empty {
  padding: 56px 28px;
  border-style: dashed;
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(91, 140, 255, 0.14), transparent 70%),
    var(--panel);
}

.cart-empty h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cart-empty p {
  margin: 0 auto 22px;
  max-width: 34rem;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.cart-empty .form-actions {
  justify-content: center;
  margin: 0;
}

.text-button {
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  grid-template-rows: auto auto;
  column-gap: 28px;
  row-gap: 0;
  align-items: start;
}

.cart-layout[hidden] {
  display: none !important;
}

.cart-header {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 88px calc(5.5rem * 2 + 8px);
  gap: 16px;
  align-items: center;
  padding: 0 18px 10px 100px;
  color: rgba(154, 166, 189, 0.72);
  font-size: 11px;
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cart-header > span:nth-child(2),
.cart-header > span:nth-child(3) {
  text-align: left;
}

.cart-list {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 140px 88px calc(5.5rem * 2 + 8px);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.cart-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.cart-item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--panel-2);
  display: block;
  flex-shrink: 0;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-thumb.is-empty {
  background:
    radial-gradient(circle at 30% 30%, rgba(91, 140, 255, 0.18), transparent 55%),
    var(--panel-2);
}

.cart-item-info {
  min-width: 0;
}

.cart-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.cart-item h3 a {
  color: inherit;
  text-decoration: none;
}

.cart-item h3 a:hover {
  color: var(--blue);
}

.cart-item-type {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.cart-item-total {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cart-item-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.cart-view,
.cart-remove {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 5.5rem;
  min-width: 5.5rem;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.cart-view {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.cart-view:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--muted);
}

.cart-remove {
  margin: 0;
  background: transparent;
  color: #ff8f8f;
  border: 1px solid #5a3030;
}

.cart-remove:hover {
  background: #2a1a1a;
  color: #ff6b7a;
}

.cart-summary {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.cart-summary-title {
  margin: 0 0 18px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.cart-summary-rows {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.cart-summary-row span:last-child {
  color: var(--text);
  font-weight: 600;
}

.cart-summary-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.cart-summary-total strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cart-terms {
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.cart-terms input {
  margin-top: 3px !important;
}

.cart-terms a {
  color: var(--blue);
}

.cart-checkout-btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  font-size: 16px;
}

.cart-checkout-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .nav {
    height: auto;
    min-height: 0;
    padding: 12px 12px 10px;
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .nav > nav,
  .nav-actions {
    padding: 3px;
    border-radius: 14px;
    width: 100%;
    justify-content: stretch;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    font-size: 38px;
  }

  .inbox-wrap {
    grid-column: 2;
    grid-row: 1;
    position: static;
    transform: none;
    top: auto;
    right: auto;
    justify-self: end;
    align-self: center;
  }

  .nav-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-actions::-webkit-scrollbar {
    display: none;
  }

  .nav nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: center;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav nav a,
  .admin-nav-link,
  .inbox-btn {
    padding: 6px clamp(4px, 1.5vw, 8px);
    font-size: clamp(11px, 3.1vw, 13px);
    border-radius: 8px;
  }

  .inbox-btn {
    font-weight: 600;
    gap: 5px;
    padding: 9px 12px;
    font-size: 15px;
  }

  .inbox-count {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    padding: 0 5px;
  }

  .inbox-panel {
    right: 0;
    left: auto;
    width: min(320px, calc(100vw - 24px));
  }

  .shop-hero {
    padding-top: 40px;
  }

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

  .cart-layout {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 20px;
  }

  .cart-header {
    display: none;
  }

  .cart-list,
  .cart-summary {
    grid-column: auto;
    grid-row: auto;
  }

  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "thumb info"
      "thumb type"
      "thumb price"
      "actions actions";
    gap: 8px 14px;
    padding: 12px 14px;
  }

  .cart-item-thumb {
    grid-area: thumb;
    width: 72px;
    height: 72px;
  }

  .cart-item-info {
    grid-area: info;
  }

  .cart-item-type {
    grid-area: type;
  }

  .cart-item-total {
    grid-area: price;
  }

  .cart-item-actions {
    grid-area: actions;
    justify-self: stretch;
    width: 100%;
  }

  .cart-view,
  .cart-remove {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .cart-summary {
    position: static;
  }
}

/* Admin (layout preview — protect with Cloudflare Access when deployed) */

.security-banner {
  padding: 14px 24px;
  background: #2a1f1f;
  border-bottom: 1px solid #5a3030;
  color: #ffb4b4;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.security-banner strong {
  color: #ffd0d0;
}

.admin-panel {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 85px;
}

.admin-panel-wide {
  max-width: 1320px;
}

.admin-items-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.admin-items-workspace > .admin-card {
  margin-bottom: 0;
}

.admin-items-list-card .admin-product-list-side {
  max-height: min(70vh, 820px);
  overflow: auto;
}

.admin-items-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.admin-items-row > .admin-card {
  margin-bottom: 0;
  height: 100%;
}

.admin-collections-card .admin-product-list {
  max-height: 360px;
  overflow: auto;
}

.model-files-fieldset {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.model-files-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.model-files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 14px;
}

.model-file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.model-file-label {
  margin-bottom: 0 !important;
}

@media (max-width: 900px) {
  .admin-items-workspace,
  .admin-items-row {
    grid-template-columns: 1fr;
  }

  .admin-items-list-card .admin-product-list-side {
    max-height: none;
  }
}

@media (max-width: 700px) {
  .admin-items-row {
    grid-template-columns: 1fr;
  }

  .model-file-row {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.admin-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.admin-card > p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(120deg, rgba(91, 140, 255, 0.14), rgba(18, 23, 34, 0.9));
}

.admin-filter-banner strong {
  display: block;
  margin-bottom: 4px;
}

.admin-filter-banner .field-hint {
  margin: 0;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.admin-hero .intro {
  max-width: 42rem;
}

.admin-chat-card {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 720px);
}

.admin-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-chat-header h2 {
  margin-bottom: 4px;
}

.admin-chat-thread {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(48vh, 480px);
  overflow: auto;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 10, 16, 0.55);
}

.admin-chat-empty {
  margin: 0 0 12px;
}

.admin-chat-bubble {
  align-self: flex-end;
  width: min(100%, 520px);
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 14px 14px 4px 14px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.2), rgba(91, 140, 255, 0.08));
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.admin-chat-bubble p,
.admin-chat-bubble-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.admin-chat-bubble-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font);
}

.admin-feedback-item {
  position: relative;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
  padding-right: 108px;
}

.admin-feedback-item .admin-product-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
}

.admin-feedback-item .feedback-delete-btn {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .admin-feedback-item {
    flex-direction: row;
    padding-right: 96px;
  }

  .admin-feedback-item .admin-product-actions {
    top: 14px;
    right: 14px;
  }
}

.admin-feedback-body {
  margin: 10px 0 0;
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

.admin-product-title-row h3 {
  margin: 0;
}

.admin-title-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.feedback-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feedback-page > .admin-card,
.feedback-card {
  width: min(960px, 100%);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.feedback-page .admin-card[hidden],
.feedback-card[hidden] {
  display: none !important;
}

.feedback-card textarea {
  min-height: 180px;
}

/* Contact */

.contact-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.shop-hero .contact-response-note {
  margin: 10px auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-align: center;
}

.shop-hero .contact-response-note[hidden] {
  display: none !important;
}

.contact-options {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.contact-options[hidden] {
  display: none !important;
}

.contact-option-card,
.contact-form-card {
  width: min(960px, 100%);
  max-width: 960px;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
}

#contact-tickets-panel.contact-form-card {
  padding: 16px 18px 14px;
}

#contact-tickets-panel.contact-tickets-compact {
  padding: 14px 18px 12px;
}

#contact-tickets-panel .contact-panel-head {
  margin-bottom: 0;
}

#contact-tickets-panel:not(.contact-tickets-compact) .contact-panel-head {
  margin-bottom: 12px;
}

.contact-option-card {
  width: auto;
  max-width: none;
  height: 100%;
  margin-bottom: 0;
  padding: 18px 18px 16px;
  gap: 12px;
}

.contact-option-card h2 {
  margin: 0;
  font-size: 22px;
}

.contact-option-card > p {
  margin: 0;
}

.contact-option-card > .form-actions {
  margin-top: auto;
  margin-bottom: 0;
}

.contact-option-card > .form-actions > .btn-primary:only-child {
  width: 100%;
  justify-content: center;
}

.contact-form-card > .form-actions,
.contact-form-card .form-actions {
  margin-top: auto;
}

.contact-form-card h2 {
  margin-top: 0;
}

.contact-form-card[hidden] {
  display: none !important;
}

.contact-form-card textarea {
  min-height: 180px;
}

.contact-email-help {
  display: block;
  margin-top: 6px;
}

.contact-email-help[hidden] {
  display: none !important;
}

.contact-discord-actions {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.contact-discord-actions .btn-primary,
.contact-discord-actions .btn-secondary {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 10px;
  font-size: 13px;
  white-space: nowrap;
  text-align: center;
}

.contact-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.contact-panel-head h2 {
  margin: 0 0 4px;
}

.contact-panel-title-block {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.contact-panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 4px;
}

.contact-panel-title-row h2 {
  margin: 0;
}

.contact-panel-title-row .btn-primary {
  flex: 0 0 auto;
}

.contact-panel-actions {
  margin: 0;
}

.contact-form-card .contact-panel-head .form-actions {
  margin-top: 0;
}

.contact-ticket-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-ticket-group h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.contact-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-ticket-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.contact-ticket-row .contact-ticket-item {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-ticket-delete-btn {
  flex: 0 0 auto;
  align-self: center;
  padding: 10px 14px;
  font-size: 13px;
}

.contact-ticket-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  padding: 14px 16px;
  font: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.contact-ticket-item:hover {
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.08);
  transform: translateY(-1px);
}

.contact-ticket-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.contact-ticket-preview {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-chat-card {
  min-height: 420px;
}

.contact-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 4px 2px 12px;
  margin-bottom: 8px;
  min-width: 0;
}

.contact-chat-bubble {
  width: min(100%, 520px);
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-chat-bubble-meta {
  margin-bottom: 6px !important;
  color: var(--muted);
  font-size: 12px;
}

.contact-chat-bubble-user {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.2), rgba(91, 140, 255, 0.08));
}

.contact-chat-bubble-admin {
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  background: rgba(255, 255, 255, 0.04);
}

.contact-chat-composer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.contact-chat-composer[hidden] {
  display: none !important;
}

.admin-chat-bubble-user {
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-chat-bubble-admin {
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
}

.admin-subtabs {
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .contact-options {
    grid-template-columns: 1fr;
  }

  .contact-panel-head {
    flex-direction: column;
  }

  .contact-panel-title-row {
    flex-wrap: wrap;
  }
}

/* Payouts */

.payouts-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.payouts-hero-row .intro {
  margin-bottom: 0;
}

.payouts-section {
  max-width: 1180px;
}

.payouts-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#payouts-app[hidden],
#payouts-gate[hidden],
#payouts-loading[hidden],
.payouts-layout[hidden] {
  display: none !important;
}

.payouts-fee-banner {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(122, 230, 182, 0.28);
  background:
    linear-gradient(180deg, rgba(122, 230, 182, 0.1), transparent 70%),
    var(--panel);
}

.payouts-fee-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #8edfbc;
}

.payouts-fee-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 52rem;
}

.payouts-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.payouts-balance-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel);
}

.payouts-balance-available {
  border-color: rgba(122, 230, 182, 0.28);
  background:
    linear-gradient(180deg, rgba(122, 230, 182, 0.12), transparent 55%),
    var(--panel);
}

.payouts-balance-pending {
  border-color: rgba(240, 196, 96, 0.3);
  background:
    linear-gradient(180deg, rgba(240, 196, 96, 0.12), transparent 55%),
    var(--panel);
}

.payouts-balance-lifetime {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 55%),
    var(--panel);
}

.payouts-balance-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.payouts-balance-value {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

.payouts-balance-available .payouts-balance-value {
  color: #8edfbc;
}

.payouts-balance-pending .payouts-balance-value {
  color: #f0d48e;
}

.payouts-balance-lifetime .payouts-balance-value {
  color: #e8edf7;
}

.payouts-balance-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.payouts-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.payouts-panels > .payouts-card {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 20px 20px 18px;
}

.payouts-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.payouts-card-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.payouts-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 14px;
}

.payouts-method-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.35);
}

.payouts-method-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.payouts-method-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.payouts-panels > .payouts-card > .form-actions {
  margin-top: auto;
  flex-shrink: 0;
  margin-bottom: 0;
}

.payouts-settings-form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 0;
}

.payouts-settings-form label {
  margin-bottom: 6px;
}

.payouts-settings-form .field-hint {
  margin: -2px 0 12px;
}

.payouts-settings-form .field-hint:last-child {
  margin-bottom: 0;
}

.payouts-history-card {
  overflow: hidden;
}

.payouts-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.payouts-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.payouts-table th,
.payouts-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.payouts-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(2, 6, 23, 0.45);
}

.payouts-table td {
  font-size: 14px;
}

.payouts-table tbody tr:last-child td {
  border-bottom: 0;
}

.payouts-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #c7d2fe;
}

.payouts-empty-row td {
  color: var(--muted);
  text-align: center;
  padding: 28px 16px;
}

.admin-payouts-balance-grid {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .payouts-balance-grid,
  .payouts-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .payouts-hero-row {
    flex-direction: column;
  }

  .payouts-hero-row .btn-secondary {
    align-self: flex-start;
  }
}

.admin-chat-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-chat-bubble-actions .btn-secondary,
.admin-chat-bubble-actions .btn-danger {
  padding: 8px 12px;
  font-size: 13px;
}

.admin-chat-composer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  .admin-chat-header {
    flex-direction: column;
  }

  .admin-chat-bubble {
    align-self: stretch;
    width: 100%;
  }
}

.admin-form label {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.admin-form select {
  padding: 12px 40px 12px 14px;
  background-color: rgba(15, 20, 32, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa6bd 50%),
    linear-gradient(135deg, #9aa6bd 50%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px),
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    auto;
  background-repeat: no-repeat;
  font-size: 14px;
  font-weight: 500;
}

.admin-form input[type="checkbox"] {
  display: inline-grid !important;
  width: 20px !important;
  height: 20px !important;
  margin-top: 0.15em !important;
  padding: 0 !important;
  border-radius: 6px !important;
}

.admin-form textarea {
  min-height: 100px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.admin-form input[type="file"] {
  padding: 10px;
  font-size: 13px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.field-hint .hint-emph {
  font-weight: 600;
  color: var(--text);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, #6b97ff 0%, var(--blue-strong) 100%);
  color: white;
  border: 0;
  border-radius: 11px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-glow);
  transition:
    filter 0.18s var(--ease-out),
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}

.btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(61, 116, 255, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
  transition:
    color 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    background 0.18s var(--ease-out),
    transform 0.18s var(--ease-out);
}

.btn-secondary:hover {
  color: white;
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.1);
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  color: #ff8f8f;
  border: 1px solid rgba(255, 111, 122, 0.28);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.btn-danger:hover {
  background: rgba(255, 107, 122, 0.1);
  border-color: rgba(255, 111, 122, 0.45);
}

.admin-product-list {
  display: grid;
  gap: 12px;
}

.admin-product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 50%),
    var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.admin-product-item:hover {
  border-color: rgba(91, 140, 255, 0.28);
  box-shadow: var(--shadow-soft);
}

.admin-manage-item,
.admin-review-item {
  align-items: flex-start;
}

.admin-list-empty {
  margin: 0 0 12px;
  color: var(--muted);
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-inline-actions .btn-primary,
.admin-inline-actions .btn-secondary,
.admin-inline-actions .btn-danger,
.admin-inline-actions a.btn-secondary {
  padding: 8px 12px;
  font-size: 13px;
}

.admin-manage-item .admin-product-details,
.admin-review-item .admin-product-details {
  width: 100%;
}

.admin-review-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.admin-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #20263a;
}

.admin-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 22px;
  font-weight: 700;
}

.admin-product-details {
  flex: 1;
  min-width: 0;
}

.admin-product-item h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.admin-product-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.admin-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.admin-status-preview {
  background: #2a2418;
  border: 1px solid #5a4a20;
  color: #ffd080;
}

.admin-status-live {
  background: #182a1f;
  border: 1px solid #205a30;
  color: #80ffb4;
}

.admin-status-error {
  background: #2a1f1f;
  border: 1px solid #5a3030;
  color: #ffb4b4;
}

.login-note {
  padding: 16px;
  background: #0d0f14;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-note ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 700px) {
  .admin-product-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-card {
    flex-wrap: wrap;
  }

  .profile-card-actions {
    margin-left: 0;
    width: 100%;
  }

  .profile-card-actions .btn-secondary {
    flex: 1 1 auto;
  }
}

.form-actions a.btn-primary,
.form-actions a.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(18, 23, 34, 0.72);
  border: 1px solid var(--line);
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
}

.auth-tab.active,
.auth-tab:hover {
  color: white;
  border-color: rgba(91, 140, 255, 0.28);
  background: linear-gradient(180deg, rgba(91, 140, 255, 0.22), rgba(91, 140, 255, 0.08));
}

.purchase-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.purchase-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.purchase-item-library {
  flex-direction: column;
  align-items: stretch;
}

.purchase-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.purchase-item strong {
  color: var(--text);
}

.purchase-files {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.purchase-files-empty {
  margin: 8px 0 0;
  font-size: 13px;
}

.purchase-download-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
}

#purchase-success {
  margin-bottom: 18px;
}

/* News list */
.news-list {
  display: grid;
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.news-post {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.news-post-date {
  margin: 0 0 8px;
  color: #87a5ff;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.news-post h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.news-post-body {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Inbox — top right, same row as Yamco3d logo */
.inbox-wrap {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
  margin-right: clamp(18px, 4.5vw, 72px);
}

.inbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 13px 20px;
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
}

.inbox-btn:hover,
.inbox-btn[aria-expanded="true"] {
  color: white;
  background: #20263a;
  border-color: transparent;
}

.inbox-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.inbox-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, 70vh);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.inbox-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.inbox-panel-header strong {
  font-size: 15px;
}

.inbox-panel-header button {
  background: transparent;
  border: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.inbox-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 4px;
}

.inbox-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: inherit;
  font-family: inherit;
  padding: 10px 8px;
  cursor: pointer;
}

.inbox-item:hover {
  background: #20263a;
}

.inbox-item.unread {
  background: rgba(76, 125, 255, 0.08);
}

.inbox-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.inbox-private-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(91, 140, 255, 0.12);
  color: #9eb6ff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.inbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.inbox-item-date {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.inbox-item-preview {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inbox-detail {
  margin-top: 8px;
}

.inbox-detail-back {
  display: inline-block;
  margin-bottom: 10px;
  background: transparent;
  border: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.inbox-detail h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.inbox-detail-date {
  margin: 0 0 12px;
  color: #87a5ff;
  font-family: var(--font);
  font-size: 12px;
}

.inbox-detail-body {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 0.15em;
}

.collection-picker {
  margin: 0 0 16px;
  padding: 0;
  border: none;
}

.collection-picker legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.collection-checkboxes {
  display: grid;
  gap: 8px;
}

.collection-checkboxes label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

/* Product detail page */
.product-page {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px) 80px;
  box-sizing: border-box;
}

.product-loading,
.product-error {
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
  font-size: 18px;
}

.product-admin-review-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(232, 196, 88, 0.35);
  background:
    linear-gradient(180deg, rgba(232, 196, 88, 0.12), transparent 70%),
    var(--panel);
  color: var(--text);
  font-size: 14px;
}

.product-admin-review-banner strong {
  color: #dabf73;
}

.product-admin-review-banner span {
  color: var(--muted);
  flex: 1 1 180px;
}

.product-admin-review-banner .text-button {
  white-space: nowrap;
}

.product-error .text-button {
  display: inline-block;
  margin-top: 16px;
}

.product-viewer-wrap {
  position: relative;
  width: 100%;
  margin: 0 auto 28px;
  background: #0c1018;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: min(58vh, 560px);
  box-shadow: var(--shadow);
}

/* Store media switcher (3D <-> images) */
.product-media {
  margin: 0 auto 28px;
}

.product-media-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: #10131c;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.product-media-mode {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.product-media-mode.is-active {
  background: var(--accent, #4f7cff);
  color: #fff;
}

.product-media-stage {
  position: relative;
  width: 100%;
  background: #0c1018;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  contain: paint layout;
  transform: translateZ(0);
  -webkit-mask-image: linear-gradient(#fff 0 0);
  mask-image: linear-gradient(#fff 0 0);
  height: min(58vh, 560px);
  z-index: 1;
  box-shadow: var(--shadow);
}

/* 3D and images share the same frame — leave room above the thumb row. */
.product-media-3d,
.product-media-images {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 84px;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  background: #10131c;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

/* Smooth directional slide between slides. */
.product-media-3d.is-animating,
.product-media-images.is-animating,
.product-media-clone {
  transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.2s ease;
  will-change: transform, opacity;
  z-index: 1;
}

.product-media-clone {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 84px;
  margin: 0;
  border: 0;
  background: #10131c;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  z-index: 2;
}

.product-media-clone .product-media-current {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.product-media-3d[hidden],
.product-media-images[hidden] {
  display: none !important;
}

.product-media-images {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.product-media-thumb-3d-label {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: #1a2230;
}

.product-media-current {
  max-width: 100%;
  max-height: min(48vh, 460px);
  object-fit: contain;
  border-radius: 12px;
}

.product-media-nav {
  position: absolute;
  top: calc((100% - 84px) / 2);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(16, 19, 28, 0.82);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.product-media-nav:hover {
  background: var(--accent, #4f7cff);
}

.product-media-prev {
  left: 10%;
}

.product-media-next {
  right: 10%;
}

.product-media-thumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 12px;
}

.product-media-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: #0d111a;
}

.product-media-thumb.is-active {
  border-color: var(--accent, #4f7cff);
}

.product-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media-3d .product-viewer,
.product-viewer {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
  background: #10131c;
  overflow: hidden;
  border-radius: 12px;
  --poster-color: transparent;
  clip-path: inset(0 round 12px);
}

.product-media-3d .product-viewer::part(default-progress-bar),
.product-viewer::part(default-progress-bar) {
  overflow: hidden;
}

.product-light-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 28px 16px 10px;
  background: linear-gradient(
    to top,
    rgba(8, 10, 16, 0.88) 0%,
    rgba(8, 10, 16, 0.45) 55%,
    rgba(8, 10, 16, 0) 100%
  );
  pointer-events: none;
}

.product-light-label {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 0;
  max-width: 360px;
  margin: 0 auto;
  color: #d7deef;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.product-light-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: -2px;
  color: #9eb0d8;
}

.product-light-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}

.product-light-label input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
}

.product-light-value {
  min-width: 3.4em;
  text-align: right;
  font-family: var(--font);
  font-size: 12px;
  color: #9eb0d8;
  font-weight: 500;
}

.product-viewer-lock-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-viewer-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: min(58vh, 560px);
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.product-viewer-fallback img {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.admin-test-previews {
  margin: 0 0 16px;
}

.product-below-media {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: start;
  margin: 22px 0 28px;
}

.product-below-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  justify-self: start;
}

.product-below-left h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: left;
}

.product-description-left {
  margin: 0;
  text-align: left;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 600;
  line-height: 1.65;
  color: var(--muted);
  max-width: 42ch;
}

.product-below-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  justify-self: center;
  min-width: 0;
}

.product-info-panel {
  width: min(560px, 42vw);
  min-width: 360px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.product-info-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text, #e7ebf3);
}

.product-info-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.product-info-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.product-info-row:first-child {
  border-top: 0;
}

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

.product-info-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.product-info-note {
  color: #f0a35e;
  font-size: 13px;
  font-weight: 600;
}

.product-info-box .product-format-list {
  margin: 0;
}

.product-info-box .product-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.product-below-price {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-self: end;
  gap: 10px;
  min-width: 160px;
}

.product-below-price .product-price {
  margin: 0;
  text-align: right;
}

.product-below-price .product-buy-btn,
.product-below-price .product-cart-btn {
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 44px;
}

@media (max-width: 900px) {
  .product-below-media {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .product-below-left {
    grid-column: 1 / -1;
  }
  .product-below-center {
    align-items: stretch;
  }
  .product-info-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 720px) {
  .product-below-media {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .product-below-left,
  .product-below-left h1,
  .product-description-left {
    text-align: left;
    align-items: flex-start;
  }
  .product-info-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .product-info-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-below-price {
    align-items: stretch;
  }
}

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

.product-copy h1 {
  margin: 8px 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.product-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.product-collection-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: #87a5ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
}

.product-collection-link:hover {
  color: white;
  border-color: var(--blue);
  background: #20263a;
}

.product-meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.product-specs {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.3fr);
  gap: 10px;
  margin: 0 0 16px;
}

.product-spec {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.product-spec-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.product-spec-value {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.product-format-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-format-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(91, 140, 255, 0.3);
  border-radius: 6px;
  background: rgba(91, 140, 255, 0.1);
  color: #b9cbff;
  font-size: 11px;
  font-weight: 700;
}

.product-spec-empty {
  color: var(--muted);
  font-size: 13px;
}

.product-description {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.product-buy {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.product-price {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.product-buy .btn-primary,
.product-buy .btn-secondary,
.product-cart-btn {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}

.product-cart-btn.in-cart,
.product-cart-btn:disabled {
  background: #2a3144;
  color: var(--muted);
  cursor: default;
  filter: none;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 700;
}

.product-buy-btn {
  cursor: pointer;
}

@media (max-width: 900px) {
  .product-details {
    grid-template-columns: 1fr;
  }

  .product-buy {
    position: static;
    order: -1;
  }

  .product-viewer-wrap,
  .product-viewer-fallback,
  .product-media-stage {
    min-height: min(48vh, 420px);
    height: min(48vh, 420px);
  }
}

@media (max-width: 520px) {
  .product-specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .product-page {
    padding: 16px 14px 70px;
  }

  .product-viewer-wrap,
  .product-viewer-fallback,
  .product-media-stage {
    min-height: min(42vh, 340px);
    height: min(42vh, 340px);
    border-radius: 12px;
  }

  .product-copy h1 {
    font-size: 26px;
  }

  .product-description {
    font-size: 15px;
  }

  .product-price {
    font-size: 28px;
  }

  .product-buy {
    padding: 16px;
  }
}