:root {
  --paper: #fffdfa;
  --ivory: #f7f2e8;
  --ink: #171513;
  --muted: #736d62;
  --line: #dfd1b8;
  --gold: #c9a34d;
  --gold-deep: #745411;
  --rose: #ad5c68;
  --sage: #627864;
  --charcoal: #24211e;
  --panel: rgba(255, 253, 250, .86);
  --shadow: 0 24px 70px rgba(34, 29, 18, .13);
  --radius: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --paper: #11100f;
  --ivory: #191716;
  --ink: #fff8ec;
  --muted: #c9bfae;
  --line: #4c4028;
  --gold: #e0bc65;
  --gold-deep: #f2d68a;
  --charcoal: #090908;
  --panel: rgba(27, 25, 23, .9);
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  min-height: 100vh;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--paper) 94%, white), var(--ivory)),
    repeating-linear-gradient(90deg, rgba(201, 163, 77, .06) 0, rgba(201, 163, 77, .06) 1px, transparent 1px, transparent 80px);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(201, 163, 77, .08) 32%, transparent 35% 100%),
    linear-gradient(90deg, rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 240px 240px, 28px 28px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.container { width: min(1220px, calc(100% - 32px)); margin-inline: auto; }

.top-strip {
  display: flex;
  justify-content: center;
  gap: 22px;
  padding: 10px 16px;
  color: #fffdf8;
  background: var(--charcoal);
  font-size: 13px;
  overflow: hidden;
}

.strip-track {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  animation: glide 22s linear infinite;
}

.strip-track span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  vertical-align: middle;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: white;
  box-shadow: 0 10px 26px rgba(126,93,22,.12);
}

.brand-name { display: grid; line-height: 1.05; }
.brand-name strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  letter-spacing: 0;
}
.brand-name span { color: var(--gold-deep); font-size: 12px; margin-top: 5px; }

.desktop-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn,
.icon-btn,
.ghost-btn,
.gold-btn,
.chip {
  min-height: 40px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease), border-color .24s var(--ease);
}

.btn:hover,
.icon-btn:hover,
.ghost-btn:hover,
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 12px 24px rgba(126,93,22,.13);
}

.gold-btn {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #806018, #d4b15d 47%, #806018);
  border-color: rgba(126,93,22,.5);
  box-shadow: 0 18px 36px rgba(126,93,22,.22);
}

.gold-btn::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -45%;
  width: 35%;
  background: rgba(255,255,255,.38);
  transform: rotate(19deg);
  animation: shine 3.8s ease-in-out infinite;
}

.icon-btn {
  width: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

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

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b681b, #d6b35f);
  border: 1px solid rgba(126,93,22,.4);
  color: #fff;
  box-shadow: 0 12px 28px rgba(126,93,22,.18);
}

.toggle-pill button {
  border: 0;
  min-width: 42px;
  min-height: 30px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
}

.toggle-pill button.active {
  color: var(--gold-deep);
  background: #fffdf8;
}

.side-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(23,21,19,.45);
  backdrop-filter: blur(8px);
}

.side-backdrop[hidden],
.side-menu[hidden],
.drawer[hidden],
.modal[hidden] { display: none; }

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 81;
  width: min(360px, 88vw);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px;
  color: #fff;
  background: rgba(35, 32, 29, .98);
  box-shadow: var(--shadow);
}

.side-menu[dir="rtl"] { inset: 0 0 0 auto; }

.side-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.side-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.side-links a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
}

.hero-home {
  min-height: calc(100vh - 118px);
  display: grid;
  align-content: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 70px) 0;
}

.home-title {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--gold-deep);
  font-weight: 800;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.home-title h1,
.page-title h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 8vw, 106px);
  line-height: .92;
  letter-spacing: 0;
}

