:root {
  --brand: #154a8d;
  --brand-dark: #9a0b14;
  --brand-darker: #112b4c;
  --ink: #1a1a1a;
  --ink-muted: #6b6b6b;
  --line: #e4e4e4;
  --line-strong: #c8c8c8;
  --bg: #f5f5f5;
  --card: #ffffff;
  --accent-green: #2e7d32;
  --accent-amber: #b8860b;
  --accent-red: #b00020;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: #b00020;
  color: #fff;
  border-bottom: 4px solid var(--brand-darker);
}
.site-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  display: block;
  height: 40px;
  width: auto;
}

.header-search {
  flex: 1;
  display: flex;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  max-width: 720px;
}
.header-search input {
  flex: 1;
  border: 0;
  padding: 10px 14px;
  font: inherit;
  outline: none;
  color: var(--ink);
  font-size: 11px;
}
.header-search button {
  background: #fff;
  color: var(--ink-muted);
  border: 0;
  padding: 0 14px;
  cursor: pointer;
}
.header-search button:hover { color: var(--brand); }

/* Mobile header layout: logo + actions on row 1, search wraps to row 2.
   Placed AFTER the .header-search base rule above so it wins the cascade
   — otherwise the desktop `flex: 1` overrides our flex:0 0 100%. */
@media (max-width: 720px) {
  .site-header__inner { gap: 10px; padding: 10px 14px; }
  .brand__logo { height: 32px; }
  .header-search {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
  }
  .header-search input { padding: 8px 10px; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-action {
  position: relative;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
}
.header-action:hover { text-decoration: none; background: rgba(255, 255, 255, 0.08); }
.header-action__label { font-size: 0.85rem; font-weight: 600; }
.cart-btn { padding: 6px 8px; }
.cart-btn:hover { text-decoration: none; opacity: 0.95; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 4px;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.08); }
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .header-action__label { display: none; }
  .nav-open .mega-nav { display: block; }
}
.cart-btn__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #f5b400;
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- Mega navigation ---------- */
.mega-nav {
  background: #b00020;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mega-nav__bar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  list-style: none;
  gap: 4px;
}
.mega-nav__item {
  position: relative;
}
.mega-nav__top {
  display: block;
  padding: 12px 14px;
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.mega-nav__top:hover,
.mega-nav__item:hover .mega-nav__top {
  background: #fff;
  color: var(--ink) !important;
  text-decoration: none;
}
.mega-nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  padding: 20px 24px;
  min-width: 720px;
  max-width: min(1280px, 95vw);
  max-height: 70vh;
  overflow-y: auto;
  display: none;
}
.mega-nav__item:hover .mega-nav__panel,
.mega-nav__item:focus-within .mega-nav__panel {
  display: block;
}
.mega-nav__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 32px;
}
.mega-nav__col {
  min-width: 0;
}
.mega-nav__sub {
  display: block;
  font-weight: 700;
  color: var(--ink) !important;
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.mega-nav__sub:hover { color: var(--brand) !important; text-decoration: none; }
.mega-nav__col ul {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}
.mega-nav__col li {
  padding: 2px 0;
  font-size: 0.85rem;
}
.mega-nav__col li a { color: var(--ink); }
.mega-nav__col li a:hover { color: var(--brand); text-decoration: none; }
.mega-nav__more {
  font-size: 0.8rem;
  color: var(--brand) !important;
  text-decoration: underline;
}
.mega-nav__more:hover { text-decoration: none; }

@media (max-width: 900px) {
  .mega-nav { overflow-x: auto; }
  .mega-nav__bar { flex-wrap: nowrap; }
  .mega-nav__panel { display: none !important; }
}

@media (max-width: 720px) {
  .mega-nav { display: none; overflow-x: visible; }
  .nav-open .mega-nav { display: block; padding: 4px 0 10px; }
  .mega-nav__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .mega-nav__top {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
  }
}

/* ---------- Main ---------- */
.site-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
}
@media (max-width: 720px) {
  .site-main { padding: 14px 12px; }
}

