/* LAMPS VN e-shop – mobile first. Brand colours are placeholders until the real logo arrives. */
:root {
  --c-primary: #d6202b;
  --c-primary-dark: #a8161f;
  --c-call: #1f8a3b;
  --c-text: #1d232b;
  --c-muted: #5b6573;
  --c-bg: #ffffff;
  --c-bg-alt: #f4f6f9;
  --c-border: #dde2e8;
  --radius: 12px;
  --tap: 48px; /* minimum touch target */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
}

img, svg { max-width: 100%; }
a { color: var(--c-primary); }
h1, h2 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.logo {
  font-size: 1.6rem; font-weight: 800; letter-spacing: .06em;
  color: var(--c-primary); text-decoration: none;
}
.lang-switch { display: flex; gap: 8px; margin: 0; }
.flag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap);
  padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: none; cursor: pointer; opacity: .55;
}
.flag svg { width: 32px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--c-border); }
.flag.is-active { opacity: 1; border-color: var(--c-primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px;
  border: 2px solid var(--c-primary); border-radius: var(--radius);
  background: var(--c-bg); color: var(--c-primary);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-large { min-height: 56px; padding: 14px 32px; font-size: 1.15rem; width: 100%; }
.btn-call { background: var(--c-call); border-color: var(--c-call); color: #fff; }
.btn-call svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Sections */
.hero { padding: 32px 0; background: var(--c-bg-alt); }
.lead { font-size: 1.1rem; color: var(--c-muted); margin: 0 0 24px; }
.section { padding: 32px 0; }
.section-alt { background: var(--c-bg-alt); }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.step {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border: 1px solid var(--c-border); border-radius: var(--radius);
}
.step span:last-child { color: var(--c-muted); font-size: .95rem; }
.step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--c-primary); color: #fff; margin-bottom: 6px;
}
.step-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dealer-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.dealer-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.dealer-name { font-size: 1.25rem; font-weight: 700; margin: 0; }

.terms-list { padding-left: 1.2em; }
.terms-list li { margin: .3em 0; }

.prose { max-width: 760px; }
.prose blockquote { margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--c-border); color: var(--c-muted); }

.header-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: var(--tap); min-height: var(--tap);
  margin-left: 0; margin-right: 4px; font-weight: 600; text-decoration: none;
}
.header-link svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
.header-link-text { display: none; }
@media (min-width: 600px) { .header-link-text { display: inline; } }

.narrow { max-width: 480px; }
.btn-block { width: 100%; }
.muted { color: var(--c-muted); font-size: .95rem; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; }
.field input {
  min-height: 56px; padding: 12px 14px;
  border: 2px solid var(--c-border); border-radius: var(--radius);
  font: inherit; font-size: 1.2rem; background: var(--c-bg); color: var(--c-text);
}
.field input:focus { outline: none; border-color: var(--c-primary); }
.field-error { margin: 0; color: var(--c-primary-dark); font-size: .95rem; }

