/* USP bar */
.usp-bar { background: var(--surface); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.usp-bar ul { display: flex; gap: var(--space-5); overflow: hidden; height: 36px; align-items: center; }
.usp-bar li { display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.usp-bar svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 639px) { .usp-bar li { display: none; } .usp-bar li.is-active { display: flex; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.header-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding-top: var(--space-3); padding-bottom: var(--space-3); }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo:hover { text-decoration: none; }
.logo-name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xl); color: var(--accent); letter-spacing: .02em; }
.logo-tag { margin-top: 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.search-form { display: flex; position: relative; max-width: 640px; width: 100%; justify-self: center; }
.search-form input { width: 100%; padding: 10px 44px 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill); font: inherit; background: var(--surface); }
.search-form button { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 36px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.search-form svg { width: 18px; height: 18px; }
.header-contact { display: none; align-items: center; gap: var(--space-4); font-weight: 700; white-space: nowrap; font-size: var(--fs-sm); }
.header-contact svg { width: 20px; height: 20px; color: var(--accent); }
.header-contact a { display: flex; align-items: center; gap: var(--space-2); }
.menu-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.menu-toggle svg { width: 22px; height: 22px; }
@media (min-width: 1024px) { .header-contact { display: flex; } .menu-toggle { display: none; } }
@media (max-width: 1023px) { .search-form { grid-column: 1 / -1; order: 3; } .header-main { grid-template-columns: 1fr auto; } }

/* Nav */
.site-nav { display: none; border-top: 1px solid var(--border); }
.site-nav > .container > ul { display: flex; gap: var(--space-6); }
.site-nav li { position: relative; }
.site-nav li > a { display: block; padding: var(--space-3) 0; font-weight: 700; }
.site-nav li > a.is-accent { color: var(--accent); }
.site-nav li > a { border-bottom: 3px solid transparent; }
.site-nav li > a.is-active { border-bottom-color: var(--accent); text-decoration: none; }
.drawer-panel li a.is-active { color: var(--accent); font-weight: 700; }
.site-nav li:hover > .mega, .site-nav li:focus-within > .mega { display: grid; }
@media (min-width: 1024px) { .site-nav { display: block; } }

/* Mega menu */
.mega { display: none; position: absolute; left: 0; top: 100%; min-width: 760px; background: var(--bg); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-hover); padding: var(--space-5); grid-template-columns: repeat(3, 1fr); gap: var(--space-5); z-index: 60; }
.mega h3 { font-size: var(--fs-base); margin-bottom: var(--space-2); }
.mega h3 a:hover { color: var(--accent); }
.mega li a { display: block; padding: 4px 0; font-weight: 400; color: var(--muted); }
.mega li a:hover { color: var(--accent); }
.mega .mega-thumb { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: var(--space-2); }
.mega .mega-thumb img, .mega .mega-thumb picture, .mega .mega-thumb .stock-img { width: 100%; height: 100%; object-fit: cover; }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.is-open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.drawer-panel { position: absolute; top: 0; left: 0; bottom: 0; width: min(85vw, 360px); background: var(--bg); overflow-y: auto; padding: var(--space-4); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.drawer-panel h3 { margin: var(--space-4) 0 var(--space-2); }
.drawer-panel li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
.drawer-panel .sub a { padding-left: var(--space-4); color: var(--muted); }

/* Footer */
.site-footer { margin-top: var(--space-8); background: var(--surface); border-top: 1px solid var(--border); padding: var(--space-7) 0 var(--space-5); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h3 { font-size: var(--fs-base); }
.footer-grid li a { display: block; padding: 3px 0; color: var(--muted); }
.footer-bottom { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }

/* Product card */
.card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; position: relative; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); text-decoration: none; }
.card-media { aspect-ratio: 4/3; background: var(--surface); overflow: hidden; }
.card-media img, .card-media picture { width: 100%; height: 100%; object-fit: cover; }
.card-badges { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: var(--space-1); }
.card-body { padding: var(--space-3); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-type { font-size: var(--fs-sm); color: var(--muted); }
.card-name { font-family: var(--font-head); font-weight: 600; font-size: var(--fs-lg); line-height: 1.2; }
.card-colors { font-size: var(--fs-sm); color: var(--muted); }
.card-price { margin-top: auto; padding-top: var(--space-2); }

/* Price block */
.price-block { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.price-block .from { font-size: var(--fs-sm); color: var(--muted); }
.price-block.lg .price { font-size: var(--fs-3xl); }
.price-block.sm .price { font-size: var(--fs-xl); }
.price-block .price-old { font-size: var(--fs-base); }

/* Rail */
.rail { margin: var(--space-6) 0; }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-3); }
.rail-head a { color: var(--accent); font-weight: 700; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 70%; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); scrollbar-width: thin; }
.rail-track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .rail-track { grid-auto-columns: 40%; } }
@media (min-width: 1024px) { .rail-track { grid-auto-columns: calc(25% - 18px); } }

/* Stock image / placeholder */
.stock-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #f0e9e1 0%, #e6dfd6 50%, #d9d2c9 100%); }
.stock-img { width: 100%; height: 100%; overflow: hidden; }
.stock-img img, .stock-img picture { width: 100%; height: 100%; object-fit: cover; }

/* Gallery */
/* Main image is never upscaled: shown at natural size, centered; shrinks only when larger than the box. */
.gallery-main { aspect-ratio: 4/3; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.gallery-main picture { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gallery-main img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-zoom { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.gallery-thumb { border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; padding: 0; background: var(--surface); aspect-ratio: 4/3; }
.gallery-thumb img, .gallery-thumb picture { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active { border-color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.lightbox img { max-width: 95vw; max-height: 85vh; object-fit: contain; }
.lightbox button { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }
.lightbox button svg { width: 24px; height: 24px; }
.lightbox-close { top: var(--space-4); right: var(--space-4); }
.lightbox-prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-caption { position: absolute; bottom: var(--space-4); color: #fff; font-size: var(--fs-sm); }

/* Variants */
.variants { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: var(--fs-sm); }
.variants th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border); }
.variants td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.variants .num { text-align: right; white-space: nowrap; }
.variants .num .price { font-size: var(--fs-lg); margin: 0 var(--space-2); }
.variants tr.is-cheapest { background: var(--surface); }

/* Contact & form */
.contact-buttons { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.inquiry-form { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.field { display: grid; gap: 4px; font-size: var(--fs-sm); }
.field input, .field textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; background: var(--bg); }
.form-status { font-size: var(--fs-sm); margin: 0; min-height: 1.5em; }