/* ---------- Flash ---------- */
.flash {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  border-left: 4px solid;
  background: #fff;
}
.flash.notice { border-color: var(--accent-green); }
.flash.alert  { border-color: var(--accent-red); }

/* ---------- Breadcrumb / page header ---------- */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.page-head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}
.breadcrumb {
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--ink-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb__sep { margin: 0 6px; color: var(--line-strong); }

/* Collapsed long breadcrumb: hide middle segments + their separators until
   the user clicks the … button rendered by shared/_breadcrumb. */
.breadcrumb.is-collapsed .breadcrumb__hidden { display: none; }
.breadcrumb:not(.is-collapsed) .breadcrumb__more,
.breadcrumb:not(.is-collapsed) .breadcrumb__more-sep { display: none; }
.breadcrumb__more {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  height: 20px;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}
.breadcrumb__more:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ---------- Layout: sidebar + main column ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .with-sidebar { grid-template-columns: 1fr; }
}

.sidebar .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
}
.sidebar .panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}
.sidebar .panel ul { list-style: none; padding: 0; margin: 0; }
.sidebar .panel li { padding: 4px 0; font-size: 0.92rem; }
.sidebar .panel li a { color: var(--ink); }
.sidebar .panel li a:hover { color: var(--brand); text-decoration: none; }
.sidebar .panel .count { color: var(--ink-muted); font-size: 0.85rem; }

.sidebar .search-input {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}
.sidebar .search-input input {
  flex: 1; border: 0; padding: 8px 10px; font: inherit; outline: none;
}
.sidebar .search-input button {
  background: var(--bg); color: var(--ink-muted); border: 0; padding: 0 12px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  border: 0;
  padding: 10px 18px;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary {
  background: #fff;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong);
}
.btn.secondary:hover { background: var(--bg); }
.btn.link {
  background: transparent;
  color: var(--brand) !important;
  padding: 0;
  font-weight: 600;
  border-radius: 0;
}
.btn.link:hover { background: transparent; text-decoration: underline !important; }
.btn.danger { background: var(--accent-red); }
.btn.danger:hover { background: #8a0019; }

/* ---------- Product grid ---------- */
.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.product-card .thumb {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-strong);
  font-size: 2rem;
  margin-bottom: 4px;
  overflow: hidden;
  padding: 10px;
}
.product-card .thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-card .sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.product-card .desc {
  font-weight: 600;
  flex: 1;
  line-height: 1.3;
  color: var(--ink);
}
.product-card .price {
  font-weight: 700;
  font-size: 1.05rem;
}
.product-card .price .muted { font-weight: 400; }

/* ---------- Category grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.category-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}
.category-card__thumb {
  background: #fff;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 14px;
  margin-bottom: 10px;
  color: var(--line-strong);
}
.category-card__thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.category-card__brand {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 2px;
}
.category-card__name {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.category-card__more {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 600;
}
.category-card__count {
  color: var(--ink-muted);
  font-weight: 400;
  margin-left: 2px;
}
.category-card:hover .category-card__more { text-decoration: underline; }

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 28px 0;
  align-items: center;
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.pager a:hover { border-color: var(--ink); text-decoration: none; }
.pager .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Product detail ---------- */
.product-show {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 24px;
  font-size: 0.875rem;
}
.product-show .layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
}
@media (max-width: 800px) {
  .product-show .layout { grid-template-columns: 1fr; }
}
.product-show .thumb-lg {
  background: var(--bg);
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-strong);
  font-size: 5rem;
}

.product-show .product-meta { min-width: 0; }
.product-show h1 {
  margin: 2px 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}
