/* =====================================================================
 *  SK-Phone Shop · Frontend Styles
 *  Design system: Hanken Grotesk + JetBrains Mono · Sky-blue accent
 * ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
 *  Design tokens
 * ============================================================ */
:root {
  --bg:               #fafbfc;
  --surface:          #ffffff;
  --surface-2:        #f7f8fa;
  --surface-hover:    #f1f3f7;

  --border:           #e5e9ef;
  --border-soft:      #eef1f5;
  --border-strong:    #cbd5e1;

  --text:             #0b1220;
  --text-secondary:   #475569;
  --text-muted:       #64748b;
  --text-faint:       #94a3b8;

  --accent:           #0ea5e9;
  --accent-strong:    #0284c7;
  --accent-deep:      #075985;
  --accent-soft:      #bae6fd;
  --accent-tint:      #f0f9ff;

  --success:          #16a34a;
  --success-bg:       #dcfce7;
  --warning:          #d97706;
  --warning-bg:       #fef3c7;
  --danger:           #dc2626;
  --danger-bg:        #fee2e2;
  --info-bg:          #e0f2fe;

  --radius-sm:        6px;
  --radius:           10px;
  --radius-lg:        16px;
  --radius-xl:        24px;
  --radius-pill:      999px;

  --shadow-xs:        0 1px 2px rgba(11, 18, 32, 0.05);
  --shadow-sm:        0 1px 3px rgba(11, 18, 32, 0.06), 0 1px 2px rgba(11, 18, 32, 0.04);
  --shadow-md:        0 4px 12px rgba(11, 18, 32, 0.06), 0 2px 4px rgba(11, 18, 32, 0.04);
  --shadow-lg:        0 12px 32px rgba(11, 18, 32, 0.08), 0 4px 8px rgba(11, 18, 32, 0.04);
  --shadow-xl:        0 24px 48px rgba(11, 18, 32, 0.10), 0 8px 16px rgba(11, 18, 32, 0.06);
  --shadow-focus:     0 0 0 4px rgba(14, 165, 233, 0.20);

  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px;  --s-7: 48px;  --s-8: 64px; --s-9: 96px;

  --font-body:    'Hanken Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', SFMono-Regular, Consolas, monospace;

  --container-max: 1280px;
  --container-pad: 24px;

  --t-fast:  120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:  200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:  400ms cubic-bezier(0.4, 0, 0.2, 1);

  --header-h: 72px;
}

/* ============================================================
 *  Reset + base
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }
a { color: var(--accent-strong); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-deep); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ============================================================
 *  Header
 * ============================================================ */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.shop-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-5);
  align-items: center;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 800;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.30);
}

/* Prominent search */
.shop-search {
  position: relative;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
.shop-search > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}
.shop-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
  transition: all var(--t-base);
}
.shop-search input::placeholder { color: var(--text-faint); }
.shop-search input:focus,
.shop-search input:hover {
  background: var(--surface);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-focus), var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--t-fast);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}
.icon-btn .badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid #fff;
}
.mobile-menu-btn {
  display: none;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; color: var(--text);
  border-radius: var(--radius);
}
.mobile-menu-btn:hover { background: var(--surface-hover); }
.mobile-menu-btn svg { width: 22px; height: 22px; }

/* Category nav row */
.shop-categories {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.shop-categories::-webkit-scrollbar { display: none; }
.shop-categories-inner {
  display: flex;
  gap: 4px;
  padding: 4px 0;
  white-space: nowrap;
}
.shop-categories a {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: all var(--t-fast);
}
.shop-categories a:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.shop-categories a.active {
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-weight: 600;
}

/* ============================================================
 *  Live search dropdown
 * ============================================================ */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 480px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}
