﻿:root {
  --ink: #171b1c;
  --muted: #5f6761;
  --paper: #f6f2ea;
  --panel: #fffdf7;
  --line: #ded6c9;
  --field: #28352c;
  --olive: #66714b;
  --amber: #c88d3a;
  --rust: #9c5837;
  --steel: #56646a;
  --ok: #287451;
  --warn: #9c6a1c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(23, 27, 28, 0.12);
  background: rgba(246, 242, 234, 0.94);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: var(--field);
  border-radius: 8px;
}

.brand small,
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.75rem;
  font-weight: 700;
}

.brand span:last-child {
  display: grid;
  gap: 1px;
}

.main-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  display: grid;
  align-content: start;
  gap: 8px;
  width: min(390px, calc(100vw - 24px));
  height: 100vh;
  padding: 20px;
  border-left: 1px solid var(--line);
  color: #2d3431;
  font-weight: 650;
  background: var(--panel);
  box-shadow: -24px 0 70px rgba(23, 27, 28, 0.24);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.main-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: normal;
}

.main-nav a:hover,
.main-nav a.active {
  border-color: var(--line);
  background: #ebe3d4;
}

.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.menu-open .topbar {
  z-index: 80;
}

.menu-open .main-nav {
  transform: translateX(0);
}

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

.menu-panel-header span {
  display: grid;
  gap: 4px;
}

.menu-panel-header small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.75rem;
  font-weight: 800;
}

.menu-toggle,
.menu-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
}

.menu-toggle {
  gap: 4px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.menu-close {
  font-size: 1.55rem;
  line-height: 1;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  border: 0;
  background: rgba(23, 27, 28, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.menu-open .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.cart-button,
.admin-layout button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
}

.topbar > .cart-button {
  justify-self: end;
}

.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--rust);
  border-radius: 999px;
}

.age-gate-open {
  overflow: hidden;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 42px);
  background: rgba(0, 0, 0, 0.72);
}

.age-gate-panel {
  width: min(1000px, 100%);
  overflow: hidden;
  color: #30383a;
  background: #fff;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
}

.age-gate-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 112px;
  padding: 24px;
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(200, 141, 58, 0.16), transparent 42%),
    var(--field);
}

.age-gate-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--amber);
  font-weight: 900;
}

.age-gate-header small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 250, 240, 0.68);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.age-gate-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: 0;
}

.age-gate-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.64fr) minmax(260px, 0.36fr);
  min-height: 500px;
}

.age-gate-copy {
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(24px, 5vw, 54px) 12px clamp(24px, 5vw, 54px) clamp(24px, 5vw, 54px);
}

.age-gate-copy p {
  max-width: 620px;
  margin: 0;
  color: #3f4a4d;
  font-size: clamp(1rem, 2vw, 1.32rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.55;
}

.age-gate-copy h3 {
  margin: 4px 0 0;
  color: #3f4a4d;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
  text-transform: uppercase;
}

.age-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 8vw, 160px);
  align-items: center;
}

.age-gate-actions button {
  min-width: 118px;
  min-height: 82px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.age-yes {
  color: var(--ink);
  background: var(--amber);
}

.age-no {
  background: var(--field);
}

.age-gate-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.18) 38%, rgba(255, 255, 255, 0)),
    radial-gradient(circle at 70% 20%, rgba(200, 141, 58, 0.32), transparent 28%),
    linear-gradient(140deg, #4f5c48, #171b1c 58%, #0e1211);
}

.age-gate-horizon,
.age-gate-case,
.age-gate-lens,
.age-gate-pack,
.age-gate-tool {
  position: absolute;
  display: block;
}