.product-show .sku {
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}
.product-show .price-big {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 10px 0 2px;
}
.product-show .price-big__vat {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
}
.product-show .price-list {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.product-show .product-image {
  background: #fff;
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 32px;
}
@media (min-width: 801px) {
  .product-show .product-image { max-width: 430px; }
}
.product-show .product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-show .product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.product-show .product-thumb {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  cursor: pointer;
}
.product-show .product-thumb:hover { border-color: var(--ink-muted); }
.product-show .product-thumb.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.product-show .product-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-show .brand-badge {
  display: inline-block;
  padding: 3px 9px;
  margin: 2px 0 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}
.product-show .brand-badge strong { color: var(--ink); }
.product-show .product-meta__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.product-show .product-meta__title { min-width: 0; flex: 1; }
.product-show .brand-logo {
  max-height: 32px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.product-show .brand-logo--lg {
  max-height: 80px;
  max-width: 180px;
  flex-shrink: 0;
}

/* Compact attribute & spec tables */
.product-show .product-attrs,
.product-show .product-specs {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.product-show .product-attrs h2,
.product-show .product-specs h2 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 10px;
}
.product-show .product-attrs table,
.product-show .product-specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.product-show .product-attrs th,
.product-show .product-attrs td,
.product-show .product-specs th,
.product-show .product-specs td {
  padding: 6px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
}
.product-show .product-attrs th,
.product-show .product-specs th {
  width: 38%;
  max-width: 240px;
  font-weight: 500;
  color: var(--ink-muted);
  background: var(--bg);
}
.product-show .product-attrs tr:last-child th,
.product-show .product-attrs tr:last-child td,
.product-show .product-specs tr:last-child th,
.product-show .product-specs tr:last-child td {
  border-bottom: 0;
}

.product-show .expand-toggle {
  margin-top: 8px;
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--brand);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.product-show .expand-toggle:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .product-show .product-attrs th,
  .product-show .product-specs th { width: 45%; }
}

@media (max-width: 720px) {
  .breadcrumb { font-size: 0.8rem; }
  .product-show { padding: 14px; font-size: 0.85rem; }
  .product-show .layout { gap: 18px; }
  .product-show h1 { font-size: 1.1rem; }
  .product-show .price-big { font-size: 1.25rem; }
  .product-show .product-image { padding: 18px; }
  .product-show .product-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 5px;
  }
  .product-show .brand-logo--lg { max-height: 56px; max-width: 140px; }
  .product-show .product-attrs,
  .product-show .product-specs { margin-top: 18px; padding-top: 14px; }
  .product-show .product-attrs h2,
  .product-show .product-specs h2 { font-size: 0.85rem; margin-bottom: 8px; }
  .product-show .product-attrs th,
  .product-show .product-attrs td,
  .product-show .product-specs th,
  .product-show .product-specs td { padding: 5px 8px; font-size: 0.78rem; }
  .product-show .add-form { padding: 12px; gap: 8px; }
  .product-show .add-form input[type="number"] { width: 64px; }
  .live-block { padding: 10px 12px; margin: 8px 0; font-size: 0.85rem; }
  .back-link { font-size: 0.85rem; margin-bottom: 8px; }
}

/* ---------- Product loading placeholder ---------- */
.product-show--loading {
  padding: 60px 24px;
}
.scrape-loading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  text-align: left;
}
.scrape-loading__spinner {
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scrape-loading__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.scrape-loading__text strong { font-size: 1rem; }
.scrape-loading__text .sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 6px;
}