.search-dropdown.open { display: block; }
.search-dropdown-section {
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
}
.search-dropdown-section:first-child { border-top: none; }
.search-dropdown-heading {
  padding: 6px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background var(--t-fast);
  cursor: pointer;
}
.search-result:hover,
.search-result.highlighted {
  background: var(--surface-hover);
  color: var(--text);
}
.search-result-thumb {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid var(--border-soft);
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-result-thumb .placeholder { color: var(--text-faint); font-size: 18px; }
.search-result-info { flex: 1; min-width: 0; }
.search-result-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-title mark {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}
.search-result-meta {
  display: flex; gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.search-result-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  flex: 0 0 auto;
}
.search-dropdown-empty,
.search-dropdown-loading {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.search-dropdown-footer {
  padding: 8px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  text-align: center;
}
.search-dropdown-footer a {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
}

/* ============================================================
 *  Buttons
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--t-fast);
  user-select: none;
}
.btn-lg { height: 48px; padding: 0 24px; font-size: 15.5px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(14, 165, 233, 0.20);
}
.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.30);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--text-faint);
  border-color: var(--text-faint);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

/* ============================================================
 *  Forms (frontend)
 * ============================================================ */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: all var(--t-fast);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.form-row .help {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================================
 *  Hero (homepage)
 * ============================================================ */
.hero {
  position: relative;
  padding: var(--s-9) 0;
  background: radial-gradient(ellipse at top, var(--accent-tint) 0%, var(--bg) 70%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 760px;
  text-align: center;
  margin: 0 auto;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: var(--s-5);
  box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.20);
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: var(--s-4);
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--s-6);
}
.hero-cta {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
 *  Section pattern
 * ============================================================ */
.shop-section { padding: var(--s-8) 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--s-6);
  gap: var(--s-4);
  flex-wrap: wrap;
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  margin: 0;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent-strong);
}
.section-link svg { width: 16px; height: 16px; }

/* ============================================================
 *  Product cards
 * ============================================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-5);
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--t-base);
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  color: var(--text);
}
.product-card-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-card-image img {
  transform: scale(1.04);
}
.product-card-image .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--text-faint);
  font-size: 48px;
}
.product-card-body {
  padding: var(--s-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.product-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--s-2);
}
.product-card-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.product-card-stock {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-card-stock .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.product-card-stock.low .dot  { background: var(--warning); }
.product-card-stock.out .dot  { background: var(--text-faint); }

.cond-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.cond-badge.cond-new    { background: var(--success); color: #fff; }
.cond-badge.cond-refurb { background: var(--accent); color: #fff; }
.cond-badge.cond-bstock { background: var(--warning); color: #fff; }
.cond-badge.cond-used   { background: var(--surface); color: var(--text); }
.cond-badge.cond-defect { background: var(--danger); color: #fff; }

/* ============================================================
 *  Trust band
 * ============================================================ */
.trust-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--s-7) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-5);
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.trust-item svg {
  width: 28px; height: 28px;
  color: var(--accent);
}
.trust-item strong {
  font-size: 15.5px;
  font-weight: 700;
}
.trust-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
 *  Footer
 * ============================================================ */
.shop-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: var(--s-8) 0 var(--s-5);
  margin-top: var(--s-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: var(--s-3);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--accent-strong); }
.footer-trust { color: var(--text-muted); font-size: 13px; }
.footer-bottom {
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--s-3);
}
.footer-brand .brand-mark { width: 32px; height: 32px; font-size: 13px; }
.footer-brand-name { font-weight: 700; font-size: 16px; color: var(--text); }

