/* =========================================================================
   Keyline store — design tokens
   ========================================================================= */
:root {
  --ink:        #16191c;
  --ink-soft:   #4b5359;
  --ink-mute:   #767f86;
  --line:       #e3e6e8;
  --line-soft:  #eef0f1;
  --bg:         #ffffff;
  --bg-soft:    #f7f8f9;
  --brand:      #ffc907;
  --brand-dark: #eeb800;
  --blue:       #1b4dff;
  --blue-dark:  #1740d6;
  --green:      #0f8a4c;
  --red:        #cf2f2f;
  --dark:       #0b1417;
  --dark-soft:  #9fb0b4;

  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 1px 2px rgba(16, 24, 32, .06);
  --shadow-md:  0 4px 16px rgba(16, 24, 32, .08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.muted { color: var(--ink-mute); }
.small { font-size: 14px; }
.tiny  { font-size: 13px; }
.center { text-align: center; }
.strike { text-decoration: line-through; color: var(--ink-mute); font-weight: 400; }
.nowrap { white-space: nowrap; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--ink); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: #f2f5ff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-quiet { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--bg-soft); }
.btn-danger { background: #fff; color: var(--red); border-color: #f0cccc; }
.btn-danger:hover { background: #fdf3f3; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; pointer-events: none;
}

/* =========================================================================
   Forms
   ========================================================================= */
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field-hint { font-size: 13px; color: var(--ink-mute); margin-top: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 25, 28, .08);
}
input::placeholder, textarea::placeholder { color: #9aa2a8; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%2316191c' stroke-width='2' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; }
.checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* =========================================================================
   Notices
   ========================================================================= */
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 18px;
  background: var(--bg-soft);
}
.notice-success { background: #f1faf4; border-color: #cbe8d7; color: #14603c; }
.notice-error   { background: #fdf3f3; border-color: #f0cccc; color: #8f2020; }
.notice-info    { background: #fefbe8; border-color: #f2e6a8; color: #6b5a12; }
.notice strong { font-weight: 700; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 72px;
}
.logo {
  display: flex; flex-direction: column; justify-content: center;
  color: var(--ink); text-decoration: none; flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-mark {
  font-size: 22px; font-weight: 800; letter-spacing: -.04em; text-transform: uppercase;
  line-height: 1;
}
.logo-sub { font-size: 11px; color: var(--blue); letter-spacing: .01em; margin-top: 3px; }
.logo img { max-height: 38px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.main-nav a {
  color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none;
}
.main-nav a:hover { color: var(--blue); text-decoration: none; }
.main-nav a[aria-current="page"] { font-weight: 700; }

.cart-link { position: relative; display: inline-flex; align-items: center; padding: 6px; }
.cart-badge {
  position: absolute; top: -2px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: #fff;
  border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.nav-toggle {
  display: none; margin-left: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; cursor: pointer;
}


/* =========================================================================
   Header: category dropdown + account
   ========================================================================= */
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.account-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: var(--radius);
  color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.account-link:hover { background: var(--bg-soft); text-decoration: none; }
.account-link-label { white-space: nowrap; }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink);
  background: none; border: 0; padding: 6px 0; cursor: pointer;
}
.nav-dropdown-toggle:hover { color: var(--blue); }
.nav-dropdown-toggle svg { transition: transform .15s ease; }
.nav-dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-dropdown-toggle[aria-current="page"] { font-weight: 700; }

.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: -14px; z-index: 50;
  min-width: 240px; margin: 0; padding: 8px;
  list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.nav-dropdown-menu[hidden] { display: none; }
.nav-dropdown-menu a {
  display: block; padding: 9px 12px; border-radius: 6px;
  font-size: 14.5px; font-weight: 500; color: var(--ink); text-decoration: none;
}
.nav-dropdown-menu a:hover { background: var(--bg-soft); color: var(--blue); text-decoration: none; }
.nav-dropdown-menu a[aria-current="page"] { font-weight: 700; background: var(--bg-soft); }
.nav-dropdown-all { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.nav-dropdown-all a { color: var(--blue); }

.nav-account-mobile { display: none; }

/* Category page header */
.category-head { padding: 34px 0 6px; }
.category-head h1 { margin-bottom: 6px; }
.category-count { color: var(--ink-mute); font-size: 15px; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 6px; }
.category-chip {
  display: inline-block; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.category-chip:hover { border-color: var(--ink); text-decoration: none; }
.category-chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* =========================================================================
   Account area
   ========================================================================= */
.account-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding: 34px 0 70px; align-items: start; }
.account-nav { list-style: none; margin: 0; padding: 0; position: sticky; top: 92px; }
.account-nav li { margin-bottom: 2px; }
.account-nav a {
  display: block; padding: 10px 14px; border-radius: var(--radius);
  color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none;
}
.account-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.account-nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.account-nav-sep { margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

.order-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; margin-bottom: 16px; }
.order-card-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: var(--bg-soft);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.order-card-body { padding: 18px 20px; }
.order-meta { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 14px; color: var(--ink-mute); }
.order-meta strong { color: var(--ink); font-weight: 600; }

.licence-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.licence-row:last-child { border-bottom: 0; }
.licence-key { font-family: var(--mono); font-size: 14.5px; letter-spacing: .02em; word-break: break-all; }

.auth-card .form-row { gap: 12px; }
.auth-alt { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--ink-mute); }

/* Checkout: guest vs account */
.checkout-signin {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft);
  font-size: 14.5px;
}
.account-option { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 6px; }
.account-option + .account-option { margin-top: 10px; }
.account-option-fields { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.account-option-fields[hidden] { display: none; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  background:
    radial-gradient(900px 320px at 18% 15%, #e9edff 0%, rgba(233,237,255,0) 70%),
    radial-gradient(760px 320px at 84% 25%, #f4eaff 0%, rgba(244,234,255,0) 70%),
    #fbfbfc;
  border-bottom: 1px solid var(--line-soft);
  padding: 64px 0 56px;
}
.hero-card {
  max-width: 600px; margin: 0 auto;
  background: #fff;
  border: 1px solid #d7e0f5;
  border-radius: var(--radius-lg);
  padding: 40px 44px 36px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hero-card h1 { font-size: 38px; line-height: 1.14; margin-bottom: 14px; }
.hero-card p { color: var(--ink-soft); font-size: 16px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.trust-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px;
  padding: 26px 0 0;
  font-size: 15px; font-weight: 600;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 9px; }
.trust-strip svg { flex-shrink: 0; }

/* =========================================================================
   Sections
   ========================================================================= */
.section { padding: 60px 0; }
.section-tight { padding: 44px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line-soft); }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--ink-mute); }
.section-head-left { text-align: left; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }

/* =========================================================================
   Product grid
   ========================================================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 28px;
}
.product-card {
  display: flex; gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.product-card:hover { border-color: #c8cdd1; box-shadow: var(--shadow-md); text-decoration: none; }
.product-thumb {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb span { font-weight: 800; font-size: 20px; color: var(--ink-soft); letter-spacing: -.03em; }
.product-card-body { min-width: 0; }
.product-card h3 { font-size: 17px; margin-bottom: 4px; }
.product-card p {
  font-size: 14px; color: var(--ink-soft); line-height: 1.45; margin-bottom: 12px;
}
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.price-note { font-size: 13px; color: var(--ink-mute); }

.badge {
  display: inline-block; padding: 3px 8px; border-radius: 5px;
  font-size: 12px; font-weight: 700; line-height: 1.5;
}
.badge-save { background: #fff0d9; color: #8a5a00; }
.badge-low  { background: #fdeeee; color: var(--red); }
.badge-out  { background: var(--bg-soft); color: var(--ink-mute); }
.badge-in   { background: #edf8f2; color: var(--green); }

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--ink-mute);
  background: var(--bg-soft);
}

/* =========================================================================
   Steps + FAQ
   ========================================================================= */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding-top: 18px; border-top: 2px solid var(--ink); }
.step-num { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--ink-mute); }
.step h3 { margin: 8px 0 6px; font-size: 17px; }
.step p { font-size: 14px; color: var(--ink-soft); }

.faq-list { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 18px 34px 18px 0; position: relative;
  font-weight: 600; font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 6px; top: 26px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 30px; }
.faq-item .faq-body { padding: 0 20px 20px 0; color: var(--ink-soft); font-size: 15px; }

/* =========================================================================
   Product page
   ========================================================================= */
.breadcrumb { font-size: 14px; color: var(--ink-mute); padding: 22px 0 0; }
.breadcrumb a { color: var(--ink-mute); }

.product-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px;
  padding: 30px 0 60px; align-items: start;
}
.product-media {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 30px;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { font-size: 56px; font-weight: 800; color: #c3cad0; letter-spacing: -.04em; }
.product-title { font-size: 30px; margin-bottom: 8px; }
.product-tagline { font-size: 17px; color: var(--ink-soft); margin-bottom: 24px; }

.prose { font-size: 15px; color: var(--ink-soft); line-height: 1.65; }
.prose h2 { font-size: 20px; color: var(--ink); margin: 34px 0 10px; }
.prose h3 { font-size: 17px; color: var(--ink); margin: 24px 0 8px; }
.prose ul { padding-left: 20px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }

.buy-box {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; background: #fff;
  position: sticky; top: 92px;
  box-shadow: var(--shadow);
}
.buy-box .price { font-size: 30px; }
.buy-box .price-row { margin-bottom: 4px; }
.buy-box .stock { margin: 12px 0 18px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.qty button {
  width: 38px; height: 42px; border: 0; background: #fff; cursor: pointer;
  font-size: 18px; color: var(--ink); line-height: 1;
}
.qty button:hover { background: var(--bg-soft); }
.qty input {
  width: 46px; height: 42px; text-align: center; border: 0; border-inline: 1px solid var(--line);
  border-radius: 0; padding: 0; font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-actions { display: grid; gap: 10px; }
.buy-box .delivery-note {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-soft);
}
.assurance-list { list-style: none; padding: 0; margin: 14px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.assurance-list li { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 9px; }
.assurance-list svg { flex-shrink: 0; margin-top: 2px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.spec-table th, .spec-table td {
  text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
.spec-table th { width: 190px; font-weight: 600; color: var(--ink-mute); }

/* =========================================================================
   Cart
   ========================================================================= */
.cart-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px;
  padding: 36px 0 70px; align-items: start;
}
.cart-line {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line-soft);
}
.cart-line:first-of-type { border-top: 1px solid var(--line-soft); }
.cart-thumb {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--ink-soft);
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line h3 { font-size: 16px; margin-bottom: 2px; }
.cart-line-price { font-weight: 700; white-space: nowrap; }
.cart-controls { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px;
  color: var(--ink-soft); cursor: pointer; text-decoration: underline;
  display: inline-flex; align-items: center; gap: 6px;
}
.link-btn:hover { color: var(--red); }

.summary {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; background: #fff; box-shadow: var(--shadow);
}
.summary-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 15px; padding: 7px 0;
}
.summary-total {
  display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px;
  font-size: 18px; font-weight: 700;
}
.discount-row { display: flex; gap: 8px; margin-bottom: 16px; }
.discount-row input { flex: 1; }
.summary-actions { display: grid; gap: 10px; margin-top: 18px; }

/* =========================================================================
   Checkout
   ========================================================================= */
.checkout-header { border-bottom: 1px solid var(--line-soft); padding: 22px 0; }
.checkout-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px;
  padding: 34px 0 80px; align-items: start;
}
.checkout-block { margin-bottom: 34px; }
.checkout-block h2 { font-size: 19px; margin-bottom: 14px; }
.checkout-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.checkout-summary { position: sticky; top: 24px; }
.summary-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; }
.summary-item-thumb {
  position: relative; width: 52px; height: 52px; border-radius: 8px;
  border: 1px solid var(--line-soft); background: var(--bg-soft); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--ink-soft); font-size: 15px;
}
.summary-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.summary-qty {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--ink-soft); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.summary-item h3 { font-size: 14.5px; margin: 0; }
.payment-preview {
  border: 1px dashed #c9cfd4; border-radius: var(--radius);
  background: var(--bg-soft); padding: 18px;
}
.payment-preview .card-mock {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink-mute); font-size: 15px; margin-bottom: 10px;
}
.preview-flag {
  display: inline-block; background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 4px; margin-bottom: 12px;
}
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; padding-top: 22px; }
.checkout-mobile-summary { display: none; }

/* =========================================================================
   Content pages
   ========================================================================= */
.page-head { padding: 46px 0 8px; }
.page-head h1 { margin-bottom: 8px; }
.page-body { padding-bottom: 70px; }
.page-body h2 { font-size: 20px; margin: 32px 0 10px; }
.page-body p, .page-body li { color: var(--ink-soft); font-size: 15.5px; }
.page-body ul { padding-left: 20px; }
.info-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; background: var(--bg-soft); margin-bottom: 22px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--dark); color: #fff; margin-top: auto; padding: 52px 0 40px; }
.footer-trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
  text-align: center; padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-trust h3 { font-size: 17px; margin: 12px 0 4px; }