/* ---------- Live data blocks (price + stock) ---------- */
.live-block {
  padding: 12px 14px;
  border-radius: 4px;
  margin: 12px 0;
  background: var(--card);
  border-left: 4px solid;
}
.live-block.loading { border-color: var(--line-strong); color: var(--ink-muted); background: var(--bg); }
.live-block.ok     { border-color: var(--accent-green); background: #f0f8f1; }
.live-block.warn   { border-color: var(--accent-amber); background: #fdf7e8; }
.live-block.err    { border-color: var(--accent-red);   background: #fdf0f0; }
.live-block strong { color: var(--ink); }

/* ---------- Add-to-cart form ---------- */
.add-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: 4px;
}
.add-form label { font-weight: 600; }
.add-form input[type="number"] {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}

/* ---------- Cart (Kramp-style layout) ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.cart-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cart-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
}
.card h1, .card h2, .card h3 {
  margin: 0 0 10px;
  font-weight: 700;
}
.card h1 { font-size: 1.25rem; }
.card h2 { font-size: 1rem; }
.card h3 { font-size: 0.95rem; }

/* Buttons used in cart */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  color: var(--ink) !important;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-outline:hover { background: var(--bg); }
.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline:disabled:hover { background: #fff; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.icon-btn--danger:hover { background: var(--accent-red); border-color: var(--accent-red); color: #fff; }

.btn--accent {
  background: #ffb000;
  color: var(--ink) !important;
}
.btn--accent:hover { background: #f5a300; }
.btn--block { display: block; text-align: center; margin-top: 14px; }

/* Shopping Cart header */
.cart-header__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cart-header__field { display: flex; flex-direction: column; gap: 4px; }
.cart-header__field label { font-size: 0.85rem; font-weight: 700; }
.cart-header__row { display: flex; gap: 6px; align-items: center; }
.cart-header__form input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}
.cart-header__field small { color: var(--ink-muted); font-size: 0.8rem; margin-top: 4px; }

/* Quick add */
.quick-add p { margin: 0 0 12px; }
.quick-add__form {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr auto;
  gap: 8px;
}
.quick-add__form input {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}
.quick-add__form input::placeholder { color: var(--ink-muted); }

/* Cart product table */
.cart-table { padding: 0; overflow: hidden; }
.cart-table__head, .cart-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 2.6fr) 64px 130px 110px 110px 40px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}
.cart-table__head {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}
.cart-row { border-bottom: 1px solid var(--line); padding: 16px 14px; }
.cart-row:last-child { border-bottom: 0; }
.cart-table__col-money { text-align: right; font-size: 0.9rem; }
.cart-table__col-money.strong { font-weight: 700; }
.cart-table__col-unit { font-size: 0.9rem; }

.cart-row__product { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.cart-row__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  color: var(--line-strong);
}
.cart-row__thumb:hover { border-color: var(--ink-muted); }
.cart-row__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.cart-row__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-row__brand { font-weight: 700; font-size: 0.88rem; }
.cart-row__sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 600;
}
.cart-row__name {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.35;
}
.cart-row__name:hover { color: var(--brand); }
.cart-row__ean { font-size: 0.75rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cart-row__eta {
  margin-top: 4px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-row__eta--ok   { color: var(--accent-green); }
.cart-row__eta--warn { color: var(--accent-amber); }
.cart-row__eta--err  { color: var(--accent-red); }
.cart-row--oos       { background: #fdf0f0; }
.cart-row__ref { margin-top: 8px; }
.cart-row__ref input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  font-size: 0.85rem;
}

/* Qty stepper */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.qty-stepper__btn {
  background: #fff;
  border: 0;
  width: 32px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--ink);
}
.qty-stepper__btn:hover { background: var(--bg); }
.qty-stepper__input {
  width: 50px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font: inherit;
  height: 36px;
  -moz-appearance: textfield;
}
.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Cart totals — single column dl */
.totals-breakdown {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  margin: 0;
  font-size: 0.92rem;
  max-width: 360px;
  margin-left: auto;
}
.totals-breakdown dt { color: var(--ink); }
.totals-breakdown dd { margin: 0; text-align: right; font-weight: 600; }
.totals-breakdown dt.total,
.totals-breakdown dd.total {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* Overview sidebar */
.cart-overview dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.cart-overview dt { color: var(--ink); font-weight: 400; }
.cart-overview dd { margin: 0; font-weight: 600; text-align: right; }
.cart-overview hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.cart-overview__total {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}
.cart-overview__total > span:first-child {
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.cart-overview__amount { font-size: 1.4rem; font-weight: 700; }

/* Shipping panel */
.cart-shipping__amount { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.cart-shipping__bar {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 8px;
}
.cart-shipping__bar-fill {
  height: 100%;
  background: #ffb000;
  transition: width 0.25s ease;
}
.cart-shipping p { margin: 0; font-size: 0.85rem; }

@media (max-width: 1024px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-aside { position: static; }
}
@media (max-width: 900px) {
  .cart-table__head { display: none; }
  .cart-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .cart-table__col-check,
  .cart-table__col-unit,
  .cart-table__col-money:not(.strong) { display: none; }
  .cart-table__col-money.strong { text-align: left; font-size: 1rem; }
  .cart-table__col-qty { justify-self: start; }
  .cart-table__col-trash { justify-self: end; margin-top: -32px; }
}
@media (max-width: 720px) {
  .cart-header__form,
  .quick-add__form { grid-template-columns: 1fr; }
}

/* ---------- Checkout (Kramp-style) ---------- */
.checkout-progress {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 4px 0 16px;
  gap: 10px;
}
.checkout-progress h1 {
  margin: 0;
  font-size: 1.35rem;
  text-align: center;
}
.checkout-progress__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--ink-muted) !important;
  text-decoration: none;
}
.checkout-progress__link:first-child { justify-self: start; }
.checkout-progress__link:last-child { justify-self: end; }
.checkout-progress__link:hover:not(.muted) { color: var(--ink) !important; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-progress { grid-template-columns: 1fr; text-align: center; }
  .checkout-progress__link { justify-self: center !important; }
}

.checkout-address .field,
.address-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.checkout-address label,
.address-form label {
  font-weight: 600;
  font-size: 0.85rem;
}
.checkout-address input[type="text"],
.checkout-address input[type="email"],
.checkout-address input[type="tel"],
.checkout-address select,
.address-form input,
.address-form select {
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.checkout-address input:focus,
.address-form input:focus,
.checkout-address select:focus,
.address-form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 74, 141, 0.12);
}
.checkout-address .field-row,
.address-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.address-display {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.checkbox-row input { width: 16px; height: 16px; }

/* Prices card (mirrors cart-totals styling) */
.checkout-prices table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.checkout-prices thead th {
  text-align: right;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-muted);
  background: var(--bg);
  padding: 8px 12px;
}
.checkout-prices thead th:first-child { text-align: left; }
.checkout-prices tbody th,
.checkout-prices tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.checkout-prices tbody th { font-weight: 600; text-align: left; }
.checkout-prices tbody td { text-align: right; }
.checkout-prices .cart-totals__final th,
.checkout-prices .cart-totals__final td { font-weight: 700; border-bottom: 0; }

.checkout-shipping {
  background: var(--bg);
  border-radius: 4px;
  padding: 12px 14px;
}
.checkout-shipping__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.checkout-shipping__head strong { font-size: 1.05rem; }
.checkout-shipping p { margin: 6px 0 0; font-size: 0.85rem; }

/* Payment method radios */
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.payment-option:hover { border-color: var(--line-strong); }
.payment-option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.payment-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(21, 74, 141, 0.04);
}
.payment-option__body { flex: 1; min-width: 0; }
.payment-option__title {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.payment-option__badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.payment-option__badge--alt { background: #ffb000; color: var(--ink); }
.payment-option__desc { font-size: 0.85rem; margin-top: 2px; }
.payment-option__detail {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.payment-option__detail label { font-weight: 600; font-size: 0.8rem; }
.payment-option__detail input {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font: inherit;
}

/* Place-order strip */
.checkout-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}
.checkout-actions p { margin: 0; font-size: 0.85rem; text-align: center; }
.checkout-actions .btn--accent { padding: 10px 22px; }
@media (max-width: 720px) {
  .checkout-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .checkout-actions p { order: -1; }
}

/* ---------- Utility ---------- */
.muted { color: var(--ink-muted); font-size: 0.9rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted) !important;
  font-size: 0.92rem;
  margin-bottom: 12px;
}
.back-link:hover { color: var(--brand) !important; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-darker);
  color: #d8e0eb;
  margin-top: 40px;
}
.site-footer a { color: #d8e0eb; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}
.site-footer__col h4 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  font-weight: 700;
}
.site-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer__col li {
  padding: 3px 0;
  font-size: 0.88rem;
}
.site-footer__brand p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 36ch;
}
.site-footer__logo {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
  display: block;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 24px;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.8rem;
}
.site-footer__bottom .muted { color: rgba(255, 255, 255, 0.55); }