.gold-text {
  color: transparent;
  background: linear-gradient(135deg, #6f5112, #c9a34d 44%, #f3d886 58%, #725416);
  -webkit-background-clip: text;
  background-clip: text;
}

.home-title p,
.page-title p {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.85;
}

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

.category-tile {
  position: relative;
  min-height: clamp(340px, 42vw, 540px);
  display: grid;
  align-content: end;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255,255,255,.44);
  border-radius: var(--radius);
  overflow: hidden;
  color: white;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,.74)),
    var(--tile-image),
    linear-gradient(135deg, #24211e, #c9a34d);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 16%, rgba(255,255,255,.42), transparent 18%),
    linear-gradient(90deg, rgba(255,255,255,.12), transparent 28%, rgba(201,163,77,.16));
  mix-blend-mode: screen;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: auto -25% 18% -25%;
  height: 88px;
  background: linear-gradient(90deg, transparent, rgba(201,163,77,.26), transparent);
  transform: rotate(-4deg);
  animation: tileSweep 5s ease-in-out infinite;
}

.category-tile small {
  position: relative;
  z-index: 1;
  font-weight: 900;
  color: rgba(255,255,255,.76);
  text-transform: uppercase;
}

.category-tile strong {
  position: relative;
  z-index: 1;
  font-size: clamp(38px, 6vw, 72px);
  line-height: .9;
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase;
}

.category-tile span {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: rgba(255,255,255,.82);
  line-height: 1.7;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr);
  gap: 20px;
  align-items: stretch;
  padding: clamp(32px, 5vw, 64px) 0 24px;
}

.motion-spotlight {
  width: 100%;
  margin: 16px 0 0;
  border-block: 1px solid rgba(126,93,22,.18);
  background: var(--charcoal);
  overflow: hidden;
}

.motion-slide {
  position: relative;
  min-height: clamp(340px, 42vw, 570px);
  overflow: hidden;
  isolation: isolate;
  background: #d9d9d6;
}

.motion-media-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  filter: saturate(.55) contrast(1.05);
  opacity: .78;
  transform: scale(1.04);
}

.motion-media-grid img,
.motion-media-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(.72) sepia(.16);
}

.motion-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(255,253,250,.6), rgba(255,253,250,.16) 42%, rgba(36,33,30,.32)),
    linear-gradient(180deg, transparent 55%, rgba(36,33,30,.34));
}

.motion-copy {
  position: relative;
  z-index: 2;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
  padding: clamp(24px, 5vw, 58px);
  text-align: center;
  text-transform: uppercase;
  font-style: italic;
  font-weight: 900;
}

.motion-copy strong {
  color: var(--gold-deep);
  font-size: clamp(42px, 8vw, 96px);
  line-height: .8;
  text-shadow: 0 8px 24px rgba(255,253,250,.62);
}

.motion-copy b {
  color: var(--gold);
  font-size: clamp(50px, 10vw, 124px);
  line-height: .75;
  text-shadow: 0 12px 34px rgba(36,33,30,.2);
}

.motion-copy span,
.motion-copy small {
  color: var(--charcoal);
  font-size: clamp(13px, 1.6vw, 20px);
  line-height: 1;
}

.page-card {
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-photo {
  min-height: 300px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.4);
  background:
    linear-gradient(180deg, transparent 35%, rgba(0,0,0,.55)),
    var(--tile-image),
    linear-gradient(135deg, #24211e, #d5b768);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.toolbar,
.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 10px;
  margin: 18px 0;
}

.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 13px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; line-height: 1.65; }
.field input[type="color"] { padding: 4px; cursor: pointer; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,163,77,.14);
}

.color-builder {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
}

.color-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
}

.color-token {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
}

.color-token small { color: var(--muted); font-size: 11px; }

.color-dot {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(126,93,22,.35);
}

.empty.compact { padding: 10px 12px; width: 100%; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 54px;
}

.product-card,
.panel,
.admin-card,
.form-panel {
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(34,29,18,.08);
}

.product-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  transform: translateY(16px);
  opacity: 0;
  transition: transform .55s var(--ease), opacity .55s var(--ease), box-shadow .25s var(--ease);
}

.product-card.in-view { transform: translateY(0); opacity: 1; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); }

.product-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background:
    linear-gradient(150deg, rgba(255,255,255,.56), rgba(201,163,77,.18)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 8px, rgba(126,93,22,.08) 8px 16px),
    var(--visual-tone, #d8c082);
}

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