.alert { padding: 14px 16px; border-radius: var(--radius); margin: 0 0 16px; }
.alert p { margin: 0 0 12px; }
.alert p:last-child { margin-bottom: 0; }
.alert-error { background: #fdecee; border: 1px solid #f3b6bb; color: #7a1018; }
.alert-info { background: #e9f3fb; border: 1px solid #b8d6ef; }
.messages { padding-top: 16px; }

.help-box { padding: 16px; border-radius: var(--radius); background: var(--c-bg-alt); }
.help-box p { margin: 0 0 12px; }

.card { padding: 16px; margin-bottom: 16px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.card h2 { font-size: 1.15rem; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.details dt { color: var(--c-muted); }
.details dd { margin: 0; }

@media (max-width: 420px) {
  .logo { font-size: 1.35rem; }
  .header-link { min-width: 40px; margin-right: 0; }
  .header-link svg { width: 26px; height: 26px; }
  .lang-switch { gap: 2px; }
  .flag { min-width: 40px; }
  .flag svg { width: 28px; }
}
.header-link-first { margin-left: auto; }
.header-link-first + .header-link { margin-left: 0; }
.account-catalog { margin-bottom: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.empty { color: var(--c-muted); padding: 24px 0; }

/* Catalogue */
.catalog-title { margin-top: 8px; }
.search-box { display: flex; gap: 8px; margin-bottom: 16px; }
.search-box input {
  flex: 1; min-width: 0; min-height: var(--tap); padding: 10px 14px;
  border: 2px solid var(--c-border); border-radius: var(--radius); font: inherit;
}
.search-box input:focus { outline: none; border-color: var(--c-primary); }
.search-box .btn { padding: 0 14px; }
.search-box svg, .filters summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

.quick-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-bottom: 20px; }
.quick-pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 96px; padding: 10px 6px; border-radius: var(--radius); text-align: center;
  color: #fff; text-decoration: none; font-weight: 700; line-height: 1.2;
  background: var(--c-primary);
}
.quick-new_arrivals { background: #1f8a3b; }
.quick-bestsellers { background: #e36414; }
.quick-icon svg { width: 28px; height: 28px; fill: currentColor; }
.quick-name { font-size: .95rem; }
.quick-count { font-size: .8rem; font-weight: 400; opacity: .9; }

.category-grid, .product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.category-tile {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text); text-decoration: none; background: var(--c-bg);
}
.category-image { display: block; aspect-ratio: 1; background: var(--c-bg-alt); }
.category-image img, .tile-image img { width: 100%; height: 100%; object-fit: contain; display: block; }
.category-image img[src$=".svg"], .category-image img[src*="/img/categories/"] { object-fit: cover; }
.category-name { padding: 10px 10px 0; font-weight: 700; line-height: 1.25; }
.category-count { padding: 2px 10px 10px; color: var(--c-muted); font-size: .85rem; }

.breadcrumb { font-size: .9rem; color: var(--c-muted); margin-bottom: 4px; }
.subcategory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.subcategory-grid .category-name { padding: 6px 6px 0; font-size: .85rem; line-height: 1.2; }
.subcategory-grid .category-count { padding: 2px 6px 6px; font-size: .75rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border: 1px solid var(--c-border); border-radius: 999px; background: var(--c-bg);
  color: var(--c-text); text-decoration: none; font-size: .95rem; cursor: pointer;
}
.chip.is-active, .chip:has(input:checked) { border-color: var(--c-primary); background: #fdecee; }
.chip input { accent-color: var(--c-primary); }
.chip-large { min-height: var(--tap); font-weight: 600; }
.chip small { color: var(--c-muted); font-weight: 400; }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.filters { flex: 0 0 auto; order: 0; }
.filters[open] { flex-basis: 100%; order: 2; }
.filters summary { list-style: none; display: inline-flex; }
.filters summary::-webkit-details-marker { display: none; }
.filters[open] summary { border-color: var(--c-primary); }
.filter-form { margin-top: 12px; padding: 12px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.filter-form fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.filter-form legend { font-weight: 700; margin-bottom: 4px; }
.range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range input { width: 100px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--c-border); border-radius: 8px; font: inherit; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sort-form { order: 1; margin-left: auto; }
.sort-form select { min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--c-border); border-radius: var(--radius); font: inherit; background: var(--c-bg); }
.result-count { color: var(--c-muted); margin: 4px 0 12px; }

.product-tile {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-bg);
}
.tile-link { color: var(--c-text); text-decoration: none; }
.tile-image { position: relative; display: block; aspect-ratio: 1; background: var(--c-bg-alt); }
.tile-name {  /* always 2 lines tall, so prices and buttons line up across a row */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 8px 10px 0; font-weight: 600; line-height: 1.3; font-size: .95rem;
  min-height: calc(2 * 1.3em);
}
.tile-price { margin: 6px 10px 0; font-size: 1.25rem; font-weight: 800; color: var(--c-primary); }
.tile-price small, .product-price small { font-size: .8rem; font-weight: 400; color: var(--c-muted); }
.packs { display: flex; flex-direction: column; margin: 4px 10px 0; font-size: .85rem; color: var(--c-muted); line-height: 1.35; }
.product-tile .packs { min-height: calc(2 * 1.35em); }
.pack-step { color: var(--c-text); font-weight: 600; }
.tile-number { margin: 2px 10px 8px; font-size: .75rem; color: var(--c-muted); }
.product-tile .add-form { margin-top: auto; }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 3px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; color: #fff; background: #1f8a3b;
}
.badge-restocked { background: #11457e; }

/* Product detail */
.product-detail { display: grid; gap: 20px; }
.gallery-main { position: relative; margin: 0; }
.gallery-zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--c-bg-alt); border-radius: var(--radius); cursor: zoom-in; overflow: hidden; }
.gallery-zoom img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.gallery-main figcaption { min-height: 1.4em; margin-top: 6px; color: var(--c-muted); font-size: .9rem; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scroll-snap-type: x mandatory; }
.gallery-thumb {
  flex: 0 0 72px; height: 72px; padding: 0; border: 2px solid var(--c-border); border-radius: 8px;
  background: var(--c-bg-alt); overflow: hidden; cursor: pointer; scroll-snap-align: start;
}
.gallery-thumb.is-active { border-color: var(--c-primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; }
.gallery-dialog img { width: 100%; height: 100%; object-fit: contain; touch-action: pinch-zoom; }
.dialog-close {
  position: fixed; top: 12px; right: 12px; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 28px; cursor: pointer;
}
.product-info h1 { font-size: 1.5rem; }
.product-number { color: var(--c-muted); font-size: .9rem; }
.product-price { font-size: 2rem; font-weight: 800; color: var(--c-primary); margin: 8px 0; }
.product-info .packs { margin: 0 0 16px; font-size: 1rem; }

@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .subcategory-grid { grid-template-columns: repeat(3, 180px); }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-pick { min-height: 110px; }
  .product-detail { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Cart & order */
.narrow-wide { max-width: 760px; }
.header-cart { position: relative; }
.cart-count {
  position: absolute; top: 4px; right: 0; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--c-primary); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.cart-count:empty { display: none; }

.add-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 10px 10px; }
.add-form-large { margin: 8px 0 20px; gap: 10px; }
.qty { display: flex; align-items: stretch; flex: 1 1 100%; }
.qty input {
  width: 100%; min-width: 0; min-height: var(--tap); text-align: center;
  border: 1px solid var(--c-border); border-left: 0; border-right: 0; font: inherit; font-size: 1.1rem;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  flex: 0 0 var(--tap); min-height: var(--tap); border: 1px solid var(--c-border); background: var(--c-bg-alt);
  font-size: 1.4rem; cursor: pointer;
}
.qty-btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.qty-btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-add { flex: 1 1 100%; padding: 8px 10px; }
.pack-buttons { display: flex; gap: 6px; flex: 1 1 100%; min-height: 44px; }
.btn-pack {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 6px; border-width: 1px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .85rem; line-height: 1.15; gap: 1px;
}
.btn-pack small { font-weight: 400; font-size: .8rem; }
.add-form-large .qty { flex: 1 1 160px; }
.add-form-large .btn-add { flex: 2 1 200px; font-size: 1.1rem; }
.add-form-large .pack-buttons { flex-wrap: wrap; min-height: 0; }
.add-form-large .pack-buttons.is-empty { display: none; }
.add-form-large .btn-pack { flex: 1 1 160px; min-height: var(--tap); font-size: 1rem; flex-direction: row; gap: 6px; }

.cart-bar-slot:not(:empty) + .site-footer, body:has(.cart-bar) .site-footer { padding-bottom: 96px; }
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--c-bg); border-top: 1px solid var(--c-border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08); color: var(--c-text); text-decoration: none;
}
.cart-bar-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cart-bar-total { font-size: 1.3rem; font-weight: 800; color: var(--c-primary); }
.cart-bar-note { font-size: .85rem; color: var(--c-muted); }
.cart-bar-button {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px;
  border-radius: var(--radius); background: var(--c-primary); color: #fff; font-weight: 700;
}
body:has(.cart-bar) .toast-region { bottom: 84px; }
.toast-region { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.toast {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 520px; padding: 14px 18px;
  border-radius: var(--radius); background: #1d232b; color: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  pointer-events: auto; transition: opacity .4s;
}
.toast a { color: #ffd2d5; font-weight: 700; }
.toast-warning { background: #7a1018; }
.toast.is-hidden { opacity: 0; pointer-events: none; }

.cart-lines { list-style: none; margin: 0 0 16px; padding: 0; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.cart-line.is-unavailable { opacity: .6; }
.line-image { width: 72px; height: 72px; background: var(--c-bg-alt); border-radius: 8px; overflow: hidden; }
.line-image img { width: 100%; height: 100%; object-fit: contain; }
.line-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-name { font-weight: 600; color: var(--c-text); text-decoration: none; }
.line-meta { font-size: .85rem; color: var(--c-muted); }
.line-warning { font-size: .9rem; color: #7a1018; }
.line-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.line-form .qty { flex: 0 1 180px; }
.btn-link { border: 0; background: none; color: var(--c-muted); text-decoration: underline; cursor: pointer; font: inherit; min-height: var(--tap); }
.line-total { grid-column: 2; font-weight: 800; font-size: 1.1rem; }
.line-total small { display: block; font-weight: 400; font-size: .8rem; color: var(--c-muted); }
.summary-total { font-size: 1.2rem; margin: 0; }
.minimum { margin: 12px 0; padding: 10px 12px; border-radius: var(--radius); background: #e8f5ec; }
.minimum.is-missing { background: #fff4e5; }
.minimum p { margin: 0 0 6px; }
.minimum progress { width: 100%; height: 10px; accent-color: var(--c-primary); }

.checkout .card h2 { margin-bottom: 8px; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--c-primary); background: #fdecee; }
.choice input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--c-primary); flex: 0 0 auto; }
.checkout textarea { width: 100%; padding: 10px; border: 2px solid var(--c-border); border-radius: var(--radius); font: inherit; }
.terms { margin: 12px 0; }
.when-days { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 8px; }
.when-days[hidden], .when-day[hidden] { display: none; }
.when-day { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.when-day select { min-height: var(--tap); padding: 8px 10px; border: 2px solid var(--c-border); border-radius: var(--radius); font: inherit; }
.summary-lines { list-style: none; margin: 0 0 12px; padding: 0; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--c-border); }
.done-box { text-align: center; padding: 16px 0 24px; }
.done-icon { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: #1f8a3b; color: #fff; font-size: 40px; line-height: 72px; }
.done-number { font-size: 1.3rem; }

.order-list { list-style: none; margin: 0; padding: 0; }
.order-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px 4px;
  border-bottom: 1px solid var(--c-border); color: var(--c-text); text-decoration: none;
}
.order-main, .order-side { display: flex; flex-direction: column; gap: 4px; }
.order-side { align-items: flex-end; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: #e5e7eb; color: #374151; }
.status-received { background: #e0f2fe; color: #075985; }
.status-processing { background: #fef3c7; color: #92400e; }
.status-shipped { background: #ede9fe; color: #5b21b6; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 4px 0 10px 22px; border-left: 2px solid var(--c-border); }
.timeline li:last-child { border-left-color: transparent; }
.timeline-dot { position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; padding: 0; }
.history-link { margin-bottom: 16px; }
.history-link svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.history-select { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.history-select input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--c-primary); flex: 0 0 auto; }
.line-price { font-weight: 700; }
.price-up { color: #b91c1c; font-weight: 400; font-size: .85rem; }
.price-down { color: #15803d; font-weight: 400; font-size: .85rem; }
.history-actions { margin-top: 4px; }
.history .cart-line { grid-template-columns: 72px 1fr; }
.reorder-form { margin-top: 10px; }

@media (min-width: 768px) {
  .cart-line { grid-template-columns: 80px 1fr 140px; }
  .line-total { grid-column: 3; text-align: right; }
}

/* Footer */
.site-footer { padding: 24px 0; border-top: 1px solid var(--c-border); color: var(--c-muted); font-size: .9rem; }

@media (min-width: 768px) {
  h1 { font-size: 2.3rem; }
  .hero { padding: 56px 0; }
  .btn-large { width: auto; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .dealer-card { flex-direction: row; text-align: left; }
}

/* Header catalogue menu (details/summary – works without JS) */
:root { --header-h: 61px; }
.catalog-menu > summary { list-style: none; cursor: pointer; color: var(--c-primary); }
.catalog-menu > summary::-webkit-details-marker { display: none; }
.catalog-menu .menu-caret { width: 18px; height: 18px; transition: transform .15s; }
.catalog-menu[open] .menu-caret { transform: rotate(180deg); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .12); padding: 12px 0 20px;
}
.menu-all { display: inline-block; padding: 8px 0 12px; font-weight: 700; text-decoration: none; }
.menu-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.menu-quick-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border-radius: 999px; background: var(--c-primary); color: #fff; font-weight: 700;
  text-decoration: none; font-size: .95rem;
}
.menu-quick-link span { font-weight: 400; opacity: .85; font-size: .85rem; }
.menu-quick-link.quick-new_arrivals { background: #1f8a3b; }
.menu-quick-link.quick-bestsellers { background: #e36414; }
.menu-groups { display: grid; grid-template-columns: 1fr; gap: 4px 24px; }
@media (min-width: 600px) { .menu-groups { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .menu-groups { grid-template-columns: repeat(3, 1fr); } }
.menu-group { padding: 8px 0; border-top: 1px solid var(--c-border); }
.menu-main { display: block; padding: 6px 0; font-weight: 700; color: var(--c-text); text-decoration: none; }
.menu-group ul { list-style: none; margin: 0; padding: 0; }
.menu-group li a {
  display: block; padding: 7px 0 7px 12px; color: var(--c-text); text-decoration: none;
}
.menu-main:hover, .menu-group li a:hover { color: var(--c-primary); }
.menu-count { color: var(--c-muted); font-size: .8rem; font-weight: 400; }

/* Sticky bar under the header on the product page: back to its category */
.section-with-bar { padding-top: 0; }
.category-bar {
  position: sticky; top: var(--header-h); z-index: 9;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border); margin-bottom: 12px;
}
.category-bar-inner { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.bar-back {
  flex: none; display: inline-flex; align-items: center; gap: 2px;
  min-height: var(--tap); max-width: 100%; font-weight: 700; text-decoration: none;
}
.bar-back svg { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.bar-back-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Category page: main categories (small) – line – subcategories, all with images */
.section-strip { padding-top: 12px; }
.cat-strip { margin-bottom: 8px; }
.cat-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cat-row::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .cat-row { flex-wrap: wrap; overflow: visible; } }
.cat-chip {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px; border: 2px solid transparent; border-radius: var(--radius);
  color: var(--c-text); text-decoration: none; text-align: center;
}
.cat-chip:hover { border-color: var(--c-border); }
.cat-chip.is-active { border-color: var(--c-primary); background: #fdf0f1; }
.cat-chip-img {
  display: block; overflow: hidden; border-radius: 10px; background: var(--c-bg-alt);
}
.cat-chip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-chip-name { line-height: 1.2; overflow-wrap: break-word; }  /* always the full name */
.cat-chip-main { width: 92px; }
.cat-chip-main .cat-chip-img { width: 52px; height: 52px; border-radius: 50%; }
.cat-chip-main .cat-chip-name { font-size: .75rem; }
.cat-chip-main.is-active .cat-chip-name { font-weight: 700; color: var(--c-primary); }
.cat-divider { border: 0; border-top: 1px solid var(--c-border); margin: 6px 0; }
.cat-chip-sub { width: 108px; }
.cat-chip-sub .cat-chip-img { width: 92px; height: 92px; }
.cat-chip-sub .cat-chip-name { font-size: .85rem; font-weight: 600; }
.cat-chip-sub.is-active .cat-chip-name { color: var(--c-primary); }
.cat-chip-count { font-size: .75rem; color: var(--c-muted); }
.cat-heading {
  margin: 4px 0 2px; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--c-muted);
}
.cat-row-sub { align-items: center; }
.cat-arrow { flex: none; display: flex; align-items: center; color: var(--c-muted); }
.cat-arrow svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.cat-chip-parent .cat-chip-name { font-weight: 700; }

/* recommended groups: equal wide cards side by side, always the full name
   (phone: image above the name, wider screens: image left of it) */
.cat-row-quick {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px;
  overflow: visible;
}
@media (min-width: 600px) { .cat-row-quick { grid-template-columns: repeat(auto-fit, minmax(170px, 220px)); } }
.cat-chip-quick {
  width: auto; padding: 6px 4px; border: 1px solid var(--c-border);
}
.cat-chip-quick .cat-chip-img { flex: none; width: 52px; height: 52px; border-radius: 50%; }
.cat-chip-quick .cat-chip-name { font-size: .8rem; font-weight: 700; }
.cat-chip-quick.is-active { border: 2px solid var(--c-primary); padding: 5px 3px; }
.cat-chip-quick.is-active .cat-chip-name { color: var(--c-primary); }
@media (min-width: 600px) {
  .cat-chip-quick { flex-direction: row; justify-content: flex-start; gap: 10px;
    padding: 6px 12px 6px 6px; text-align: left; }
  .cat-chip-quick.is-active { padding: 5px 11px 5px 5px; }
  .cat-chip-quick .cat-chip-name { font-size: .9rem; }
}

/* Slim category bar + "↑ Categories" button: appear once the strip is scrolled away */
.cat-slim {
  position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 9;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  transform: translateY(-110%); visibility: hidden; transition: transform .2s, visibility .2s;
}
.cat-slim.is-visible { transform: none; visibility: visible; }
.slim-row {
  display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 2px 0;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slim-row::-webkit-scrollbar { display: none; }
.slim-row + .slim-row { border-top: 1px solid var(--c-border); }
.slim-icon { flex: none; display: block; padding: 2px; border: 2px solid transparent; border-radius: 50%; }
.slim-icon.is-active { border-color: var(--c-primary); }
.slim-icon .cat-slim-img, .slim-group .cat-slim-img { width: 30px; height: 30px; }
.slim-group {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 2px;
  border: 1px solid var(--c-border); border-radius: 999px; color: var(--c-text);
  text-decoration: none; white-space: nowrap; font-size: .85rem; font-weight: 600;
}
.slim-group.is-active { border: 2px solid var(--c-primary); color: var(--c-primary); }
.cat-slim-name { white-space: nowrap; font-size: .9rem; }
.cat-slim-parent { flex: none; display: flex; align-items: center; gap: 8px; color: var(--c-text);
  text-decoration: none; font-weight: 700; }
.cat-slim-img { flex: none; display: block; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: var(--c-bg-alt); }
.cat-slim-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-slim-arrow svg { width: 20px; height: 20px; }
.slim-chip {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px;
  border: 1px solid var(--c-border); border-radius: 999px; color: var(--c-text);
  text-decoration: none; white-space: nowrap; font-size: .9rem;
}
.slim-chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff;
  font-weight: 700; }

.cat-fab {
  position: fixed; right: 16px; bottom: 20px; z-index: 14;
  display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 16px 0 10px;
  border: 0; border-radius: 999px; background: var(--c-text); color: #fff;
  font: inherit; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); cursor: pointer;
}
.cat-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.cat-fab[hidden] { display: none; }
body:has(.cart-bar) .cat-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; margin: 24px 0 8px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap); min-height: var(--tap); padding: 0 10px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  color: var(--c-text); text-decoration: none; font-weight: 600;
}
.page-link:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-link.is-current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.page-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.page-gap { padding: 0 2px; color: var(--c-muted); }
.bar-back-label { color: var(--c-muted); font-weight: 400; margin-left: 4px; }

/* Product page: how many pieces are already in the cart */
.in-cart {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -8px 0 20px; padding: 10px 14px; border-radius: var(--radius);
  background: #eaf6ee; border: 1px solid #b9e2c6; color: #14532d;
}
.in-cart.is-empty { display: none; }
.in-cart form { margin: 0; }
.in-cart-remove {
  min-height: 40px; padding: 4px 14px; border: 1px solid var(--c-primary); border-radius: var(--radius);
  background: var(--c-bg); color: var(--c-primary); font: inherit; font-weight: 600; cursor: pointer;
}
.in-cart-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.in-cart-label { font-weight: 600; }
.qty-small { flex: 0 0 auto; width: 150px; }
.qty-small .qty-btn { flex-basis: 40px; min-height: 40px; font-size: 1.2rem; }
.qty-small input { min-height: 40px; font-size: 1rem; background: var(--c-bg); }
.in-cart-unit { margin-right: auto; }

/* Tile of a product already in the cart */
.product-tile.is-in-cart { border-color: #1f8a3b; box-shadow: 0 0 0 1px #1f8a3b inset; }
.tile-in-cart {
  position: absolute; bottom: 8px; left: 8px; padding: 3px 10px; border-radius: 999px;
  background: #1f8a3b; color: #fff; font-size: .8rem; font-weight: 700;
}
.tile-edit .qty input { background: #eaf6ee; font-weight: 700; }
.btn-remove { flex: 1 1 100%; padding: 8px 10px; border-width: 1px; color: var(--c-primary); }
.btn-pack.is-current { background: #eaf6ee; border-color: #1f8a3b; color: #14532d; }

/* Favourites (heart) */
.product-tile { position: relative; }
.fav-form { margin: 0; }
.product-tile > .fav-form { position: absolute; right: 8px; top: 8px; z-index: 1; }
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; min-height: 40px; padding: 0; border: 1px solid var(--c-border);
  border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--c-muted); cursor: pointer;
}
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn.is-on { color: var(--c-primary); border-color: #f3b6bb; }
.fav-btn.is-on svg { fill: currentColor; }
.fav-form-large .fav-btn { padding: 0 14px; min-height: 40px; font: inherit; font-weight: 600; margin-bottom: 12px; }
.menu-fav { margin-left: 16px; }
.fav-unavailable-title { margin-top: 32px; font-size: 1.1rem; color: var(--c-muted); }
.fav-unavailable { list-style: none; padding: 0; margin: 0; }
.fav-unavailable li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--c-border); color: var(--c-muted);
}

/* Invoice items */
.invoice-items { width: 100%; border-collapse: collapse; font-size: .95rem; }
.invoice-items th, .invoice-items td { padding: 8px 6px; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.invoice-items th { color: var(--c-muted); font-weight: 600; font-size: .85rem; }
.invoice-items .num { text-align: right; white-space: nowrap; }
.qr-payment { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.qr-code svg { width: 180px; height: 180px; display: block; }

/* Quick order */
.scanner { max-width: 420px; margin: 12px 0; border-radius: var(--radius); overflow: hidden; }
.scan-list { list-style: none; padding: 0; margin: 12px 0; }
.scan-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.scan-row.is-error { color: var(--c-primary-dark); }
.quick-lines { width: 100%; padding: 10px 12px; border: 2px solid var(--c-border); border-radius: var(--radius); font: inherit; font-family: ui-monospace, monospace; margin-bottom: 12px; }

/* the hidden attribute always wins over display rules of buttons etc. */
[hidden] { display: none !important; }

/* Excel export */
.export-list { list-style: none; padding: 0; margin: 16px 0; }
.export-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); text-decoration: none; }
.export-row:hover { border-color: var(--c-primary); }
.export-row small { display: block; }
.export-size { color: var(--c-primary); font-weight: 700; white-space: nowrap; }
.newsletter-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.newsletter-choice .btn-pack { flex: 1 1 140px; min-height: 44px; }
