:root {
  --ink: #202124;
  --muted: #697077;
  --line: #d9dee4;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --coral: #c8553d;
  --gold: #b8872d;
  --blue: #315f9d;
  --shadow: 0 18px 55px rgba(32, 33, 36, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.policy-page {
  display: grid;
  gap: 20px;
  padding-top: 40px;
  padding-bottom: 60px;
}

.policy-page p {
  color: var(--muted);
  line-height: 1.9;
}

.review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.review-card p {
  margin: 8px 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-importer {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.product-importer label {
  display: grid;
  gap: 8px;
}

.product-importer small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(32, 33, 36, 0.08);
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 12px;
  color: #3d4348;
  font-size: 14px;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.cart-button,
.tab-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-weight: 700;
}

.cart-button {
  height: 42px;
  min-width: 82px;
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-button b {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--coral);
  font-size: 12px;
}

.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 22, 25, 0.76), rgba(16, 22, 25, 0.25) 55%, rgba(16, 22, 25, 0.08));
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?auto=format&fit=crop&w=1800&q=82");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 11vh;
  color: white;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9ff0dd;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(46px, 8vw, 104px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 20px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
.primary-button {
  min-height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 800;
}

.primary-link,
.primary-button {
  border: 0;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

.primary-link:hover,
.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: white;
}

.member-entry {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  font-size: 13px;
  font-weight: 800;
}

.full {
  width: 100%;
}

.trust-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -42px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.trust-strip div {
  min-height: 112px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.trust-strip div:last-child {
  border-right: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  font-size: 18px;
}

.trust-strip span {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.rewards-band {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 28px;
  align-items: start;
}

.reward-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reward-steps div,
.stat-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 32px rgba(32, 33, 36, 0.07);
}

.reward-steps div {
  min-height: 150px;
  padding: 18px;
}

.reward-steps strong,
.reward-steps span {
  display: block;
}

.reward-steps strong {
  line-height: 1.35;
}

.reward-steps span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.promo-band {
  min-height: 420px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 40px;
  border-radius: 8px;
  color: white;
}

.promo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 23, 24, 0.78), rgba(20, 23, 24, 0.08));
}

.promo-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-band > div {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.promo-band h2 {
  margin-bottom: 22px;
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0 0;
}

.split-section {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 50px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.split-section p:last-child,
.checkout-copy p:last-child {
  margin: 35px 0 0;
  color: #454c52;
  font-size: 18px;
  line-height: 1.72;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.search-box,
.sort-box,
.checkout-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input,
.sort-box select,
.checkout-form input,
.checkout-form select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  outline: none;
}

.search-box input:focus,
.sort-box select:focus,
.checkout-form input:focus,
.checkout-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.search-box {
  width: min(340px, 100%);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-button {
  height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
}

.tab-button.active {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.sort-box {
  min-width: 190px;
}

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

.product-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(32, 33, 36, 0.07);
}

.product-image {
  aspect-ratio: 4 / 3;
  background: #eef1f2;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.product-body {
  padding: 16px;
}

.product-meta {
  min-height: 26px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.product-body h3 {
  min-height: 48px;
  margin: 7px 0 9px;
  font-size: 18px;
  line-height: 1.3;
}

.product-body p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
}

.price-row strong {
  font-size: 20px;
}

.add-button,
.quantity-button {
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  cursor: pointer;
}

.add-button {
  min-height: 40px;
  padding: 0 12px;
  font-weight: 800;
}

.add-button:hover {
  background: var(--blue);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 42px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.checkout-section {
  padding-bottom: 86px;
  display: grid;
  grid-template-columns: 0.85fr 1.1fr 0.8fr;
  gap: 22px;
  align-items: start;
}

.home-checkout-section {
  display: none !important;
}

.checkout-page-heading {
  padding-bottom: 24px;
}

.checkout-page-heading h1 {
  margin: 8px 0;
  font-size: clamp(30px, 5vw, 52px);
}

.checkout-page-section {
  padding-top: 0;
}

.checkout-form,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 32px rgba(32, 33, 36, 0.07);
}

.checkout-form {
  padding: 22px;
}

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

.wide {
  grid-column: 1 / -1;
}

.primary-button {
  width: 100%;
  margin-top: 18px;
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--accent);
  font-weight: 800;
}

.summary-panel {
  padding: 22px;
}

.summary-panel h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

.summary-items {
  display: grid;
  gap: 12px;
  max-height: 260px;
  overflow: auto;
}

.summary-line,
.cart-line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
}

.summary-line img,
.cart-line img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
}