.drawer-product-visual {
  position: relative;
  width: 100%;
  min-height: 230px;
  max-height: 360px;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background:
    linear-gradient(150deg, rgba(255,255,255,.62), rgba(201,163,77,.18)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 8px, rgba(126,93,22,.08) 8px 16px),
    var(--visual-tone, #d8c082);
}

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

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 7px 10px;
  color: white;
  background: var(--charcoal);
  border-radius: var(--radius);
  font-size: 12px;
}

.product-body { display: grid; gap: 10px; }
.product-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}
.product-title h3 { font-size: 18px; line-height: 1.45; }
.product-title small { color: var(--muted); white-space: nowrap; margin-top: 4px; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; color: var(--gold-deep); font-weight: 900; font-size: 19px; }
.price del { color: var(--muted); font-weight: 500; font-size: 13px; }
.product-desc { color: var(--muted); line-height: 1.65; font-size: 14px; min-height: 46px; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  width: min(490px, 100%);
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--paper);
  box-shadow: var(--shadow);
  border-right: 1px solid var(--line);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.drawer-body {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}
.option-label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.size-row, .color-row, .actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.size-chip {
  min-width: 38px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}
.size-chip.active { color: white; background: var(--charcoal); border-color: var(--charcoal); }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(126,93,22,.35);
}
.swatch.active { box-shadow: 0 0 0 3px rgba(201,163,77,.42); transform: translateY(-2px); }

.drawer-actions-sticky {
  position: sticky;
  bottom: -16px;
  margin: 4px -16px -16px;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 10%, transparent), var(--paper) 38%);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.drawer-actions-sticky .gold-btn { width: 100%; }

.detail-box {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  color: var(--muted);
  line-height: 1.85;
}
.detail-box img { width: 100%; margin-top: 10px; border-radius: var(--radius); border: 1px solid var(--line); }

.cart-list { display: grid; gap: 10px; margin: 18px 0; }
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.summary {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary .total { font-size: 22px; font-weight: 900; color: var(--gold-deep); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 30px 0 70px;
}
.info-card { padding: 18px; min-height: 150px; }
.info-card b { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 12px; color: #fff; background: var(--charcoal); border-radius: var(--radius); }
.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--muted); line-height: 1.75; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}
.login-card {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.login-card img { width: 120px; height: 120px; object-fit: contain; margin: auto; border: 1px solid var(--line); background: white; }
.login-card h1 { text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 34px; }

.admin-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px;
  color: #fff;
  background: rgba(36,33,30,.98);
}
.admin-main { padding: 20px clamp(14px, 3vw, 34px) 42px; min-width: 0; }
.admin-nav { display: grid; gap: 8px; align-content: start; }
.admin-nav a {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
}
.admin-nav a.active { background: rgba(201,163,77,.2); border-color: rgba(201,163,77,.58); }
.admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-card, .form-panel { padding: 16px; }
.admin-card strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 32px; margin-top: 10px; }
.admin-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 12px 11px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; line-height: 1.55; }
th { color: var(--gold-deep); background: rgba(201,163,77,.1); font-size: 13px; }
.visual-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 14px;
  align-items: start;
}
.visual-preview {
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: auto;
}
.editable-block { outline: 2px solid transparent; outline-offset: 3px; }
.editable-block:hover, .editable-block.selected { outline-color: var(--gold); }
.mini-preview { transform-origin: top right; padding: 18px; }
.empty { padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; line-height: 1.7; }
.toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 120;
  width: min(360px, calc(100% - 36px));
  padding: 13px 15px;
  color: #fff;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }
.footer { margin-top: 40px; padding: 28px 0; color: white; background: var(--charcoal); }
.footer p { color: rgba(255,255,255,.72); margin-top: 8px; line-height: 1.7; }

@keyframes shine { 0%, 58% { left: -52%; } 100% { left: 130%; } }
@keyframes glide { from { transform: translateX(0); } to { transform: translateX(50%); } }
@keyframes tileSweep { 0%, 35% { transform: translateX(14%) rotate(-4deg); opacity: .55; } 100% { transform: translateX(-14%) rotate(-4deg); opacity: .95; } }