/* ============================================================
 *  Product detail page
 * ============================================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-7);
  padding-top: var(--s-5);
}
.product-gallery {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}
.product-gallery-main {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
}
.product-gallery-main img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform var(--t-base);
}
.product-gallery-main .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--text-faint);
  font-size: 80px;
}
.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: var(--s-3);
}
.product-gallery-thumb {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: all var(--t-fast);
}
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumb:hover { border-color: var(--border-strong); }
.product-gallery-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.product-info { padding-top: 4px; }
.product-breadcrumb {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
  flex-wrap: wrap;
}
.product-breadcrumb a { color: var(--text-muted); }
.product-breadcrumb a:hover { color: var(--text); }
.product-breadcrumb .sep { color: var(--text-faint); }

.product-title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.product-sku {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}
.prod-condition {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--s-5);
}
.prod-condition .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.prod-condition.cond-new .dot     { background: var(--success); }
.prod-condition.cond-refurb .dot  { background: var(--accent); }
.prod-condition.cond-used .dot    { background: var(--text-muted); }
.prod-condition.cond-bstock .dot  { background: var(--warning); }
.prod-condition.cond-defect .dot  { background: var(--danger); }

.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.product-price-amount {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.product-price-vat {
  font-size: 13px;
  color: var(--text-muted);
}

.prod-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--s-5);
}
.prod-stock-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--success);
}
.prod-stock-dot.low { background: var(--warning); }
.prod-stock-dot.out { background: var(--danger); }
.prod-stock.low { color: var(--warning); }
.prod-stock.out { color: var(--danger); }

.product-short-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--border-soft);
}

.product-buy {
  display: flex;
  gap: var(--s-3);
  align-items: stretch;
  margin-bottom: var(--s-5);
}
.qty-stepper {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 48px;
}
.qty-stepper button {
  width: 44px; height: 100%;
  background: none; border: none;
  cursor: pointer;
  font-size: 18px; font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--t-fast);
}
.qty-stepper button:hover { background: var(--surface-hover); color: var(--text); }
.qty-stepper input {
  width: 50px; height: 100%;
  text-align: center;
  border: none; background: none;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

.product-attributes { margin-top: var(--s-5); }
.product-attributes h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.product-attrs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.product-attr-row { display: contents; }
.product-attr-row dt,
.product-attr-row dd {
  padding: 10px 14px;
  background: var(--surface);
  margin: 0;
  font-size: 13.5px;
}
.product-attr-row dt {
  color: var(--text-muted);
  font-weight: 500;
}
.product-attr-row dd {
  color: var(--text);
  font-weight: 500;
}

/* ============================================================
 *  Lightbox
 * ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(11, 18, 32, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: var(--radius);
  background: #fff;
}
.lightbox-img-wrap.zoomed { cursor: zoom-out; }
.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: transform var(--t-base);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img-wrap.zoomed .lightbox-img {
  transform: scale(2);
}
.lightbox-close {
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all var(--t-fast);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.20); }
.lightbox-close svg { width: 22px; height: 22px; }
.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all var(--t-fast);
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.20); }
.lightbox-nav.prev { left: var(--s-5); }
.lightbox-nav.next { right: var(--s-5); }
.lightbox-nav svg { width: 24px; height: 24px; }
.lightbox-counter {
  position: absolute;
  bottom: var(--s-4); left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius-pill);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}
@media (max-width: 600px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-nav.prev { left: var(--s-2); }
  .lightbox-nav.next { right: var(--s-2); }
}

/* ============================================================
 *  Cart / Checkout helpers
 * ============================================================ */