.footer-trust p { font-size: 14px; color: var(--dark-soft); }
.footer-main {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px;
  padding-top: 40px;
}
.footer-brand .logo-mark { font-size: 24px; }
.footer-brand p { color: var(--dark-soft); font-size: 14px; margin-top: 14px; max-width: 280px; }
.footer-col h4 { font-size: 15px; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--dark-soft); font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-legal {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  color: var(--dark-soft); font-size: 13px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.page-shell { display: flex; flex-direction: column; min-height: 100vh; }
.page-shell main { flex: 1; }

/* =========================================================================
   Admin
   ========================================================================= */
.admin-body { background: var(--bg-soft); }
.admin-header {
  background: var(--dark); color: #fff; padding: 0;
  position: sticky; top: 0; z-index: 30;
}
.admin-header .wrap { display: flex; align-items: center; gap: 24px; height: 60px; max-width: 1280px; }
.admin-brand { color: #fff; font-weight: 800; letter-spacing: -.03em; font-size: 17px; text-decoration: none; }
.admin-brand span { display: block; font-size: 11px; font-weight: 500; color: var(--dark-soft); letter-spacing: 0; }
.admin-nav { display: flex; gap: 4px; margin-left: 12px; flex-wrap: wrap; }
.admin-nav a {
  color: var(--dark-soft); font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: 6px; text-decoration: none;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.admin-nav a[aria-current="page"] { color: var(--ink); background: var(--brand); font-weight: 700; }
.admin-header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--dark-soft); }
.admin-header-right a { color: #fff; }

.admin-main { padding: 30px 0 70px; }
.admin-main .wrap { max-width: 1280px; }
.admin-page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.admin-page-head h1 { font-size: 24px; margin-bottom: 2px; }
.admin-page-head p { color: var(--ink-mute); font-size: 14px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 20px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 17px; margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 24px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px;
}
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--ink-mute); margin-top: 4px; }
.stat-alert .stat-value { color: var(--red); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); background: var(--bg-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data .key-cell { font-family: var(--mono); font-size: 13.5px; letter-spacing: .02em; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pill-available { background: #edf8f2; color: var(--green); }
.pill-used      { background: #eef0f1; color: var(--ink-soft); }
.pill-disabled  { background: #fdeeee; color: var(--red); }
.pill-active    { background: #edf8f2; color: var(--green); }
.pill-draft     { background: #eef0f1; color: var(--ink-soft); }

.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px; background: var(--bg-soft);
}
.auth-card {
  width: 100%; max-width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .auth-sub { color: var(--ink-mute); font-size: 14px; margin-bottom: 24px; }

.admin-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.image-preview {
  width: 100%; aspect-ratio: 16/10; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute); font-size: 13px; margin-bottom: 10px;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar form { display: flex; gap: 8px; align-items: center; }
.toolbar input[type="search"] { min-width: 240px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .checkout-layout, .cart-layout, .product-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .buy-box, .checkout-summary { position: static; }
}

@media (max-width: 760px) {
  h1 { font-size: 28px; }
  .hero { padding: 40px 0 36px; }
  .hero-card { padding: 28px 22px 26px; }
  .hero-card h1 { font-size: 27px; }
  .section { padding: 44px 0; }

  .header-inner { height: 62px; gap: 12px; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-account-mobile { display: block; font-weight: 700; }
  .account-link-label { display: none; }
  .account-link { padding: 6px; }

  .nav-dropdown { border-bottom: 1px solid var(--line-soft); }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 0; font-size: 15px; }
  .nav-dropdown-menu {
    position: static; min-width: 0; margin: 0 0 10px; padding: 0 0 0 12px;
    border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none;
  }
  .nav-dropdown-menu a { padding: 10px 8px; }
  .nav-dropdown-all { border-top: 0; margin-top: 0; }

  .account-layout { grid-template-columns: 1fr; gap: 22px; }
  .account-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .account-nav li { margin: 0; }
  .account-nav a { border: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .header-inner .cart-link { order: 3; }

  .product-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .footer-trust { grid-template-columns: 1fr; gap: 26px; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-split { grid-template-columns: 1fr; }
  .admin-header .wrap { height: auto; flex-wrap: wrap; padding-block: 12px; gap: 10px; }
  .spec-table th { width: 130px; }

  .cart-line { grid-template-columns: 48px 1fr; }
  .cart-line-price { grid-column: 2; margin-top: 6px; }
  .cart-thumb { width: 48px; height: 48px; }

  .checkout-summary { order: -1; }
  .checkout-mobile-summary {
    display: block; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--bg-soft); margin-bottom: 20px;
  }
  .checkout-mobile-summary summary {
    cursor: pointer; padding: 14px 16px; font-weight: 600; font-size: 15px;
    display: flex; justify-content: space-between; gap: 10px; list-style: none;
  }
  .checkout-mobile-summary summary::-webkit-details-marker { display: none; }
  .checkout-mobile-summary .mobile-summary-body { padding: 0 16px 16px; }
  .checkout-summary-desktop { display: none; }
  table.data th, table.data td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