@media (max-width: 1060px) {
  .page-hero,
  .admin-shell,
  .admin-two,
  .visual-editor { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .product-grid,
  .category-tiles,
  .info-grid,
  .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-links { display: none; }
  .header-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .category-tiles,
  .product-grid,
  .info-grid,
  .toolbar,
  .admin-toolbar,
  .admin-grid,
  .form-grid { grid-template-columns: 1fr; }
  .category-tile { min-height: 420px; }
  .motion-slide { min-height: 420px; }
  .motion-media-grid {
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    width: 160%;
    right: -30%;
  }
  .motion-copy { flex-wrap: wrap; gap: 8px 14px; padding: 24px 14px; }
  .drawer { inset: auto 0 0; height: min(94vh, 760px); width: 100%; border-right: 0; border-top: 1px solid var(--line); }
  .drawer-body { gap: 12px; padding: 14px; }
  .drawer-product-visual { min-height: 210px; max-height: 44vh; aspect-ratio: 1 / 1; }
  .size-row,
  .color-row,
  .actions-row { align-items: center; }
  .swatch { flex: 0 0 34px; }
  .drawer-actions-sticky { bottom: -14px; margin: 2px -14px -14px; padding: 10px 14px 14px; }
  .home-title h1, .page-title h1 { font-size: clamp(42px, 14vw, 76px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* v8 professional admin dashboard */
.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}
.dashboard-toolbar h2 { margin: 6px 0; font-size: clamp(24px, 3vw, 38px); }
.dashboard-toolbar p { color: var(--muted); line-height: 1.7; }
.dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -35px auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
}
.stat-card span { color: var(--muted); }
.stat-card strong { display:block; margin: 8px 0 6px; font-size: clamp(24px, 4vw, 44px); }
.stat-card small { color: var(--muted); }
.dashboard-hero-card {
  min-height: 170px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--charcoal) 92%, var(--gold)), var(--charcoal));
  color: #fffdf8;
}
.dashboard-hero-card span { color: rgba(255,255,255,.72); }
.dashboard-hero-card strong { font-size: clamp(26px, 4vw, 46px); line-height: 1.05; }
.dashboard-hero-card p { color: rgba(255,255,255,.78); margin-top: 10px; }
.status-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.status-pills span {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ivory) 72%, transparent);
}
.metric-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px 0 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.metric-row em {
  position: absolute;
  inset: auto 0 4px auto;
  width: var(--w);
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
}
@media (max-width: 900px) {
  .dashboard-toolbar { display: grid; }
  .dashboard-kpis { grid-template-columns: 1fr; }
}