.age-gate-horizon {
  inset: auto 0 0 0;
  height: 34%;
  background:
    linear-gradient(170deg, transparent 0 33%, rgba(255, 255, 255, 0.1) 34% 35%, transparent 36%),
    linear-gradient(12deg, #34271f, #181411);
}

.age-gate-case {
  right: 10%;
  bottom: 13%;
  width: 62%;
  aspect-ratio: 1.35;
  border-radius: 10px;
  background: linear-gradient(135deg, #2a2d2a, #0f1110);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
  transform: rotate(-8deg);
}

.age-gate-lens {
  right: 22%;
  top: 28%;
  width: 30%;
  aspect-ratio: 1;
  border: 16px solid #151918;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #afc1c0, #334448 52%, #101313);
}

.age-gate-pack {
  right: 50%;
  bottom: 8%;
  width: 28%;
  aspect-ratio: 0.76;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(255, 255, 255, 0.16) 45% 47%, transparent 48%),
    linear-gradient(145deg, #8b845d, #333d2d);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.age-gate-tool {
  right: 12%;
  bottom: 41%;
  width: 58%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #202322, #8c704c, #202322);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  transform: rotate(-16deg);
}

.age-gate-remember {
  display: flex;
  grid-template-columns: none;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 14px clamp(18px, 4vw, 42px);
  color: #3f4a4d;
  background: #fff;
  font-size: 1rem;
  font-weight: 500;
}

.age-gate-remember input {
  width: 16px;
  min-height: 16px;
  flex: 0 0 auto;
}

.age-denied {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: #171b1c;
  text-align: center;
}

.age-denied h1 {
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 7vw, 5rem);
}

.age-denied p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(320px, 1.08fr);
  align-items: stretch;
  overflow: hidden;
  background: #151b19;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
  align-self: center;
  padding: clamp(42px, 8vw, 104px) clamp(18px, 5vw, 72px);
  color: #fffaf0;
}

.hero-copy h1,
.page-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 250, 240, 0.84);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.65;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.primary-action {
  color: #171b1c;
  background: var(--amber);
  border: 1px solid var(--amber);
}

.secondary-action {
  color: #fffaf0;
  border: 1px solid rgba(255, 250, 240, 0.42);
}

.trust-row span {
  padding: 8px 10px;
  color: rgba(255, 250, 240, 0.82);
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 999px;
  font-size: 0.86rem;
}

.hero-media {
  position: relative;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(21, 27, 25, 0.2), rgba(21, 27, 25, 0.68)),
    url("assets/hero-firearms.png") center / cover no-repeat;
}

.hero-media .terrain,
.hero-media .gear-case,
.hero-media .lens,
.hero-media .pack,
.hero-media .tool {
  display: none;
}