.cart-page { max-width: 960px; margin: 0 auto; padding: var(--s-6) var(--container-pad); }
.cart-empty {
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.cart-empty h2 { margin-bottom: 12px; }

/* ============================================================
 *  Badges, flash, misc
 * ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-hover);
  color: var(--text);
}
.badge.success { background: var(--success-bg); color: #14532d; }
.badge.warning { background: var(--warning-bg); color: #78350f; }
.badge.danger  { background: var(--danger-bg);  color: #7f1d1d; }
.badge.info    { background: var(--info-bg);    color: var(--accent-deep); }
.badge.muted   { background: var(--surface-hover); color: var(--text-muted); }

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: var(--s-3);
}
.flash.success { background: var(--success-bg); color: #14532d; }
.flash.error   { background: var(--danger-bg);  color: #7f1d1d; }
.flash.info    { background: var(--info-bg);    color: var(--accent-deep); }
.flash.warning { background: var(--warning-bg); color: #78350f; }

/* ============================================================
 *  Responsive
 * ============================================================ */
@media (max-width: 1024px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
}
@media (max-width: 768px) {
  :root { --header-h: 64px; --container-pad: 16px; }
  .shop-header-inner { gap: var(--s-3); }
  .shop-search input { font-size: 14px; }
  .mobile-menu-btn { display: grid; place-items: center; }
  .icon-btn span:not(.badge) { display: none; }
  .icon-btn { padding: 8px; width: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-5); }
  .hero { padding: var(--s-7) 0; }
  .shop-section { padding: var(--s-6) 0; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
  .product-card-name { font-size: 13px; min-height: 2.6em; }
  .product-card-price { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .product-attrs-grid { grid-template-columns: 1fr; }
  .product-attr-row { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ============================================================
 *  Legal blocks
 * ============================================================ */
.legal-block {
  border-top: 1px solid var(--border-soft);
  padding: 14px 0;
}
.legal-block:last-child { border-bottom: 1px solid var(--border-soft); }
.legal-block summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14.5px;
  color: var(--text);
  padding: 4px 0;
  user-select: none;
}
.legal-block summary::-webkit-details-marker { display: none; }
.legal-block summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 300;
  margin-left: 12px;
}
.legal-block[open] summary::after { content: '−'; }
.legal-block-body {
  padding: 10px 0 4px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* Manufacturer info grid */
.prod-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 20px 24px;
  background: var(--surface-hover);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}
@media (max-width: 600px) { .prod-info-grid { grid-template-columns: 1fr; gap: 24px; } }
.prod-info-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ============================================================
 *  Customer portal — kept from previous design
 * ============================================================ */
.portal { max-width: 920px; margin: 0 auto; padding: 32px 16px 64px; }
.portal-narrow { max-width: 480px; }
.portal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.portal-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.portal-header h1 .ordernr { font-family: var(--font-mono); font-size: 22px; color: var(--accent-deep); letter-spacing: 0; }
.portal-header .meta { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.portal-header .logout { font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 6px 12px; border-radius: var(--radius); border: 1px solid transparent; }
.portal-header .logout:hover { background: var(--surface-hover); border-color: var(--border); }
.portal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 16px; overflow: hidden; }
.portal-card.accent { border-color: var(--accent-soft); }
.portal-card.warn { border-color: #fed7aa; background: #fff7ed; }
.portal-card.danger { border-color: #fecaca; background: #fef2f2; }
.portal-card-body { padding: 22px 24px; }
.portal-card-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin: 0 0 14px; }
.portal-tracker { display: flex; gap: 0; position: relative; padding: 8px 0 4px; }
.portal-tracker-step { flex: 1; text-align: center; position: relative; min-width: 0; }
.portal-tracker-step .icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border-strong);
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-faint);
  position: relative; z-index: 2;
  transition: all 0.2s;
}
.portal-tracker-step.complete .icon { background: var(--success); border-color: var(--success); color: #fff; }
.portal-tracker-step.current .icon { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 6px var(--accent-soft); }
.portal-tracker-step.cancelled .icon { background: var(--danger); border-color: var(--danger); color: #fff; }
.portal-tracker-step .label { font-size: 12.5px; font-weight: 600; color: var(--text); margin: 0; }
.portal-tracker-step.upcoming .label { color: var(--text-faint); font-weight: 500; }
.portal-tracker-step .when { font-size: 11px; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.portal-tracker-step::after {
  content: ''; position: absolute;
  height: 2px; background: var(--border);
  top: 28px; left: calc(50% + 24px); right: calc(-50% + 24px);
  z-index: 1;
}
.portal-tracker-step.complete::after { background: var(--success); }
.portal-tracker-step:last-child::after { display: none; }
@media (max-width: 600px) {
  .portal-tracker-step .label { font-size: 11px; }
  .portal-tracker-step .when { display: none; }
  .portal-tracker-step .icon { width: 32px; height: 32px; font-size: 13px; }
  .portal-tracker-step::after { top: 22px; left: calc(50% + 18px); right: calc(-50% + 18px); }
}
.portal-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 24px; border-top: 1px solid var(--border-soft); background: var(--surface-hover); }
.portal-actions .btn { flex: 0 0 auto; }
.portal-actions .btn-block { flex: 1; min-width: 200px; }
.portal-items { padding: 8px 0; }
.portal-item {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 16px; align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
}
.portal-item:last-child { border-bottom: none; }
.portal-item .thumb { width: 56px; height: 56px; border-radius: var(--radius); background: var(--surface-hover); overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-soft); }
.portal-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.portal-item .name { font-weight: 600; font-size: 14.5px; color: var(--text); margin: 0; }
.portal-item .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
.portal-item .qty { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; }
.portal-item .price { font-weight: 600; font-family: var(--font-mono); font-size: 14.5px; }
.portal-totals { padding: 16px 24px; background: var(--surface-hover); border-top: 1px solid var(--border-soft); }
.portal-totals .row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; font-family: var(--font-mono); }
.portal-totals .row .label { font-family: var(--font-body); color: var(--text-muted); }
.portal-totals .row.total { font-weight: 700; font-size: 16px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); }
.portal-totals .row.total .label { color: var(--text); font-weight: 700; }
.portal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .portal-grid-2 { grid-template-columns: 1fr; } }
.portal-addr { font-size: 14px; line-height: 1.55; color: var(--text); }
.portal-thread-list { padding: 0; }
.portal-thread { display: block; padding: 18px 24px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--border-soft); transition: background 0.15s; }
.portal-thread:last-child { border-bottom: none; }
.portal-thread:hover { background: var(--surface-hover); }
.portal-thread .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.portal-thread .subject { font-weight: 600; font-size: 14.5px; color: var(--text); }
.portal-thread .when { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.portal-thread .preview { font-size: 13px; color: var(--text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.portal-thread .badges { display: flex; gap: 6px; margin-top: 6px; }
.portal-chat-meta { padding: 16px 24px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.portal-chat-stream { padding: 20px 24px; background: var(--bg); display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; }
.portal-msg { max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.portal-msg.customer { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.portal-msg.admin { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.portal-msg.system { align-self: center; background: transparent; color: var(--text-muted); font-size: 12px; font-style: italic; padding: 4px 8px; max-width: 90%; text-align: center; }
.portal-msg .when { display: block; font-size: 10.5px; opacity: 0.7; margin-top: 4px; font-family: var(--font-mono); }
.portal-msg.customer .who { color: rgba(255,255,255,0.85); }
.portal-msg .who { display: block; font-size: 11px; font-weight: 600; margin-bottom: 3px; color: var(--text-muted); }
.portal-reply { padding: 16px 24px; border-top: 1px solid var(--border-soft); background: var(--surface); }
.portal-reply textarea { width: 100%; min-height: 80px; padding: 10px 12px; font-size: 14px; border: 1px solid var(--border); border-radius: var(--radius); resize: vertical; font-family: inherit; line-height: 1.5; }
.portal-reply textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
.portal-reply .actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.portal-empty { padding: 28px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }
.badge-status { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-status.open             { background: var(--info-bg);    color: var(--accent-deep); }
.badge-status.customer_waiting { background: var(--warning-bg); color: #78350f; }
.badge-status.admin_waiting    { background: var(--accent-soft); color: var(--accent-deep); }
.badge-status.resolved         { background: var(--success-bg); color: #14532d; }
.badge-status.closed           { background: #f1f5f9; color: var(--text-muted); }
.portal-code-input {
  font-size: 28px !important;
  letter-spacing: 0.2em !important;
  text-align: center !important;
  padding: 16px 14px !important;
  font-weight: 700 !important;
  font-family: var(--font-mono) !important;
}

/* ============================================================
 *  Legacy compatibility — maps old class names from un-redesigned
 *  templates onto the new token system so they look consistent
 *  without rewriting every PHP file.
 * ============================================================ */

/* Old breadcrumb styles -> reuse product-breadcrumb */
.breadcrumbs {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin: var(--s-5) 0 var(--s-3);
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--text-faint); }
.breadcrumbs span { color: var(--text); }

/* Old grid: prod-grid -> identical to product-grid */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-5);
}
.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--t-base);
}
.prod-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  color: var(--text);
}
.prod-card-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.prod-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.prod-card:hover .prod-card-img img { transform: scale(1.04); }
.prod-card-img > svg { color: var(--text-faint); }
.prod-card-body {
  padding: var(--s-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prod-card-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.prod-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card-foot {
  margin-top: auto;
  padding-top: var(--s-2);
}

/* Old condition badge (card-badge variant) */
.cond {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.cond.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 1;
}
.cond.cond-new    { background: var(--success); color: #fff; }
.cond.cond-refurb { background: var(--accent); color: #fff; }
.cond.cond-bstock { background: var(--warning); color: #fff; }
.cond.cond-used   { background: var(--surface); color: var(--text); }
.cond.cond-defect,
.cond.cond-defect-parts { background: var(--danger); color: #fff; }

/* Old card-image fallback (price label inside card) */
.prod-card-foot .price-lg {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.prod-card-foot .price-card { font-size: 16px; font-family: var(--font-mono); font-weight: 700; }
.prod-card-foot .price-vat { font-size: 11.5px; color: var(--text-muted); }

/* Toolbar (sort + filter on category page) */
.cat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
}
.cat-toolbar label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.cat-toolbar select {
  font-family: inherit;
  font-size: 13.5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.cat-toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: var(--s-6) 0 var(--s-3);
}
.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 38px; height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.pagination a:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pagination .ellipsis {
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 400;
}

/* Empty state */
.empty {
  padding: var(--s-8) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.empty h3 { margin-bottom: 8px; font-size: 20px; }
.empty p { color: var(--text-muted); margin: 0; }

/* Old product detail layout (prod-layout, prod-info, gallery-main, etc.)
   These are kept for any legacy template paths — they look broadly the same
   as the new product-detail styles. */
.prod-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s-7);
  padding-top: var(--s-3);
}
@media (max-width: 1024px) { .prod-layout { grid-template-columns: 1fr; } }

.gallery-main {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid; place-items: center;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: var(--s-3);
}
.gallery-thumbs button {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0; cursor: pointer;
  transition: all var(--t-fast);
}
.gallery-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs button:hover { border-color: var(--border-strong); }
.gallery-thumbs button.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.prod-info h1 {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 8px 0 var(--s-3);
}
.prod-sub {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.prod-sub a { color: var(--text-secondary); }
.prod-price-block { margin: var(--s-4) 0; }
.prod-price-block .price-lg {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: inline-block;
  margin-right: 12px;
}
.prod-price-block .price-vat { font-size: 13px; color: var(--text-muted); }

.notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: var(--s-3);
  font-size: 13.5px;
  line-height: 1.55;
}
.notice strong { display: block; margin-bottom: 4px; font-size: 14px; }
.notice-info { background: var(--info-bg); color: var(--accent-deep); }
.notice-warn { background: var(--warning-bg); color: #78350f; }
.notice-danger { background: var(--danger-bg); color: #7f1d1d; }

.add-to-cart {
  display: flex;
  gap: var(--s-3);
  align-items: stretch;
  margin: var(--s-5) 0;
}
.add-to-cart .qty {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 48px;
}
.add-to-cart .qty button {
  width: 44px; height: 100%;
  background: none; border: none;
  cursor: pointer; font-size: 18px; font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--t-fast);
}
.add-to-cart .qty button:hover { background: var(--surface-hover); color: var(--text); }
.add-to-cart .qty input {
  width: 50px; height: 100%;
  text-align: center;
  border: none; background: none;
  font-size: 16px; font-weight: 600;
  font-family: inherit;
  -moz-appearance: textfield;
}
.add-to-cart .qty input::-webkit-outer-spin-button,
.add-to-cart .qty input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

/* Spec table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.spec-table th,
.spec-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-soft);
}
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: none; }
.spec-table th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
  width: 40%;
}
.spec-table td { color: var(--text); font-weight: 500; }

.compat-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.compat-list span {
  padding: 3px 10px;
  background: var(--surface-hover);
  color: var(--text);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
 *  Cart / Checkout (legacy template support)
 * ============================================================ */
.cart-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--s-6) var(--container-pad);
}
.cart-wrap h1 {
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
}
.cart-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--s-5);
  border-collapse: collapse;
}
.cart-table th,
.cart-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: middle;
}
.cart-table tr:last-child td { border-bottom: none; }
.cart-table th {
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.cart-table .cart-item-thumb {
  width: 60px; height: 60px;
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; place-items: center;
  border: 1px solid var(--border-soft);
}
.cart-table .cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-table .cart-item-name {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.cart-table .cart-item-name:hover { color: var(--accent-strong); }
.cart-table .cart-item-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cart-table .cart-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.cart-totals {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}
.cart-totals .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14.5px;
}
.cart-totals .row.total {
  font-weight: 700;
  font-size: 17px;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}
.cart-totals .row .label { color: var(--text-muted); }
.cart-totals .row.total .label { color: var(--text); font-weight: 700; }
.cart-totals .row .val {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 600;
}

/* Checkout 2-col */
.checkout-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-6) var(--container-pad);
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-6);
}
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
}
.checkout-card h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: var(--s-4);
}
.checkout-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
@media (max-width: 480px) { .checkout-grid-2 { grid-template-columns: 1fr; } }

/* CMS page (page.php) */
.cms-page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s-6) var(--container-pad) var(--s-8);
}
.cms-page h1 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-5);
}
.cms-content {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
}
.cms-content h2 {
  font-size: 22px;
  margin: var(--s-6) 0 var(--s-3);
  letter-spacing: -0.01em;
}
.cms-content h3 {
  font-size: 18px;
  margin: var(--s-5) 0 var(--s-2);
}
.cms-content p { margin: 0 0 var(--s-4); }
.cms-content ul, .cms-content ol {
  margin: 0 0 var(--s-4);
  padding-left: 24px;
}
.cms-content li { margin-bottom: 6px; }
.cms-content a {
  color: var(--accent-strong);
  text-decoration: underline;
}
.cms-content strong { font-weight: 700; }

/* Order confirmation */
.order-confirm {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-7) var(--container-pad);
}
.order-confirm-success {
  text-align: center;
  padding: var(--s-5);
  margin-bottom: var(--s-5);
}
.order-confirm-success .icon {
  width: 72px; height: 72px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  margin: 0 auto var(--s-4);
  display: grid; place-items: center;
}
.order-confirm-success .icon svg { width: 36px; height: 36px; }
.order-confirm-success h1 {
  font-size: clamp(28px, 3.5vw, 38px);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}
.order-confirm-success .ordernr {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent-deep);
  margin-bottom: var(--s-3);
}
.order-confirm-success p {
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 540px;
  line-height: 1.6;
}

/* Search results */
.search-results-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--s-6) var(--container-pad);
}
.search-results-header {
  margin-bottom: var(--s-5);
}
.search-results-header h1 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.search-results-header .meta {
  color: var(--text-muted);
  font-size: 14px;
}
.search-results-header form {
  margin-top: var(--s-4);
  display: flex; gap: 8px;
  max-width: 600px;
}
.search-results-header input[type="search"] {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
}
.search-results-header input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}