@media (max-width: 720px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 24px 14px;
  }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__bottom {
    padding: 12px 14px;
    flex-direction: column;
    gap: 4px;
  }
}

/* ---------- Post-footer (legal + finance options) ---------- */
.post-footer {
  background: #fff;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.post-footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 24px;
}
.post-footer p { margin: 0 0 4px; font-size: 10px; }
.post-footer__legal { margin-bottom: 16px; }
.post-footer__finance {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.post-footer a {
  color: var(--brand);
  text-decoration: none;
}
.post-footer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .post-footer__inner { padding: 18px 14px; }
}

/* ---------- Auth + account ---------- */
.auth-card {
  max-width: 420px;
  margin: 32px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
}
.auth-card h1 { margin: 0 0 8px; font-size: 1.3rem; }
.auth-card .muted { margin-top: 0; }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.auth-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.auth-form input[type="email"] {
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}
.auth-form input[type="email"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 74, 141, 0.15);
}
.auth-form .btn { margin-top: 8px; }

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) {
  .account-grid { grid-template-columns: 1fr; }
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
}
.panel h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 700; }
.account-meta { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.account-meta dt { color: var(--ink-muted); font-size: 0.85rem; }
.account-meta dd { margin: 0; font-size: 0.9rem; }
.account-orders { list-style: none; padding: 0; margin: 0; }
.account-orders li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.account-orders li:last-child { border-bottom: 0; }
.account-orders__main { flex: 1; color: var(--ink); display: block; }
.account-orders__main:hover { color: var(--brand); }
.account-orders__pdf { font-size: 0.8rem; padding: 6px 10px; flex-shrink: 0; }

/* Account order detail */
.account-order { display: flex; flex-direction: column; }
.account-order__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.account-order__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .account-order__grid { grid-template-columns: 1fr; }
}
.account-order address {
  font-style: normal;
  line-height: 1.5;
  font-size: 0.9rem;
}
.account-order__totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
  font-size: 0.9rem;
}
.account-order__totals dt { color: var(--ink-muted); }
.account-order__totals dd { margin: 0; text-align: right; }
.account-order__totals dt.total,
.account-order__totals dd.total {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  margin-top: 4px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}
.account-order__items {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.account-order__items th,
.account-order__items td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.account-order__items th {
  background: var(--bg);
  font-weight: 700;
  font-size: 0.8rem;
}
.account-order__items code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: var(--bg);
  color: var(--ink-muted);
}
.status-badge--paid              { background: #e6f4ea; color: #2e7d32; }
.status-badge--awaiting-invoice  { background: #fff7e0; color: #8a6d00; }
.status-badge--pending           { background: #eef3fa; color: var(--brand); }
.status-badge--failed,
.status-badge--cancelled,
.status-badge--expired           { background: #fdecea; color: var(--accent-red); }

/* ---------- Static content pages (about, terms, privacy, delivery) ---------- */
.content-page {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px 36px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
}
.content-page__head {
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.content-page__head h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 700;
}
.content-page__lead {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
}
.content-page section + section { margin-top: 22px; }
.content-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.content-page p { margin: 0 0 10px; }
.content-page ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
.content-page li { margin-bottom: 4px; }
.content-page a { color: var(--brand); }
.content-page .muted { color: var(--ink-muted); }

@media (max-width: 720px) {
  .content-page { padding: 20px 18px; font-size: 0.88rem; }
  .content-page__head h1 { font-size: 1.3rem; }
}