.terrain,
.gear-case,
.lens,
.pack,
.tool {
  position: absolute;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

.terrain {
  inset: auto 0 0 0;
  height: 34%;
  background:
    linear-gradient(170deg, transparent 0 33%, rgba(255, 255, 255, 0.08) 34% 35%, transparent 36%),
    linear-gradient(12deg, #34271f, #181411);
}

.gear-case {
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(135deg, #3e493b, #1f2824);
}

.case-one {
  right: 11%;
  bottom: 18%;
  width: 42%;
  aspect-ratio: 1.85;
  transform: rotate(-5deg);
}

.case-two {
  right: 34%;
  bottom: 13%;
  width: 30%;
  aspect-ratio: 1.6;
  background: linear-gradient(135deg, #6e644f, #312b23);
  transform: rotate(6deg);
}

.lens {
  right: 25%;
  top: 26%;
  width: 17%;
  aspect-ratio: 1;
  border: 18px solid #202725;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #90a9ad, #26383a 54%, #111);
}

.pack {
  right: 55%;
  bottom: 24%;
  width: 22%;
  aspect-ratio: 0.76;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 44%, rgba(255, 255, 255, 0.12) 45% 47%, transparent 48%),
    linear-gradient(145deg, #777348, #333d2d);
}

.tool {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #202322, #8c704c, #202322);
}

.tool-one {
  right: 17%;
  bottom: 43%;
  width: 31%;
  transform: rotate(-16deg);
}

.tool-two {
  right: 43%;
  bottom: 39%;
  width: 26%;
  transform: rotate(18deg);
}

.age-panel {
  padding: 16px clamp(18px, 5vw, 64px);
  color: #fffaf0;
  background: var(--rust);
  line-height: 1.5;
}

.section,
.page-hero {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.page-hero {
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(23, 27, 28, 0.72), rgba(40, 53, 44, 0.94)),
    radial-gradient(circle at 80% 20%, rgba(200, 141, 58, 0.3), transparent 32%),
    var(--field);
}

.page-hero.compact {
  padding-bottom: 44px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section h2,
.auth-card h2,
.contact-form h2 {
  margin: 6px 0 18px;
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.catalog-content,
.dashboard-grid,
.admin-layout,
.panel {
  min-width: 0;
}

.category-tree,
.panel,
.request-form,
.catalog-tools {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.category-tree {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.category {
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.category.sub {
  padding-left: 28px;
  color: var(--muted);
}

.category.active,
.category:hover {
  background: #ebe3d4;
}

.catalog-tools,
.form-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}

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

.catalog-tools {
  padding: 14px;
  margin-bottom: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

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

.product-card {
  display: grid;
  grid-template-rows: 152px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}

.product-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.52), transparent 16%),
    linear-gradient(135deg, var(--art-a), var(--art-b));
}

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

.product-art.has-photo::before,
.product-art.has-photo::after {
  display: none;
}

.product-art::before,
.product-art::after {
  content: "";
  position: absolute;
  background: rgba(23, 27, 28, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.product-art::before {
  left: 20%;
  top: 47%;
  width: 54%;
  height: 16px;
  border-radius: 999px;
}

.product-art::after {
  left: 45%;
  top: 33%;
  width: 26%;
  height: 38px;
  border-radius: 8px;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-body h3 {
  margin: 0;
  font-size: 1.05rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.product-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.product-footer button {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--field);
  cursor: pointer;
}

.product-footer .secondary-card-action {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 27, 28, 0.62);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  width: min(980px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 1.4rem;
}

.modal-art {
  min-height: 420px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.52), transparent 16%),
    linear-gradient(135deg, var(--art-a), var(--art-b));
}

.modal-art img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.modal-body {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(24px, 5vw, 46px);
}

.modal-body h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.modal-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.cart-open {
  overflow: hidden;
}

.cart-added-open {
  overflow: hidden;
}

.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
  background: rgba(23, 27, 28, 0.68);
}

.cart-added-modal {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 27, 28, 0.48);
}

.cart-added-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.cart-added-dialog h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
}

.cart-added-dialog p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cart-added-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.cart-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(860px, 94vh);
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}

.cart-dialog-header {
  padding: clamp(22px, 4vw, 38px);
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(200, 141, 58, 0.18), transparent 44%),
    var(--field);
}

.cart-dialog-header h2 {
  margin: 4px 0 10px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

.cart-dialog-header p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 250, 240, 0.78);
  line-height: 1.6;
}

.cart-dialog-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
  gap: 18px;
  padding: clamp(18px, 4vw, 32px);
}

.cart-review,
.checkout-account-choice,
.checkout-form {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.cart-review h3,
.checkout-account-choice h3,
.checkout-form h3 {
  margin: 0;
}

.checkout-account-choice p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f3ede2;
}

.cart-item-media {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--olive), var(--steel));
}

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

.cart-item-main {
  display: grid;
  gap: 3px;
}

.cart-item-main small {
  color: var(--muted);
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cart-qty button,
.cart-remove {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.cart-remove {
  grid-column: 2 / -1;
  width: fit-content;
  color: var(--rust);
  font-weight: 800;
}

.cart-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.cart-totals {
  gap: 8px;
}

.cart-totals div {
  background: #f3ede2;
}

.cart-totals div:last-child {
  color: #fff;
  background: var(--field);
}

.checkout-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkout-form legend {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
}

.choice-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.choice-card input {
  width: 18px;
  min-height: 18px;
}

.choice-card span {
  display: grid;
  gap: 2px;
}

.choice-card small {
  color: var(--muted);
}

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

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

.checkout-form .check-row a {
  color: var(--rust);
  text-decoration: underline;
}

.product-page {
  min-height: 70vh;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 64px);
}

.product-gallery,
.product-detail-info {
  min-width: 0;
}

.product-hero-image {
  min-height: clamp(320px, 48vw, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.52), transparent 16%),
    linear-gradient(135deg, var(--art-a), var(--art-b));
}