/* VPS database version helpers */
.product-grid,
.benefits-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.product-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-media { width: 100%; min-height: 250px; border: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--product-tone, var(--gold)) 18%, var(--paper)), var(--ivory)); display: grid; place-items: center; color: var(--gold-deep); font-weight: 900; font-size: 22px; }
.product-media img { width: 100%; height: 250px; object-fit: cover; }
.product-body { padding: 16px; display: grid; gap: 10px; }
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price, .price-row strong { color: var(--gold-deep); font-size: 20px; }
.benefit-card, .cart-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cart-list { display: grid; gap: 12px; align-content: start; }
.cart-item { display: grid; gap: 8px; }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 90; width: min(760px, 96vw); background: var(--paper); overflow: auto; padding: 18px; box-shadow: var(--shadow); }
.drawer-close { position: sticky; top: 0; margin-inline-start: auto; z-index: 2; }
.drawer-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); gap: 18px; }
.drawer-image { min-height: 360px; display: grid; place-items: center; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.drawer-image img { width: 100%; height: 100%; object-fit: cover; }
.drawer-info { display: grid; gap: 12px; align-content: start; }
.drawer-info label { display: grid; gap: 6px; }
.size-guide { border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: start; vertical-align: top; }
.stat-card { display: grid; gap: 6px; }
.stat-card strong { font-size: 26px; color: var(--gold-deep); }
.btn.danger, .danger { border-color: #b94343; color: #fff; background: #9b2f2f; }
.empty { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.toast { position: fixed; inset: auto 16px 16px auto; z-index: 100; padding: 12px 16px; background: var(--charcoal); color: #fff; border-radius: var(--radius); opacity: 0; transform: translateY(12px); transition: .22s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) { .drawer-content { grid-template-columns: 1fr; } .drawer { width: 100vw; } }

/* Category image editor */
.category-image-preview {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  overflow: hidden;
}
.category-image-preview img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(0,0,0,.08);
}
.category-image-preview small {
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.category-image-preview.empty-preview {
  grid-template-columns: 1fr;
  min-height: 64px;
  place-items: center;
}
.category-row .actions-row.full { grid-column: 1 / -1; justify-content: flex-start; }

/* Variant colors, size guide, and responsive polish */
.product-form-grid { align-items: start; }
.variant-panel {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 20px;
  padding: 14px;
  background: color-mix(in srgb, var(--ivory) 60%, transparent);
}
.preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.chip, .color-preset, .mini-pill {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 12px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  line-height: 1;
}
.chip.active, .color-preset:hover, .mini-pill {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 16%, var(--panel));
}
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  background: var(--dot, #d7bd78);
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
  flex: 0 0 auto;
}
.color-rows { display: grid; gap: 10px; margin-top: 12px; }
.color-admin-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) 120px minmax(180px, 1.3fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--paper);
}
.color-admin-row > .color-dot { align-self: center; width: 28px; height: 28px; }
.selected-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.compact-row { margin-top: 10px; }
.compact-row input[type="color"] { max-width: 90px; min-height: 43px; padding: 4px; }
.variant-table th,
.variant-table td { text-align: center; min-width: 92px; }
.variant-table input[type="number"] { width: 88px; text-align: center; }
.variant-color-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.option-group { display: grid; gap: 8px; }
.color-swatch-row, .size-choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.color-choice, .size-choice {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 16px;
  padding: 9px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.color-choice.active, .size-choice.active {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
  background: color-mix(in srgb, var(--gold) 14%, var(--panel));
}
.color-choice em { font-style: normal; }
.size-choice { display: grid; place-items: center; min-width: 58px; }
.size-choice small { color: var(--muted); font-size: 11px; }
.size-choice:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.stock-note { padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 12%, transparent); }
.size-guide-block { display: grid; gap: 8px; margin-top: 8px; }
.size-guide-block img.size-guide { width: 100%; max-height: 360px; object-fit: contain; background: #fff; padding: 8px; }
.color-aware-image img { transition: opacity .18s var(--ease), transform .18s var(--ease); }
.admin-shell, .container { max-width: min(1180px, calc(100vw - 28px)); }
.admin-two { grid-template-columns: minmax(320px, .95fr) minmax(360px, 1.05fr); }
.form-panel, .admin-card, .drawer, .product-card { min-width: 0; }
input, textarea, select, button { max-width: 100%; }
@media (max-width: 980px) {
  .admin-two { grid-template-columns: 1fr; }
  .color-admin-row { grid-template-columns: auto 1fr 100px; }
  .color-admin-row .field.full { grid-column: 1 / -1; }
  .color-admin-row .btn.danger { grid-column: 1 / -1; justify-self: start; }
  .variant-table th, .variant-table td { min-width: 78px; }
}
@media (max-width: 720px) {
  .container { max-width: calc(100vw - 18px); }
  .hero-home, .page-hero { padding-left: 4px; padding-right: 4px; }
  .product-grid, .benefits-grid, .admin-grid { grid-template-columns: 1fr; }
  .product-media, .product-media img { min-height: 220px; height: 220px; }
  .drawer { inset: 0; width: 100vw; padding: 12px; }
  .drawer-content { grid-template-columns: 1fr; gap: 12px; }
  .drawer-image { min-height: 260px; max-height: 45vh; }
  .drawer-info { gap: 10px; }
  .color-choice, .size-choice, .chip, .color-preset { min-height: 42px; }
  .color-admin-row { grid-template-columns: 1fr; }
  .color-admin-row > .color-dot { justify-self: start; }
  .compact-row { display: grid; grid-template-columns: 1fr; }
  .toast { inset: auto 10px 10px 10px; text-align: center; }
  .table-wrap { margin-inline: -8px; padding-inline: 8px; }
}