.summary-line strong,
.cart-line strong {
  display: block;
  line-height: 1.25;
}

.summary-line span,
.cart-line span {
  color: var(--muted);
  font-size: 13px;
}

.totals {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0;
}

.totals dt {
  color: var(--muted);
}

.totals dd {
  margin: 0;
  font-weight: 800;
}

.grand-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 22px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: rgba(32, 33, 36, 0);
  transition: background 180ms ease;
}

.cart-drawer.open {
  pointer-events: auto;
  background: rgba(32, 33, 36, 0.42);
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  margin-left: auto;
  padding: 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.cart-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  font-size: 28px;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 12px 0;
}

.cart-line {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.quantity-button {
  width: 28px;
  height: 28px;
}

.drawer-footer {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-footer div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.admin-body {
  background: #f5f7f6;
}

.admin-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 80px;
}

.admin-hero {
  min-height: 260px;
  display: grid;
  align-items: end;
  padding: 42px;
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(90deg, rgba(32, 33, 36, 0.86), rgba(32, 33, 36, 0.38)),
    url("https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1600&q=82") center / cover;
}

.admin-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1;
}

.admin-hero p:last-child {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.stat-card {
  min-height: 112px;
  padding: 18px;
}

.stat-card span,
.panel-heading span,
.admin-table span,
.admin-note {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.admin-panel {
  min-width: 0;
  padding: 22px;
  margin-top: 18px;
}

.admin-grid .admin-panel {
  margin-top: 0;
}

.panel-heading {
  min-height: 44px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  font-size: 24px;
  line-height: 1.15;
}

.admin-table {
  width: 100%;
  overflow: auto;
}

.admin-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

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

.admin-table th {
  color: #454c52;
  font-size: 13px;
  background: #f7f8f7;
}

.admin-table strong {
  display: block;
}

.status-pill,
.table-button {
  min-height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.status-pill {
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.table-button {
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.danger-button {
  color: #b42318;
  border-color: #f3b7b1;
  background: #fff7f6;
}

.table-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-note {
  margin: 14px 0 0;
  line-height: 1.5;
}

.admin-panel label,
.auth-form label,
.designer-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-panel input,
.admin-panel select,
.auth-form input,
.auth-form select,
.designer-form input,
.designer-form select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  outline: none;
}

.designer-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.layout-editor {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f7;
}

.layout-editor > strong {
  display: block;
  margin-bottom: 12px;
}

.section-control {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.section-control label {
  display: flex;
  align-items: center;
}

.section-control input {
  width: 18px;
  height: 18px;
}

.store-preview {
  position: sticky;
  top: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.preview-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.store-preview iframe {
  width: 100%;
  height: 720px;
  display: block;
  border: 0;
}

.level-select {
  min-width: 150px;
  height: 36px !important;
}

.member-body {
  background: #f5f7f6;
}

.member-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.auth-layout {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.auth-intro,
.auth-panel {
  border-radius: 8px;
}

.auth-intro {
  display: grid;
  align-content: end;
  padding: 48px;
  color: white;
  background:
    linear-gradient(0deg, rgba(26, 29, 29, 0.84), rgba(26, 29, 29, 0.2)),
    url("https://images.unsplash.com/photo-1528360983277-13d401cdc186?auto=format&fit=crop&w=1400&q=82") center / cover;
}

.auth-intro h1,
.member-heading h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
}

.auth-intro > p:last-of-type {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.65;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-points span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-weight: 800;
}

.auth-panel {
  padding: 28px;
  align-self: center;
  border: 1px solid var(--line);
  background: white;
  box-shadow: var(--shadow);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.member-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.member-heading p:last-child {
  color: var(--muted);
}

.share-box {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.share-box span {
  color: var(--muted);
  font-size: 13px;
}

.share-box strong {
  color: var(--accent);
  font-size: 28px;
}

.share-box input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

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

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

.logistics-editor {
  min-width: 180px;
  display: grid;
  gap: 6px;
}

.logistics-editor input,
.logistics-editor select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.wallet-balances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.wallet-balances div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f7;
}

.wallet-balances span,
.wallet-balances strong {
  display: block;
}

.wallet-balances span {
  color: var(--muted);
  font-size: 13px;
}

.wallet-balances strong {
  margin-top: 7px;
  font-size: 22px;
}

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

.compact-form button,
.compact-form label:last-of-type {
  grid-column: 1 / -1;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 6px;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
}

.level-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.level-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.level-row span {
  color: var(--muted);
  font-size: 13px;
}

.level-row.active {
  border-color: var(--accent);
  background: #f4f8f7;
}

.upload-field small,
.admin-panel small {
  color: var(--muted);
  line-height: 1.45;
}

.upload-field input[type="file"] {
  height: auto;
  padding: 9px;
}

.input-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.category-manager {
  display: grid;
  gap: 14px;
}

.inline-admin-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 0.6fr 0.7fr auto;
  gap: 12px;
  align-items: end;
}

.sub-editor {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f7;
}

.media-editor-row,
.variant-editor-row {
  display: grid;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.media-editor-row {
  grid-template-columns: 64px 1fr auto 32px;
}

.media-editor-row img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #e9ecec;
}

.variant-editor-row {
  grid-template-columns: 1fr 1fr 0.7fr 0.7fr 32px;
}

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.product-detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0 90px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.detail-main-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #eef1f2;
}

.detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumbnails {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.detail-thumbnails button {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.detail-thumbnails button.active {
  border-color: var(--accent);
}

.detail-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.product-detail-copy > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.product-detail-en {
  font-size: 14px !important;
}

.detail-price {
  display: block;
  margin: 22px 0;
  font-size: 32px;
}

.spec-copy {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.detail-variant {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.detail-variant select {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
}

.share-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.share-product-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.share-product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.share-product-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.share-product-card input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
}

.captcha-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.captcha-row strong {
  min-width: 88px;
  padding: 12px 8px;
  border-radius: 8px;
  color: var(--accent);
  background: #f1f4f3;
  text-align: center;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .trust-strip,
  .split-section,
  .checkout-section,
  .rewards-band,
  .admin-grid,
  .designer-grid,
  .auth-layout,
  .member-grid,
  .product-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .store-preview {
    position: static;
  }

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

  .inline-admin-form,
  .share-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip div:last-child {
    border-bottom: 0;
  }

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

@media (max-width: 640px) {
  .nav-shell {
    width: calc(100% - 20px);
    min-height: 68px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero {
    min-height: 620px;
  }

  .hero::after {
    background: linear-gradient(0deg, rgba(16, 22, 25, 0.78), rgba(16, 22, 25, 0.24));
  }

  .hero-content {
    width: calc(100% - 24px);
    padding-bottom: 72px;
  }

  .trust-strip,
  .section-shell,
  .admin-shell,
  .member-shell {
    width: calc(100% - 24px);
  }

  .section-heading,
  .toolbar {
    display: grid;
    align-items: stretch;
  }

  .search-box,
  .sort-box {
    width: 100%;
  }

  .product-grid,
  .field-grid,
  .reward-steps,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    padding: 28px 20px;
  }

  .member-heading {
    display: grid;
    align-items: stretch;
  }

  .share-box {
    width: 100%;
  }

  .wallet-balances,
  .compact-form,
  .member-stats {
    grid-template-columns: 1fr;
  }

  .compact-form button,
  .compact-form label:last-of-type {
    grid-column: auto;
  }

  .auth-intro {
    min-height: 480px;
    padding: 28px 20px;
  }

  .product-detail-shell {
    width: calc(100% - 24px);
  }

  .inline-admin-form,
  .share-product-grid,
  .media-editor-row,
  .variant-editor-row {
    grid-template-columns: 1fr;
  }

  .media-editor-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

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

  .wide {
    grid-column: auto;
  }

  .product-body h3,
  .product-body p {
    min-height: auto;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}