.product-hero-image img {
  width: 100%;
  height: 100%;
  min-height: clamp(320px, 48vw, 620px);
  object-fit: cover;
  display: block;
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.carousel-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.product-thumbs button {
  overflow: hidden;
  aspect-ratio: 1.2;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}

.product-thumbs button.active {
  border-color: var(--amber);
}

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

.product-detail-info {
  display: grid;
  gap: 18px;
  padding-top: 10px;
}

.product-detail-info h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.95;
}

.product-detail-description {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
}

.product-detail-meta strong {
  font-size: 1.5rem;
}

.back-link {
  width: fit-content;
  color: var(--muted);
  font-weight: 800;
}

.product-extra {
  padding-top: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill.ok {
  background: var(--ok);
}

.pill.warn {
  background: var(--warn);
}

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

.auth-card,
.request-form,
.contact-form {
  display: grid;
  align-content: start;
  gap: 16px;
}

.request-band {
  display: flex;
  justify-content: center;
  background: #d9ded2;
}

.request-form {
  width: min(760px, 100%);
  grid-template-columns: 1fr;
  padding: clamp(22px, 4vw, 34px);
}

.request-form .wide {
  grid-column: auto;
}

.request-form button,
.auth-card button,
.contact-form button,
#categoryForm button,
#productForm button {
  width: fit-content;
}

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

.secondary-panel-action {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.dashboard-grid,
.admin-layout,
.contact-page,
.home-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-grid .panel,
.blog-grid .panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.home-grid .panel {
  display: flex;
  flex-direction: column;
}

.home-grid .panel .primary-action {
  align-self: flex-start;
  margin-top: auto;
}

.blog-admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 0;
}

.blog-admin-bar span {
  color: var(--muted);
  font-weight: 700;
}

.blog-editor {
  padding-top: 24px;
  padding-bottom: 0;
}

.blog-card {
  cursor: pointer;
}

.blog-card time,
.post-detail time {
  color: var(--muted);
  font-weight: 800;
}

.blog-card-media {
  min-height: 160px;
  margin: -18px -18px 4px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(135deg, var(--olive), var(--steel));
}

.blog-card-media img,
.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-page {
  min-height: 70vh;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
  padding: clamp(34px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.post-detail {
  display: grid;
  gap: 18px;
  max-width: 980px;
  min-width: 0;
}

.post-detail h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: 0.95;
}

.post-hero-image {
  min-height: clamp(260px, 44vw, 520px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(135deg, var(--olive), var(--steel));
}

.post-content {
  display: grid;
  gap: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-content p {
  margin: 0;
}

.post-tags-panel {
  position: sticky;
  top: 104px;
  min-width: 0;
}

.post-tags-panel h2 {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: baseline;
}

.post-tags-list a {
  color: #77a935;
  font-size: clamp(1rem, 2vw, 1.7rem);
  line-height: 1.05;
}

.post-tags-list a:nth-child(3n + 1) {
  font-size: clamp(1.35rem, 3vw, 2.35rem);
}

.post-tags-list a:nth-child(4n + 2) {
  font-size: clamp(1.12rem, 2.4vw, 1.95rem);
}

.post-tags-list a:hover {
  color: var(--field);
}

.home-grid .panel p,
.blog-grid .panel p,
.faq-list p {
  color: var(--muted);
  line-height: 1.55;
}

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

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list .form-actions {
  margin-top: 14px;
}

.terms-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.terms-note {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.terms-note h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
}

.terms-note p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.terms-content {
  display: grid;
  gap: 14px;
}

.terms-section {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.terms-section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.terms-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.terms-section p + p {
  margin-top: 12px;
}

.terms-section ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  padding: 18px;
  overflow-x: auto;
}

.panel.large {
  grid-column: span 2;
}

.panel h3 {
  margin: 0 0 16px;
}

dl,
.status-list,
.stack-list,
.admin-products {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div,
.status-list span,
.stack-item,
.admin-product {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f3ede2;
}

.stack-item,
.admin-product {
  align-items: center;
}

.coupon-item {
  flex-wrap: wrap;
}

.coupon-item > span:first-child {
  flex: 1 1 220px;
}

.admin-product {
  display: grid;
  grid-template-columns: 64px minmax(180px, 1fr) auto auto auto;
}

.admin-product-media,
.admin-product-placeholder {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--olive), var(--steel));
}

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

.admin-product-main small {
  display: block;
  max-width: 560px;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-layout {
  grid-template-columns: 1fr 1fr;
}

.contact-page {
  grid-template-columns: 360px minmax(0, 1fr);
}

.contact-methods {
  display: grid;
  gap: 10px;
}

.contact-methods a,
.contact-methods span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.muted,
.form-message {
  color: var(--muted);
}

.form-message {
  margin: 0;
  min-height: 22px;
  font-weight: 700;
}

.is-hidden {
  display: none !important;
}

.site-footer {
  color: rgba(255, 250, 240, 0.82);
  background: #202722;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 0.7fr));
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(34px, 6vw, 64px) clamp(18px, 5vw, 64px);
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 16px;
  max-width: 440px;
}

.footer-brand .brand {
  min-width: 0;
  color: #fffaf0;
}

.footer-brand .brand-mark {
  background: var(--amber);
  color: var(--ink);
}

.footer-brand p {
  margin: 0;
  color: rgba(255, 250, 240, 0.68);
  line-height: 1.6;
}

.footer-links,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links h3,
.footer-contact h3 {
  margin: 0 0 6px;
  color: #fffaf0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  color: rgba(255, 250, 240, 0.72);
  line-height: 1.35;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--amber);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 5vw, 64px);
  border-top: 1px solid rgba(255, 250, 240, 0.14);
  color: rgba(255, 250, 240, 0.58);
  font-size: 0.88rem;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .hero,
  .catalog-layout,
  .contact-page,
  .product-detail,
  .post-layout,
  .cart-dialog-body,
  .terms-layout {
    grid-template-columns: 1fr;
  }

  .post-tags-panel,
  .terms-note {
    position: static;
  }

  .hero-media {
    min-height: 360px;
    order: -1;
  }

  .category-tree {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid,
  .dashboard-grid,
  .home-grid,
  .blog-grid,
  .catalog-tools,
  .auth-layout,
  .form-grid,
  .admin-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel.large {
    grid-column: 1 / -1;
  }

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

@media (max-width: 640px) {
  .topbar {
    gap: 8px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small,
  .cart-button span {
    display: none;
  }

  .topbar > .cart-button {
    min-width: 44px;
    padding: 9px 12px;
  }

  .main-nav {
    width: min(360px, calc(100vw - 16px));
    padding: 16px;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 3.1rem;
  }

  .category-tree,
  .product-grid,
  .dashboard-grid,
  .home-grid,
  .blog-grid,
  .catalog-tools,
  .auth-layout,
  .form-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-rows: 138px auto;
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .checkout-grid,
  .cart-promo {
    grid-template-columns: 1fr;
  }

  .cart-promo button {
    width: fit-content;
  }

  .age-gate {
    align-items: start;
    overflow-y: auto;
  }

  .age-gate-header {
    justify-content: flex-start;
  }

  .age-gate-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .age-gate-visual {
    min-height: 240px;
    order: -1;
  }

  .age-gate-actions {
    gap: 14px;
  }

  .age-gate-actions button {
    min-width: 104px;
    min-height: 64px;
  }

  .modal-art,
  .modal-art img {
    min-height: 260px;
  }

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

  .admin-product {
    grid-template-columns: 52px 1fr;
    align-items: start;
  }

  .cart-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .cart-item > strong,
  .cart-item .cart-qty,
  .cart-remove {
    grid-column: 2;
  }

  .admin-product > span:not(.admin-product-media),
  .admin-product > button {
    grid-column: 2;
  }

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

  .footer-bottom {
    display: grid;
  }
}

