.products-list[data-layout="grid"] .product-price {
    font-size: clamp(1.4rem, 0.8vw + 0.95rem, 1.8rem);
}
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');
@import url('./dropdowns.css');

/* (removed) slider-edge-overlay: switched to section-shadow absolute gradient */

/* Headings inside container */
.container h2 {
    text-align: left;
    font-size: 1.25rem;
    margin: 0 0 18px 0;
    color: var(--text);
    font-weight: 600;
}
.products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 80px 0;
}
.products-list[data-layout="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0;
}
.product-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid #d8dee8;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(190px, 230px);
    gap: 16px;
    align-items: stretch;
    box-shadow: none;
    transition: border-color .15s ease;
}
.product-card > * { align-self: stretch; }
.products-list:not([data-layout="grid"]) .product-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #cfd7e3;
}
.products-list[data-layout="grid"] .product-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
}
.product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 3;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e7ecf3;
    background: #f7f9fc;
}
.products-list[data-layout="grid"] .product-media {
    max-width: 100%;
}
.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-media .fav-toggle {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #dde3ec;
    box-shadow: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.product-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: stretch;
    min-height: 0;
    height: auto;
}
.product-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.product-title { font-size: 1.08rem; font-weight: 700; margin: 0; color: #111827; }
.product-desc { color: #6b7280; margin: 0; }
.product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.products-list:not([data-layout="grid"]) .product-specs {
    margin-top: auto;
}
.product-specs .spec-row {
    background: #f7f9fc;
    border: 1px solid #e7ecf3;
    border-radius: 10px;
    padding: 8px 10px;
}
.product-specs dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7b8698;
    margin: 0 0 4px 0;
}
.product-specs dd {
    margin: 0;
    font-weight: 700;
    color: #111827;
    overflow-wrap: anywhere;
}
.product-order {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    justify-content: flex-start;
    text-align: right;
    height: 100%;
}
.products-list[data-layout="grid"] .product-order {
    align-items: stretch;
    text-align: left;
    gap: 6px;
}
.product-order .btn-primary {
    margin-top: auto;
    align-self: flex-end;
}
.products-list[data-layout="grid"] .product-order .btn-primary {
    align-self: stretch;
}
.product-price {
    font-size: clamp(1.6rem, 1vw + 1rem, 2.1rem);
    font-weight: 800;
    color: #111827;
    line-height: 1.1;
}
.products-list:not([data-layout="grid"]) .product-price {
    font-size: clamp(2.2rem, 2vw + 1rem, 2.9rem);
}
.qty-control {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.78rem;
    color: #6b7280;
    width: 100%;
}
.products-list[data-layout="grid"] .qty-control { align-items: flex-start; }
.qty-field {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin-top: 0;
}
.qty-input {
    width: 64px;
    border: 1px solid #d1d8e4;
    border-radius: 8px;
    padding: 4px 6px;
    background: #f8fafd;
    text-align: center;
    font-weight: 600;
}
.qty-unit { color: #111827; font-weight: 600; }
.btn-primary.btn-wide { width: 100%; }
.products-list:not([data-layout="grid"]) .product-order .btn-primary {
    min-width: 230px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #155eef;
    background: #155eef;
    color: #ffffff;
    box-shadow: none;
    transition: background .12s ease, border-color .12s ease;
}
.products-list:not([data-layout="grid"]) .product-order .btn-primary:hover {
    background: #0e4fd6;
    border-color: #0e4fd6;
    transform: none;
}

/* ===============================
   Design tokens: colors & radii
   =============================== */
:root {
    /* Brighter brand blues */
    --brand: #C99F72;      /* vivid cyan-blue */
    --brand-600: #ffffff;  /* darker hover/active */
    /* Brand wordmark sizes */
    --brand-size: 52px;      /* desktop */
    --brand-size-sm: 34px;   /* <= 640px */
    --brand-size-xs: 28px;   /* <= 420px */

    /* removed red brand logo background */
    /* Fine-tune header row vertical position */
    --header-row-offset-y: 2px;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --text: #0b1220;
    --muted: #6b7280;
    --border: #e5e7eb; /* neutral gray borders */
    --radius-ctrl: 10px; /* default corner radius for inputs/buttons */
    --radius-card: 12px; /* default corner radius for cards/rows */
    /* Shadow/elevation tokens */
    --shadow-sm: 0 2px 8px rgba(16,24,40,0.06);
    --elev-2: 0 6px 14px rgba(16,24,40,0.08), 0 2px 6px rgba(16,24,40,0.06);
    --elev-3: 0 10px 22px rgba(16,24,40,0.10), 0 4px 10px rgba(16,24,40,0.08);
    --elev-4: 0 12px 28px rgba(16,24,40,0.12), 0 6px 16px rgba(16,24,40,0.10);
    /* Sticky offset under header (with no topbar) */
    --header-sticky-offset: 96px;
}

/* Smooth scroll by default (honors reduced-motion override below) */
html { scroll-behavior: smooth; }

/* Layout: make footer stick to the bottom when content is short */
html, body {
    height: 100%;
    margin: 0;
}
body.layout-flex {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.layout-flex .footer { margin-top: auto; }

body {
    background: #ffffff;
    font-family: 'Lato', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
}

/* Global link underline tuning (applies wherever underline is used) */
a { text-underline-offset: 2px; text-decoration-thickness: 1.5px; text-decoration-skip-ink: auto; }
a:hover { text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* Thin topbar above header */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; background: rgba(0,0,0,0.88); color: var(--brand-600); border-bottom: 1px solid #C99F72; font-size: 13px; transition: transform .38s cubic-bezier(.22,.61,.36,1), opacity .34s ease-out; will-change: transform; height: 33px; }
body.theme-b2b .topbar { background: rgba(0,0,0,0.88); color: var(--brand-600); border-bottom-color: rgba(0,153,255,0.35); }
.topbar a { color: var(--brand); }
.topbar-inner { display:flex; align-items:center; justify-content: space-between; height: 33px; }
.topbar .lang-switch { display:flex; gap:8px; align-items: center; }
/* Language dropdown */
.topbar .lang-dropdown { position: relative; }
.topbar .lang-toggle { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 2px 10px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.topbar .lang-toggle:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.55); }
.topbar .lang-menu { position: absolute; top: 120%; left: 0; min-width: 140px; background: rgba(10, 16, 28, 0.98); color: #fff; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; padding: 6px; margin: 0; list-style: none; display: none; box-shadow: 0 12px 28px rgba(0,0,0,0.35); z-index: 1200; backdrop-filter: saturate(140%) blur(6px); -webkit-backdrop-filter: saturate(140%) blur(6px); }
.topbar .lang-menu.show { display: block; }
.topbar .lang-item { width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .12s ease, color .12s ease; }
.topbar .lang-item:hover { background: rgba(255,255,255,0.10); }
.topbar .lang-item.active { background: rgba(255,255,255,0.18); }
.topbar .lang-item:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
/* Hidden state: slide topbar out on scroll down */
.topbar.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
/* Ensure header remains below the visual topbar position (JS updates --topbar-h to 0 when hidden) */
/* Language pill buttons in acid blue */
.topbar .lang-btn { background: transparent; color: rgba(255,255,255,0.8); border: 1px solid rgba(255, 255, 255, 0.863); border-radius: 999px; padding: 2px 10px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.topbar .lang-btn:hover { background: rgba(0,153,255,0.10); border-color: var(--brand); color: var(--brand); }
.topbar .lang-btn.active { background: rgba(255, 90, 90, 0.164); border-color: var(--brand); color: var(--brand-600); }
/* Favorites button styled to match */
.topbar .fav-btn { background: transparent; color: #ffffff; border: none; border-radius: 0; padding: 0; font-weight: 700; cursor: pointer; display: inline; transition: color .12s ease, opacity .12s ease; }
.topbar .fav-btn .fav-label { margin-right: 0; }
.topbar .fav-btn:hover { background: transparent; border-color: transparent; color: #ffffff; text-decoration: underline; }
/* Remove star icon completely */
.topbar .fav-btn::before { content: none !important; }

/* (reverted) removed topbar underlay */

/* Header sits directly under the topbar; JS updates --topbar-h */
body.has-topbar .header { top: var(--topbar-h, 33px); }
/* Padding for content is handled by JS (topbar + header) */
body.has-topbar { padding-top: calc(var(--topbar-h, 33px) + var(--header-h, 84px)); }
/* Smoothly animate padding so header shift feels softer */
/* Do not animate layout padding to avoid spring effect at the top */
/* Smoothly adjust layout padding so topbar reveal/hide doesn't jerk content */
body { transition: none; }
/* Increase sticky offset when topbar is present and visible */
body.has-topbar { --header-sticky-offset: 129px; }

/* Let pages place content under fixed header; JS updates these */
:root { --header-h: 84px; --topbar-h: 33px; }
/* Breadcrumbs offset equals topbar + header when present */
:root { --breadcrumbs-offset: calc(var(--topbar-h, 33px) + var(--header-h, 84px)); }

/* When revealing topbar instantly at the very top, disable transitions briefly */
/* (removed) instant-topbar transitions override */

/* Контейнер для контента */
.container {
    max-width: 1320px; /* was 1200px: slightly wider layout */
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 16px;
}

/* Global page content container: match header container paddings and width */
.main-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Шапка */
.header {
    padding: 10px 0;
    min-height: 84px; /* reserve space for logo/search/auth */
    /* Simplified: flat light header without glass/blur */
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: fixed; left: 0; right: 0; width: 100%;
    top: var(--topbar-h, 33px);
    z-index: 1000;
    transition: top .38s cubic-bezier(.22,.61,.36,1), background .2s ease, border-color .2s ease, box-shadow .2s ease;
    will-change: top;
}
/* Header container padding is static; visual spacing handled by content */
header.header .container { padding-top: 0; }
/* Solid variant fallback when not transparent and not glass */
.header { background: #ffffff !important; border-bottom: 1px solid var(--border) !important; }
/* Remove transparent/glass variants: header is always solid and below topbar */
/* Ensure header content sits above anything behind it and is vertically centered */
.header > .container { position: relative; z-index: 1; padding-left: 20px; padding-right: 16px; display: flex; align-items: center; min-height: 84px; }

/* Glass highlights/shadows (non-interactive overlay) */
/* Remove decorative overlays for a cleaner header */
.header::before,
.header::after { content: none; display: none; }

.header-content { display:flex; align-items:center; gap:16px; transform: translateY(var(--header-row-offset-y)); width: 100%; }
/* Push auth block to the far right boundary */
.header-content .auth-buttons { margin-left: auto; }
/* Remove any inherited button margins in header to avoid right-edge offset */
.header .auth-buttons button { margin-left: 0 !important; margin-right: 0 !important; }
/* Ensure the last button doesn’t keep any trailing spacing */
.header .auth-buttons > *:last-child { margin-right: 0 !important; }
/* Make brand anchor hug its text size exactly */
.brand {
    display:inline-flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    white-space:nowrap;
    flex:0 0 auto;
    height: 44px; /* keep comfortable hit area without chip visuals */
    border-radius: 0;
    padding: 0;
    line-height: 1;
    background: transparent !important;
    border: none !important;
    color: var(--text);
}
/* Hover state for solid header */
.header .brand:hover { background: transparent !important; border-color: transparent !important; }
/* Text-based logo replacing SVG ensures no extra clickable area */
.brand-text { 
    display:inline-block; position:relative; z-index: 1;
    font-family: 'Lato', "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 900; font-style: normal;
    letter-spacing: -0.01em; line-height: 1;
    color: var(--text) !important; /* default dark text; overridden in transparent pill */
    text-transform: uppercase;
    -webkit-text-stroke: 0 !important; /* remove any stroke around letters */
    text-shadow: none !important;      /* remove any shadow outline */
}
/* Remove red slab entirely */
.brand-text::before { content: none !important; display: none !important; }
/* size */
.brand-text { font-size: var(--brand-size); padding: 0 6px; }
@media (max-width: 640px) { .brand-text { font-size: var(--brand-size-sm); } }
@media (max-width: 420px) { .brand-text { font-size: var(--brand-size-xs); } }

.home-icon { display:none; }

/* Header search: make the control itself shorter (input + blue button), not other header buttons */
.header .search-container { 
    /* более адаптивная ширина без переполнения */
    flex: 1 1 clamp(220px, 40vw, 560px);
    min-width: 0; /* разрешаем сжиматься внутри flex-строки, чтобы не вылезать вправо */
    position: relative; display: flex; align-items: stretch; 
    max-width: 560px; margin: 0 16px 0 28px; isolation: isolate; gap: 0 !important; 
    background:#fff; border:1px solid var(--border); border-radius:999px; overflow: visible; 
    box-shadow: 0px 0px 9px 4px rgb(0 0 0 / 14%);
    align-self: center;
}
.header .search-container .search-input::placeholder { color: #9CA3AF; }
@media (max-width: 420px) {
    .header .search-container { width: 100%; flex: 1 1 auto; margin: 0 8px; }
}
.header .search-container:focus-within {
    /* Нейтральное (серое) кольцо + базовая тень контейнера */
    box-shadow: 0 0 0 2px rgba(145, 158, 171, 0.35), 0px 0px 9px 4px rgb(0 0 0 / 14%);
    border-radius: 999px;
    border-color: #cfd8e3; /* светло-серый тон возле рамки */
}

/* Предпочитаем показывать синее кольцо только при клавиатурном фокусе */
@supports selector(.x:has(:focus-visible)) {
        /* Для любых фокусов (мышь/тач) оставляем только базовую тень */
        .header .search-container:focus-within { box-shadow: 0px 0px 9px 4px rgb(0 0 0 / 14%); }
        /* При клавиатурном фокусе — добавляем нейтральное серое кольцо поверх базы */
    .header .search-container:has(:focus-visible) { box-shadow: 0 0 0 2px rgba(145,158,171,0.55), 0px 0px 9px 4px rgba(51, 51, 51, 0.452); }
}

/* Избегаем двойного синего контура внутри поиска — используем кольцо контейнера */
.header .search-container :is(.search-input, .search-btn):focus-visible { outline: none; }

.search-input {
    flex: 1 1 0%; width: 100%; min-width: 0; height: 44px; padding: 10px 0 10px 14px; box-sizing: border-box; grid-column: 1 / 2; line-height: 1.2;
    border: none !important; /* исключаем внутреннюю рамку */
    border-radius: 999px 0 0 999px; font-size: 15px;
    transition: box-shadow .16s ease, border-color .16s ease;
    background: transparent !important; /* не закрашиваем фон внутри контейнера */
    box-shadow: none !important; /* исключаем внутреннюю тень */
    -webkit-appearance: none; appearance: none; /* убираем дефолтный вид */
    position: relative; margin: 0; max-width: none; display: block; grid-column: 1 / 2;
}

.search-input:focus { outline: none; box-shadow: none; }
/* Keep focus from changing size/metrics; only suppress outlines */
.header .search-container .search-input:focus { border-radius: 999px 0 0 999px; box-shadow: none; }

/* Button continues input (no gap, same height) */
.header .search-container > .search-btn { position: relative; height: 44px; width: 56px; min-width: 56px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent !important; color: var(--text) !important; border: none; border-radius: 0 999px 999px 0; cursor:pointer; transition: color .16s ease; box-shadow: none; margin: 0; flex: 0 0 auto; grid-column: 2 / 3; }
.header .search-container > .search-btn::before { content: none; }
.header .search-container > .search-btn { margin-left: 0 !important; }
.header .search-container .search-input { margin-right: 0 !important; border-right: 0 !important; padding-right: 0 !important; }
.header .search-container > .search-btn .search-icon { width: 20px; height: 20px; display: inline-block; }
/* Thicker magnifying glass stroke */
/* Stroke widths set in SVG for crisp alignment */
.header .search-container > .search-btn:hover { background: transparent !important; color: #c99f72 !important; filter: none !important; }

.auth-buttons { display:flex; gap:10px; align-items:center; }
.header .auth-buttons { align-self: center; }
/* Ensure all header blocks sit on the same vertical center */
.header .brand { align-self: center; }
.header .auth-buttons button,
.header #cartBtn { height: 44px; display: inline-flex; align-items: center; }

/* Ensure profile is left, cart is right within auth-buttons */
.auth-buttons .profile-wrapper { order: 0; }
#cartBtn { order: 1; }

/* Slider should blend into the band without visible separation */
.slider { box-shadow: none; }
.slider:hover { box-shadow: none; }

/* Slider image passes under the fixed header only at top (transparent header) */

/* Slider is below the header; no extra top padding needed */
.slider-container { margin-top: 0 !important; padding-top: 0; transition: none; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .topbar,
    .header,
    body,
    .slider-container { transition: none !important; }
}

/* Slider sits below the fixed header; no special overlap behavior */

/* унифицированная кнопка в шапке уже настроена выше; здесь оставляем тонкую корректировку */
.auth-buttons button { padding:9px 12px; background:#ffffff; color: var(--brand); border:1px solid #cfe1ff; border-radius:10px; cursor:pointer; font-weight:600; transition: background .15s, color .15s, border-color .15s, box-shadow .12s; box-shadow: 0 2px 8px rgba(16,24,40,0.06); }
.auth-buttons button:hover { background:#eef5ff; color: var(--brand); border-color: #bcd6ff; box-shadow: 0 6px 16px rgba(16,24,40,0.10); }
.theme-toggle { display:none !important; }

/* (removed) AI button styles and assistant FAB overrides */

/* cart icon styles removed — using text button Корзина (N) */

/* Слайдер */
.slider-container {
    padding-left: 0; /* keep horizontal padding collapsed */
    padding-right: 0;
    position: relative;
    /* allow edge shadows to extend beyond the band */
    overflow: visible;
}

/* Background band removed per request: no ::before/::after overlays */

/* Keep content layout unaffected */
.slider-container > .container { position: relative; z-index: 1; max-width: none; width: 100%; padding-left: 0; padding-right: 0; }

/* No mobile variant needed after background removal */

.slider {
    width: 100%;
    height: 550px; /* increased height */
    overflow: hidden;
    position: relative;
    border-radius: 0; /* edge-to-edge */
    border: none; /* remove outline */
}
/* Mobile-friendly slider height to reduce top/bottom crop */
@media (max-width: 768px) {
    .slider { height: min(60vh, 420px); }
}
@media (max-width: 600px) {
    .slider { height: min(60vh, 360px); }
}

/* Wedge removed as a colored layer — the left area now reveals only the background behind the slider */

/* Sliding carousel layout */
.slider { position: relative; touch-action: pan-y; user-select: none; }
.slider .slider-track {
    position: absolute; inset: 0;
    display: flex; height: 100%; width: 100%;
    transition: transform .45s ease;
    will-change: transform;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
}
.slide {
    width: 100%;
    height: 100%;
    position: relative;
    flex: 0 0 100%;
    opacity: 1;
    transition: none;
    background-size: cover;
    background-position: center;
    z-index: 2;
    -webkit-clip-path: none;
            clip-path: none;
}

/* Inner shadow cast from the cut onto the slide */
.slide::before { content: none; }

.slider.dragging { cursor: grabbing; }

/* Keep arrows and indicators above content */
.slider .slider-arrow { z-index: 4; position: absolute; }
/* Reset left arrow position after removing cut */
.slider .left-arrow { left: 35px !important; }
/* Arrow base style (moved from inline styles) */
.slider .slider-arrow { top: 50%; transform: translateY(-50%); background: transparent; color: #000; border: none; border-radius: 0; width: auto; height: auto; padding: 4px 6px; font-size: 35px; cursor: pointer; box-shadow: none; }
.slider .slider-arrow:hover, .slider .slider-arrow:focus { background: transparent; color: #000; outline: none; }
.slider .right-arrow { right: 35px; }
/* Enlarge hit area and add clear focus for accessibility */
.slider .slider-arrow { min-width: 44px; min-height: 44px; padding: 8px 10px; }
.slider .slider-arrow:focus-visible { outline: 3px solid rgba(59,130,246,0.8); outline-offset: 2px; }

/* Move indicators to bottom-right of the slider */
.slider-container .slider-indicators {
    display: flex;
    justify-content: flex-end !important;
    gap: 8px;
    position: absolute;
    right: 72px; /* leave room for right arrow */
    bottom: calc(24px + 12px); /* inside white card: container bottom padding + inset */
    margin: 0;
    z-index: 5;
}
/* Indicator dot styles (moved from inline) */
.slider-container .slider-indicators .indicator { width: 12px; height: 12px; margin: 0 5px; background: #ccc; border-radius: 50%; cursor: pointer; transition: background .3s; border: none; padding: 0; display: inline-block; }
.slider-container .slider-indicators .indicator.active { background: #4a4e4c; }
.slider-container .slider-indicators .indicator:focus-visible { outline: 3px solid rgba(59,130,246,0.8); outline-offset: 2px; }

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    .slide { transition: none; }
    .slider .slider-track { transition: none !important; }
}

/* Site-wide reduced motion: minimize animations and transitions */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* skip-link removed by request */

@media (max-width: 768px) {
    .slide { -webkit-clip-path: none; clip-path: none; }
    .slide::before { content: none; }
    .slider .left-arrow { left: 18px !important; }
    .slider-container .slider-indicators { position: absolute; top: auto; right: 56px; bottom: calc(24px + 12px); }
}

/* Категории */
.categories {
    padding: 0;
    margin: 32px 0 24px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    justify-content: start;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Skeleton placeholders to reserve layout before data loads */
.categories-grid .category-skel {
    height: 300px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
    background-size: 400% 100%;
    animation: skel 1.2s ease-in-out infinite;
    border: 1px solid #e4e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15,21,35,0.08);
}
@keyframes skel {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
    }
}

/* Gap handles separation; no edge hacks */

.category-box {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e4e8f0;
    transition: background-color 0.15s ease, transform 140ms ease, box-shadow 140ms ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 24px rgba(15,21,35,0.08);
    transform-style: preserve-3d;
    position: relative;
    will-change: transform;
}

/* Inner layer for subtle motion */
.category-box-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 140ms ease;
}
.category-box.is-hover { box-shadow: none; z-index: auto; }
.category-box.is-hover .category-box-inner { transition: transform 40ms linear; }

/* Keep tile fixed on hover to avoid jumping; only image animates */
.category-box:hover { background-color: #fafbfe; transform: none; box-shadow: none; }
/* On hover, also give a subtle image motion */
.category-box:hover .category-image { transform: none; }

.category-title {
    padding: 14px 12px;
    /* Glass background */
    background: rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    backdrop-filter: saturate(160%) blur(8px);
    border: 1px solid rgba(157,157,157,0.18);
    font-weight: 600;
    text-align: center;
    color: #0b1220;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
/* On tile hover, accent the title color */
.category-box:hover .category-title {
    color: #ffffff;
    background: rgb(201, 159, 114);
    border-color: rgba(71, 54, 35, 0.63);
}
/* Dark theme: slightly stronger tint for contrast */
body.theme-dark .category-box:hover .category-title {
    background: rgba(201, 159, 114, 0.22);
    border-color: rgba(201, 159, 114, 0.55);
}

.category-image {
    flex-grow: 1;
    height: 250px;
    /* For <img class="category-image"> use case */
    width: 100%;
    display: block;
    object-fit: contain; /* prevent distortion, show full image */
    background-color: #fff;
    /* For <div class="category-image" style="background-image:..."> use case */
    background-size: cover;
    background-position: center;
    transition: transform 220ms ease;
}

/* Stabilize tile layout to avoid content shift while images load */
.categories-grid .category-box,
.subcategories-grid .subcategory-box {
    /* Reserve a minimum height approximating image + title area */
    min-height: 340px;
}

/* Reserve the image aspect ratio so browsers can allocate space before the image arrives */
.category-image, .subcategory-image {
    width: 100%;
    aspect-ratio: 16/10; /* reserves height even without intrinsic image dims */
    object-fit: cover; /* crop sensibly to fill the reserved box */
    display: block; /* remove inline gaps */
    background-color: #f3f4f6; /* neutral placeholder while loading */
}

/* If an <img> element is used, ensure it fills the reserved box */
.category-image[src], .subcategory-image[src], .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Subcategory/product grid images loaded as <img> elements */
.subcategory-image {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: contain; /* keep proportions, no crop */
    background-color: #fff;
}
/* Breadcrumbs */
.category-box.is-hover .category-image { transform: none; }
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    /* tighter vertical spacing above/below breadcrumbs site-wide */
    padding: 4px 0 6px 0;
    color: var(--muted);
    font-size: 14px;
    /* keep breadcrumbs clear of the fixed header area */
    margin-top: var(--breadcrumbs-offset, 0px);
}
/* Catalog pages: no top margin for breadcrumbs */
.subcategory-page .breadcrumbs{ margin-top: 0 !important; }
.group-page .breadcrumbs{ margin-top: 0 !important; }
.breadcrumb-link {
    color: var(--brand-600);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb-link:hover {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}
.breadcrumb-sep {
    color: #c0c6d4;
}
.breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

/* Модальное окно - оверлей */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

/* Модальное окно */
.modal {
    display: none;
    background: white;
    border-radius: 15px;
    box-shadow: 0 24px 64px rgba(16,24,40,0.18), 0 10px 22px rgba(16,24,40,0.12);
    width: 400px;
    max-width: 90%;
    padding: 0;
    overflow: hidden;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    border-radius: 15px;
    box-shadow: 0 18px 48px rgba(16,24,40,0.14), 0 8px 18px rgba(16,24,40,0.10);
}

.modal-overlay.show .modal {
    display: block;
    transform: scale(1);
}

.modal h2 {
    margin: 0 0 30px 0;
    text-align: center;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
    padding: 30px 30px 0 30px;
}

.modal form {
    padding: 0 30px 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal input {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.2; /* keep height steady */
    background: #f8f9fa;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    box-sizing: border-box; /* keep width stable */
}

.modal input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
}
/* Ensure password field inside modal doesn't shrink on focus */
.modal input[type="password"]:focus {
    padding: 15px; /* same as .modal input */
    font-size: 16px; /* same as .modal input */
    line-height: 1.2;
    border-width: 1px; /* don't let UA bump border */
}

.modal input::placeholder {
    color: #6c757d;
}

.modal button[type="submit"] {
    background: #047857; /* emerald-700 */
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.modal button[type="submit"]:hover {
    background: #065F46; /* emerald-800 */
}

.modal-links {
    padding: 0 30px 30px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.modal-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Кнопка закрытия модального окна */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
    .modal {
        width: 95%;
        margin: 20px;
    }
    
    .modal-nav-arrow {
        font-size: 2rem;
        padding: 15px;
    }
    
    .modal-nav-arrow.left {
        left: 20px;
    }
    
    .modal-nav-arrow.right {
        right: 20px;
    }
    
    .modal h2 {
        font-size: 1.3rem;
    }
    
    .modal input {
        padding: 12px;
        font-size: 14px;
    }
    
    .modal button[type="submit"] {
        padding: 12px;
        font-size: 14px;
    }
}

/* Стили для выпадающих меню */
.dropdown-menu {
    background: #fff;
    color: #222;
    box-shadow: var(--elev-4);
    border-radius: 12px;
    padding: 12px; /* equal inset from all edges */
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* space between items */
    z-index: 9999;
    border: 1px solid #e0e0e0;
    position: absolute;
    /* scaled down by 30% (0.7 * previous sizes) to make the popup visually smaller */
    min-width: 154px; /* 220px * 0.7 */
    width: 21%; /* 30% * 0.7 = 21% */
    max-width: 294px; /* 420px * 0.7 */
    box-sizing: border-box;
    pointer-events: auto;
    right: 0;
    left: auto;
    top: 100%;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: visible; /* allow separators or shadows to render outside safely */
}

/* Visible state for dropdowns (used by Cart). Without this, opacity stays 0. */
.dropdown-menu.show { opacity: 1; transform: translateY(0); }


/* Profile dropdown styles moved to css/dropdowns.css */

/* New markup: inner wrapper gives consistent inset for actionable buttons */
/* Redundant profile-specific dropdown-menu item rules removed to avoid duplication. */

.dropdown-menu h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    padding: 0 20px;
    color: #333;
}

.dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0 20px;
}

.dropdown-menu li {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.dropdown-menu .remove-from-cart {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.dropdown-menu .remove-from-cart:hover {
    background: #f8f9fa;
}

.dropdown-menu .cart-empty {
    color: #6c757d;
    padding: 20px;
    text-align: center;
    font-style: italic;
}

.dropdown-menu .cart-action-btn {
    width: calc(100% - 32px);
    margin: 12px 16px 8px 16px;
    padding: 10px 0;
    background: #047857; /* emerald-700 */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    justify-content: center;
}

.dropdown-menu .cart-action-btn:hover {
    background: #065F46; /* emerald-800 */
}

.dropdown-menu .cart-action-btn[disabled] {
    background: #6c757d;
    color: #fff;
    cursor: not-allowed;
}

.dropdown-menu .cart-action-btn[disabled]:hover {
    background: #6c757d;
}

/* Профиль: текст с подчеркиванием как у ссылки, но по центру по вертикали */
#profileBtn {
    /* Render as text inside a pill wrapper, keep button semantics */
    -webkit-appearance: none; appearance: none;
    background: transparent !important;
    color: #000 !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 0 2px !important;
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1; /* tighter line height for centering */
    box-shadow: none !important;
    outline: none !important;
    display: inline-flex; align-items: center; justify-content: center; /* align within wrapper */
    min-height: 0 !important;
    text-decoration: none !important;
    cursor: pointer;
}
.profile-btn-label { display: inline-flex; align-items: center; }
.profile-notification-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
}
#profileBtn::after { content: none !important; }
#profileBtn:hover, #profileBtn:active, #profileBtn:focus {
    background: transparent !important;
    color: #c99f72 !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
}
#profileBtn:hover *, #profileBtn:active *, #profileBtn:focus * {
    color: #c99f72 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}
/* Remove global focus ring on this specific control to keep it text-like */
#profileBtn:focus-visible { outline: none !important; box-shadow: none !important; }

/* Profile dropdown layout */
.auth-buttons .profile-wrapper { position: relative; }
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(15, 21, 35, 0.18);
    padding: 12px;
    z-index: 1200;
    display: none;
}
.profile-dropdown.show { display: block; }
.profile-dropdown .dropdown-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-dropdown .dropdown-btn {
    border: none;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    color: #111827;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.profile-dropdown .dropdown-btn:hover {
    background: #f7f9fc;
    color: #0b1220;
}
.profile-dropdown .dropdown-btn.danger {
    color: #b91c1c;
}
.profile-dropdown .dropdown-btn.danger:hover {
    background: #fef2f2;
}

/* Flat cart button with black icon and inline count */
#cartBtn.cart-flat {
    background: transparent !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: #000 !important; /* icon + text black */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px !important; /* larger click area */
    font-weight: 600;
    font-size: 16px !important; /* larger label */
    min-height: 40px;
}
#cartBtn.cart-flat:hover {
    background: transparent !important;
    color: inherit !important; /* don't tint all text/icons via currentColor */
    border-color: transparent !important;
    box-shadow: none !important;
}
#cartBtn.cart-flat:active { color: #000 !important; }
#cartBtn.cart-flat:focus { outline: none !important; box-shadow: none !important; }
#cartBtn.cart-flat .cart-icon { width: 28px; height: 28px; display: inline-block; transition: color .15s ease, filter .12s ease; }
#cartBtn.cart-flat.active .cart-icon { color: var(--brand) !important; }
#cartBtn.cart-flat .cart-count-text { font-size: 16px; line-height: 1; }

/* keep default button style for others */

/* Улучшенные стили для кнопок в шапке */
.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.auth-buttons button {
    padding: 9px 12px;
    background: #103655;
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
}

.auth-buttons button:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
    border-color: rgba(255,255,255,.35);
}

/* Make profile wrapper a pill in solid header */
.auth-buttons .profile-wrapper {
    display: grid; /* simpler perfect centering */
    place-items: center;
    line-height: 1;
    height: 44px;
    padding: 0 12px; /* horizontal only to avoid optical sinking */
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.auth-buttons .profile-wrapper:hover {
    background: #f7f9fc;
    border-color: #dbe1ea;
}

/* Стили для поисковой шторки */
.search-container {
    flex-grow: 1;
    display: flex;
    gap: 10px;
    position: relative;
}

/* В шапке поиск — это единый контрол (input + кнопка) — используем 2-колоночную grid,
   чтобы кнопка упиралась в правый край БЕЗ лишнего хвоста. */
.header .search-container {
    display: grid !important;
    grid-template-columns: 1fr auto !important; /* поле тянется, кнопка ровно у правого края */
    align-items: stretch !important;
    gap: 0 !important;
    cursor: text; /* клик в белой зоне ожидаемо переводит фокус в поле */
}
.header .search-container > .search-btn { cursor: pointer; }

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: var(--elev-4);
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 0;
    display: none;
    transition: box-shadow .15s ease, transform .12s ease;
}

.search-dropdown.show {
    display: block;
}

.search-section {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    margin: 0;
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-item:hover {
    background: #f8f9fa;
}

.search-item-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.search-item-content {
    flex: 1;
}

.search-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0 0 2px 0;
}

.search-item-path {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.search-loading {
    padding: 20px 16px;
    text-align: center;
    color: #6c757d;
}

/* Подсветка совпадений в поиске */
.search-highlight {
    background: #fff3cd;
    font-weight: 600;
    padding: 1px 2px;
    border-radius: 2px;
}

/* Дополнительные стили для корзины */
.cart-dropdown {
    /* Make the cart panel 2x wider; anchored to the right so it grows to the left */
    width: 800px !important;
    min-width: 800px !important;
    max-width: 800px !important;
    padding: 20px 0 0 0; /* only top padding */
}

.cart-dropdown h2 {
    color: #333 !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px !important;
    margin-bottom: 12px !important;
}

.cart-dropdown ul {
    max-height: 200px;
    overflow-y: auto;
}

/* Screenshot-like cart layout */
.cart-dropdown .cart-list-v2 { list-style: none; margin: 0; padding: 0 16px; }
.cart-dropdown .cart-item-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #eee; }
.cart-dropdown .cart-item-row:last-child { border-bottom: none; }
.cart-dropdown .ci-left { display: flex; align-items: flex-start; gap: 12px; }
.cart-dropdown .ci-thumb { width: 48px; height: 48px; background: #e9edf5; border-radius: 6px; flex-shrink: 0; }
.cart-dropdown img.ci-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.cart-dropdown .ci-meta { display: flex; flex-direction: column; gap: 6px; }
.cart-dropdown .ci-title-text { font-weight: 600; color: #111827; font-size: 14px; }
.cart-dropdown .ci-title { height: 14px; width: 220px; background: #f1f4fa; border-radius: 4px; }
.cart-dropdown .ci-sku, .cart-dropdown .ci-stock, .cart-dropdown .ci-attr { height: 12px; background: #f6f7fb; border-radius: 4px; }
.cart-dropdown .ci-sku.short, .cart-dropdown .ci-stock.short { width: 120px; }
.cart-dropdown .ci-attr.medium { width: 180px; }
.cart-dropdown .ci-qty { text-align: right; }
.cart-dropdown .ci-qty-input { width: 64px; }
.cart-dropdown .ci-right { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: center; column-gap: 8px; row-gap: 2px; }
.cart-dropdown .ci-right .ci-price-text { grid-column: 1; }
.cart-dropdown .ci-right .ci-sub-text { grid-column: 1; text-align: right; margin-top: 0; }
.cart-dropdown .ci-right .remove-from-cart { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.cart-dropdown .ci-price-text { font-weight: 600; color: #111827; font-size: 13px; }
.cart-dropdown .ci-sub-text { color: #6b7280; font-size: 12px; }
.cart-dropdown .ci-price { height: 14px; width: 64px; background: #f1f4fa; border-radius: 4px; }
.cart-dropdown .ci-sub { height: 12px; width: 120px; background: #f6f7fb; border-radius: 4px; }
.cart-dropdown .skel { position: relative; overflow: hidden; }
.cart-dropdown .skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(0,0,0,0.06), rgba(255,255,255,0)); animation: skel 1.2s infinite; }
@keyframes skel { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.cart-dropdown .skel.wide { height: 16px; width: 96px; background: #f1f4fa; border-radius: 4px; }
.cart-dropdown .skel.medium { height: 12px; width: 80px; background: #f6f7fb; border-radius: 4px; }

.cart-dropdown .cart-footer { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: transparent; border-top: 1px solid #e5e7eb; border-radius: 0 0 12px 12px; gap: 12px; }
.cart-dropdown .cart-footer-left { display: inline-flex; align-items: center; gap: 12px; padding: 0; margin: 0; line-height: 0; background: transparent; }
.cart-dropdown .cart-checkout-btn { margin: 0; }
.cart-dropdown .cart-checkout-btn {
    background: #ccc; color: #fff; border: none; border-radius: 8px;
    padding: 10px 14px; cursor: pointer; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1; appearance: none;
    position: relative; overflow: hidden;
    outline: none; box-shadow: none; transform: none;
}
.cart-dropdown .cart-checkout-btn:hover,
.cart-dropdown .cart-checkout-btn:focus {
    background: #ccc !important; color: #fff !important;
    box-shadow: none !important; outline: none !important; transform: none !important;
}
.cart-dropdown .cart-empty-link { 
    background: transparent; border: none; color: #6b7280; text-decoration: underline; cursor: pointer; 
    padding: 0; box-shadow: none; outline: none; 
    font-size: 12px; line-height: 1.2; white-space: nowrap; display: inline-block; flex: 0 0 auto; align-self: flex-end;
}
.cart-dropdown .cart-empty-link:hover, .cart-dropdown .cart-empty-link:focus { color: #6b7280; text-decoration: underline; background: transparent; }
.cart-dropdown .cart-footer-right { text-align: right; color: #111827; }
.cart-dropdown .cart-total-main { font-weight: 800; }
.cart-dropdown .cart-total-sub { font-size: 12px; color: #6b7280; }

.cart-dropdown li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-dropdown li:last-child {
    border-bottom: none;
}

.cart-dropdown .remove-from-cart {
    font-size: 16px !important;
    padding: 0 6px !important; /* horizontal only */
    border-radius: 4px !important;
    height: 100%; /* fill pill height for perfect centering */
    color: #000 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transition: opacity .12s ease !important;
}

.cart-dropdown .remove-from-cart:hover,
.cart-dropdown .remove-from-cart:focus {
    background: transparent !important;
    color: #000 !important;
    opacity: 0.75;
    outline: none !important;
    box-shadow: none !important;
}

/* Qty input and actions */
.cart-dropdown .cart-item-actions { display: inline-flex; gap: 8px; align-items: center; }
.cart-dropdown .cart-qty-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #d0d7e2;
    border-radius: 6px;
    font-size: 14px;
}

/* +/- buttons */
/* removed qty +/- buttons, mini-summary, and clear-cart button styles */

/* Removed old centering rule for #goToCheckout to keep the hit area equal to the visual button size */
/* .cart-dropdown #goToCheckout { display:block; margin:16px auto; width: calc(100% - 32px); } */

/* Product list card styles */
.fav-toggle { background: none; border: 1px solid rgba(0,0,0,0.2); width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, border-color .12s; position: relative; overflow: hidden; }
.fav-toggle:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.35); }
.fav-icon { font-size: 18px; line-height: 1; transition: transform .18s ease, color .18s ease; }
.fav-icon.hearted { color: #D4AF37; } /* золотая звезда */
.fav-icon.outline { color: #000; } /* черный контур */

/* Поп-анимация для звезды при переключении */
@keyframes fav-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.fav-icon.anim-pop { animation: fav-pop 200ms ease-in-out; }

/* Пульс для звезды при активном состоянии */
@keyframes fav-pulse { 0%{transform:scale(1)} 40%{transform:scale(1.12)} 100%{transform:scale(1)} }
.fav-icon.hearted.anim-pulse { animation: fav-pulse 600ms ease-in-out; }

/* Лёгкая волна (ripple) на кнопке */
.btn-wave { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 999px; pointer-events: none; transform: translate(-50%,-50%) scale(0); opacity: .25; background: rgba(212,175,55,0.25); animation: ripple-wave 450ms ease-out; }
@keyframes ripple-wave { to { transform: translate(-50%,-50%) scale(6.2); opacity: 0; } }

/* Primary button: blue with white text (used for "В корзину") */
.btn-primary {
    background: #0d6efd;
    color: #fff;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(13,110,253,0.25);
    transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}
.btn-primary:hover { background: var(--brand); border-color: var(--brand); box-shadow: 0 4px 10px rgba(0,153,255,0.28); }
.btn-primary:active { background: #0a58ca; border-color: #0a58ca; transform: translateY(1px); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.product-img {
    width: 140px;
    height: 120px;
    object-fit: contain;
}
.product-name { font-weight: 600; margin-top: 8px; text-align:center }
.product-price { color: #0b1220; font-weight:800; margin-top:6px; font-size: 2.8rem; line-height: 1.1; }
.product-actions { margin-top: 10px; display:flex; gap:8px }
.btn-primary { border-radius:8px; padding:8px 12px; border:none }
.btn-ghost { background:transparent; border:1px solid var(--border); padding:8px 12px; border-radius:4px }
.btn-refined { 
    background: var(--brand-600); 
    color: #fff; 
}
/* Hover elevation for product cards */
.product-card:hover {
    /* keep card flat */
    transform: none;
    box-shadow: var(--elev-3);
    border-color: var(--border);
}
/* Animate product image instead of tile */
.product-card img { transition: none; will-change: auto; }
.product-card:hover img { transform: none; }

/* Make tiles and text inside them crisper and higher-contrast without forcing GPU compositing
   which can cause photo blurring on some devices/browsers. Keep sharpening for text only. */
.category-box, .product-card {
    backface-visibility: hidden;
    will-change: box-shadow;
    /* subtle but slightly stronger border so tiles read as distinct objects */
    border: 1px solid rgba(16,24,40,0.06);
}

.category-title, .subcategory-title, .product-title, .product-name {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: #0b1220; /* darker text for contrast */
    font-weight: 700;
    letter-spacing: 0.01em;
}

.product-desc { color: #374151; }

/* Slightly stronger hover elevation for clarity */
.category-box.is-hover, .product-card:hover {
    box-shadow: 0 12px 34px rgba(16,24,40,0.14);
}

/* Images: avoid forcing special rendering modes; prefer natural photo scaling and contain to preserve integrity */
.category-image, .subcategory-image, .product-img, .product-card img {
    image-rendering: auto;
    object-fit: contain; /* preserve whole image to avoid ugly crops that can look soft */
    width: 100%;
    height: auto;
}
.product-card .product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the fixed viewport inside cards */
}

/* Keep text crisp on B2B / dark themes as well */
body.theme-b2b .category-title, body.theme-b2b .product-name, body.theme-b2b .product-title { color: #07102a; }
body.theme-dark .category-title, body.theme-dark .product-name, body.theme-dark .product-title { color: var(--text); -webkit-font-smoothing: antialiased; }

/* =============================
   Refined B2B Theme Enhancements
   Applied when <body> has .theme-b2b
   ============================= */
body.theme-b2b {
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
}
body.theme-b2b .header {
    /* Flat light header in B2B as well */
    background: #ffffff38;
    border-bottom: 1px #ffffff00;
    box-shadow: none;
}
body.theme-b2b .home-icon {
    color: var(--brand);
    font-weight: 700;
}
body.theme-b2b .search-input {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px 0 0 999px;
}
body.theme-b2b .search-btn { border-radius: 0 999px 999px 0; box-shadow: none; }
body.theme-b2b .auth-buttons button,
body.theme-b2b #cartBtn { border-radius: 8px; padding: 10px 16px; }

/* Hide any empty profile pill to avoid an empty button */
.auth-buttons .profile-wrapper:empty { display: none !important; }

/* Header transparent: make search unobtrusive or hidden depending on layout */
/* Transparent mode: keep search and assistant button default styling */

/* Transparent header: keep simple white for text/icons */
/* Do not recolor individual controls in transparent mode */

/* Solid header: use normal dark text */
/* In solid mode, rely on default control colors from base styles */

/* iOS-style glass effect for transparent header (with graceful fallback) */
/* Remove special glass/backdrop tweaks in transparent mode */
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) { }

/* Profile pill in transparent header (like search/cart/brand) */
/* Remove profile pill special-casing in transparent mode */

/* Cards */
body.theme-b2b .product-card,
body.theme-b2b .cart-page-container {
    border-radius: 12px;
    /* Stronger default elevation for better visibility */
    box-shadow: 0 12px 28px rgba(16,24,40,0.10), 0 6px 14px rgba(16,24,40,0.08);
    border: 1px solid var(--border);
}

/* Theme B2B hover elevations so they are not overridden by later rules */
body.theme-b2b .product-card:hover {
    transform: none; /* keep tile still in B2B too */
    box-shadow: 0 18px 48px rgba(16,24,40,0.14), 0 8px 18px rgba(16,24,40,0.10);
}

/* Forms */
body.theme-b2b input[type="text"],
body.theme-b2b input[type="email"],
body.theme-b2b input[type="password"],
body.theme-b2b select, body.theme-b2b textarea {
    border-radius: 10px;
}
body.theme-b2b button[type="submit"],
body.theme-b2b .btn-primary {
    border-radius: 10px;
}

/* Dropdown menus */
body.theme-b2b .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12);
    border: 1px solid #e8ebf2;
}
body.theme-b2b .dropdown-menu .cart-action-btn {
    border-radius: 8px;
}

/* Modals */
body.theme-b2b .modal {
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
}
body.theme-b2b .modal button[type="submit"] {
    border-radius: 10px;
}

/* Breadcrumbs */
body.theme-b2b .breadcrumbs {
    background: transparent;
}
body.theme-b2b .breadcrumb-link { color: #C99F72; }
body.theme-b2b .breadcrumb-link:hover { color: var(--brand); }

/* Product actions */
body.theme-b2b .btn-ghost { border-radius: 8px; }
body.theme-b2b .btn-primary { border-radius: 8px; }

/* Dark theme removed (site is single-style). */

/* =============================
     Modern UI Overrides
     (appended to unify and refine visuals site-wide)
     ============================= */
/* Footer */
.footer { position: relative; background:
    /* soft top-center highlight */
    radial-gradient(160% 220% at 50% 38%, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 34%, rgba(255,255,255,0) 56%),
    /* deeper base velvet */
    radial-gradient(140% 200% at 50% 40%, #222222 0%, #222222 58%, #222222 100%),
    /* subtle horizontal depth */
    linear-gradient(90deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    color: #e6ecff; margin-top: 0; box-shadow: 0 -8px 24px rgba(0,0,0,0.1); }
/* Velvet overlay for footer: soft highlight + corner vignettes for depth */
.footer::before { display: none !important; content: none !important; }
/* removed footer ::before texture for velvet finish */
.footer .container { padding: 30px 20px 64px; position: relative; z-index: 1; }
.footer > .container { padding-bottom: 0; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2.8fr; gap: 24px; align-items: start; }
.footer-brand {
    font-weight: 900;
    font-family: 'Lato', "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 26px;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: .01em;
    /* make it plain text, not button-like */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline; /* behave like plain text */
    cursor: pointer;
}
.footer-brand:hover,
.footer-brand:active,
.footer-brand:focus {
    background: transparent !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.footer-brand:focus-visible { outline: 2px solid #ffffff !important; outline-offset: 3px; }
.footer-tagline { margin-top: 6px; color: #ffffff; font-weight: 600; font-size: 13px; opacity: .5; line-height: 0.5; }
.footer-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.footer-title { font-size: 12px; color: #C99F72; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px 0; font-weight: 800; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.footer-links :is(a, .footer-link-static) { color: #ffffff; text-decoration: none; font-weight: 600; font-size: 13px; line-height: 0.5; }
.footer-links a:hover { color: #ffffff; text-decoration: underline; }
.footer-link-static { opacity: .65; }
.footer-address { color: #ffffff; font-size: 13px; line-height: 1.3; }
.footer-bottom { 
    position: relative;
    width: 100%;
    border-top: none; 
    margin-top: 15px; 
    background: #222222;
    color: #C99F72; 
    font-size: 13.5px; 
    z-index: 0;
}
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; padding: 5px 20px; gap: 20px; max-width: 1320px; margin: 0 auto; }
.footer-bottom::before { content: none; display: none; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }
body.theme-dark .footer-bottom { 
    position: relative;
    background: #0f1523; color: var(--text);
}
body.theme-dark .footer-bottom::before { content: none; display: none; }
.footer-extra { opacity: .85; }

/* The catalog can contain arbitrary imported image URLs; keep their fallback quiet. */
img.image-fallback { background: #f3f4f6; }

/* Make the privacy link render as two tightly spaced lines */
.footer-links a[href="privacy.html"] {
    /* Match other footer links exactly so it doesn't stand out */
    display: inline; /* keep it text-like */
    margin: 0;
    padding: 0; /* remove any button padding */
    word-spacing: 0; letter-spacing: 0; vertical-align: middle;
    font-size: 13px; /* same as .footer-links a */
    font-weight: 600; /* same as .footer-links a */
    line-height: 1; /* tighter vertical gap between the two lines */
    background: transparent; border: none; border-radius: 0; /* ensure not button-like */
    color: #ffffff; text-decoration: none; /* same color as other footer links */
}
@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .footer-columns { grid-template-columns: 1fr; }
}
/* Typography helpers */
h1, .h1 { font-size: 2rem; font-weight: 800; color: var(--text); margin: 0 0 18px 0; }
h2, .h2 { font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0 0 14px 0; }
h3, .h3 { font-size: 1.1rem; font-weight: 600; color: var(--text); margin: 0 0 10px 0; }
.lead { font-size: 1.05rem; color: var(--muted); }
.text-muted { color: var(--muted) !important; }

/* Section gradient shadow utility for smooth block separation */
.section-shadow { position: relative; overflow: visible; }
.section-shadow::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -42px; /* render below the dark band, not on it */
    height: 100px;
    background: linear-gradient(
        to bottom,
        rgba(16,24,40,0.00) 0px,
        rgba(16,24,40,0.00) 48px,  /* keep invisible over the dark band overlap */
        rgba(16,24,40,0.14) 48px,
        rgba(16,24,40,0.08) 78px,
        rgba(16,24,40,0.00) 100%
    );
    border-radius: 0; /* avoid visible rounded edge on the band */
    pointer-events: none;
    z-index: 1;
}
/* Top-edge gradient shadow (for the next white section) */
.section-shadow-top { position: relative; overflow: visible; }
.section-shadow-top::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 18px; /* 3x shorter (56 -> 18) */
    /* 2x darker start, quick fade */
    background: linear-gradient(
        to bottom,
        rgba(16,24,40,0.44) 0%,
        rgba(16,24,40,0.15) 60%,
        rgba(16,24,40,0.00) 100%
    );
    pointer-events: none;
}
/* With no gaps, keep top-edge separator off for categories next to slider */
.slider-container + .categories.section-shadow-top::before { display: none !important; content: none !important; }
body.theme-dark .section-shadow-top::before {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.90) 0%,
        rgba(0,0,0,0.30) 60%,
        rgba(0,0,0,0.00) 100%
    );
}
body.theme-dark .section-shadow::after {
    background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0));
}

/* Buttons */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px; border-radius: 10px; border: 1px solid transparent; 
    font-weight: 600; cursor: pointer; transition: transform .08s, box-shadow .12s, background .12s, color .12s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand); color: #fff; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-ghost { background: transparent; border:1px solid var(--border); color: var(--brand); padding: 10px 12px; border-radius: 10px; }
.btn-success { background: #16a34a; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }

/* Accessible focus rings: consistent across interactive elements */
:where(a, button, [role="button"], input, select, textarea, .btn, .filter-select, .filter-chip, .breadcrumb-link, .lang-btn, .fav-btn, .search-btn):focus {
    outline: none; /* avoid double outlines */
}
:where(a, button, [role="button"], input, select, textarea, .btn, .filter-select, .filter-chip, .breadcrumb-link, .lang-btn, .fav-btn, .search-btn):focus-visible {
    outline: 3px solid rgba(0,153,255,0.6);
    outline-offset: 2px;
}
body.theme-dark :where(a, button, [role="button"], input, select, textarea, .btn, .filter-select, .filter-chip, .breadcrumb-link, .lang-btn, .fav-btn, .search-btn):focus-visible {
    outline-color: rgba(138,180,255,0.75);
}

/* Header buttons and theme toggle */
.auth-buttons { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.auth-buttons button { 
    background: #fff; color: var(--brand); border: 1px solid var(--brand); 
    border-radius: 10px; padding: 9px 14px; font-weight: 600; 
    transition: background .12s, color .12s, transform .08s, box-shadow .12s;
}
.auth-buttons button:hover { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(26,35,126,.18); }
/* In header, keep auth buttons backgroundless on hover (except AI) */
.header .auth-buttons button:hover { 
    background: transparent !important; 
    border-color: transparent !important; 
    box-shadow: none !important; 
    color: #c99f72 !important; 
}
.theme-toggle { 
    background: #fff; border: 1px solid var(--border); color: #333; border-radius: 10px; 
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; 
}
.theme-toggle:hover { background: #f5f7fb; }

/* ===============================
    Unified radii for controls/cards
    =============================== */
.btn, .btn-primary, .btn-ghost, .filter-select, input, select, textarea { border-radius: var(--radius-ctrl) !important; }
.product-card, .subcategory-box, .cart-page-container, .modal { border-radius: var(--radius-card) !important; }

/* Final guard: keep header action button sizing intact */
.header .auth-buttons button { 
    padding: 9px 14px; 
    font-size: 14px; 
}

/* Remove legacy left margins in header buttons — spacing is handled by flex gap */
.header .auth-buttons button { margin-left: 0 !important; }

/* Stretch right group; keep a small gap from search, and push cart to the far right */
.header .auth-buttons { margin-left: auto; flex: 0 0 auto; align-self: center; margin-bottom: 0; justify-content: flex-end; }
/* Let the profile consume space so it stays left while cart hugs the right edge */
.auth-buttons #profileBtn { margin-right: auto; }

/* Generic page card */
.page-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--elev-2); }
.page-card { box-shadow: var(--elev-3); transition: box-shadow .15s ease, transform .12s ease; }
.page-card:hover { box-shadow: var(--elev-4); transform: none; }

/* Header elevation on scroll */
.header.header--elevated { box-shadow: 0 6px 18px rgba(16,24,40,0.14), 0 2px 8px rgba(16,24,40,0.08); }
/* Ensure B2B theme keeps a strong visible shadow when scrolled */
body.theme-b2b .header.header--elevated { box-shadow: 0 8px 22px rgba(23,43,77,0.28), 0 3px 10px rgba(23,43,77,0.16); }
body.theme-dark .header.header--elevated { box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
.page { padding: 28px; }

/* Horizontal menu */
.main-menu { background:#fff; border-bottom:1px solid var(--border); }

.main-menu-list { list-style:none; display:flex; margin:0; padding:0; }
.main-menu-list a { display:block; padding:14px 20px; color:#333; text-decoration:none; font-weight:500; border-right:1px solid #eaeef5; }
.main-menu-list a:last-child { border-right:none; }
.main-menu-list a:hover, .main-menu-list a.active { background:#eef2ff; color: var(--brand); }

/* Filters bar */
.filters-bar { display:flex; gap:12px; margin: 18px 0 24px 0; flex-wrap: wrap; align-items:center; }
.filters-bar { padding: 10px 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--elev-2); }
.filter-btn { background:#f6f7fb; border:1px solid #eaedf5; border-radius: 10px; padding:8px 14px; cursor:pointer; }
.filter-btn.active { background:#e0e7ff; color: var(--brand); border-color:#c7d2fe; }
.sort-bar { margin-left:auto; }

/* Filter selects used on group/subcategory pages — make them visually prominent and compact */
.filter-select {
    width: 100% !important;
    max-width: none !important;
    min-height: 38px;
    padding: 6px 36px 6px 12px !important;
    border: 1px solid #d6c5b4 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #2c1f16 !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    transition: border-color 0.12s ease, background 0.12s ease;
    will-change: border-color;
    margin-right: 0 !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23513624' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
.filter-select:focus {
    outline: none !important;
    border-color: #c49b73 !important;
    background: #fffdf7 !important;
}
.filter-select:hover {
    border-color: #c49b73 !important;
    background: #fffdf7 !important;
}

.filter-range-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
}
.filter-range {
    width: 100%;
    accent-color: #c49b73;
    cursor: pointer;
}
.filter-range-value-row {
    display: flex;
    align-items: center;
    min-height: 22px;
}
.filter-range-static {
    display: inline-block;
    color: #6b4d35;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0;
    margin: 0;
}
.filter-range-input {
    width: 35px;
    height: 30px;
    border: 1px solid #d9c3ac;
    border-radius: 6px;
    background: #fff;
    color: #5b3e28;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 30px;
    padding: 0 8px;
    margin: 0;
    outline: none;
    text-align: left;
    box-sizing: content-box;
}
.filter-range-input::placeholder {
    color: #9f7f62;
    opacity: 1;
    font-weight: 500;
}
.filter-range-input:focus {
    border-color: #c49b73;
    box-shadow: 0 0 0 2px rgba(196,155,115,0.14);
}
.filter-range-input::-webkit-outer-spin-button,
.filter-range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.filter-range-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.filters-panel.filters-panel--cylinders {
    grid-template-columns: minmax(260px, 1.15fr) minmax(220px, 1fr);
    align-items: start;
    gap: 16px;
}
.filters-panel.filters-panel--cylinders .filter-block {
    gap: 6px;
}

.filters-panel.filters-panel--cylinders .filter-block--stroke .filter-range,
.filters-panel.filters-panel--cylinders .filter-block--diameter .filter-range {
    height: 18px;
    appearance: none;
    background: transparent;
}
.filters-panel.filters-panel--cylinders .filter-block--stroke .filter-range::-webkit-slider-runnable-track,
.filters-panel.filters-panel--cylinders .filter-block--diameter .filter-range::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d7b594 0%, #b7875a 100%);
}
.filters-panel.filters-panel--cylinders .filter-block--stroke .filter-range::-webkit-slider-thumb,
.filters-panel.filters-panel--cylinders .filter-block--diameter .filter-range::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #9b6d44;
    background: #fff;
    margin-top: -5px;
    box-shadow: 0 1px 6px rgba(30, 22, 14, 0.28);
}
.filters-panel.filters-panel--cylinders .filter-block--stroke .filter-range::-moz-range-track,
.filters-panel.filters-panel--cylinders .filter-block--diameter .filter-range::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d7b594 0%, #b7875a 100%);
}
.filters-panel.filters-panel--cylinders .filter-block--stroke .filter-range::-moz-range-thumb,
.filters-panel.filters-panel--cylinders .filter-block--diameter .filter-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #9b6d44;
    background: #fff;
    box-shadow: 0 1px 6px rgba(30, 22, 14, 0.28);
}

@media (max-width: 900px) {
    .filters-panel.filters-panel--cylinders {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    /* On small screens, let filters become full width for usability */
    .filter-select { width: 100% !important; max-width: none !important; }
    .filters-panel { grid-template-columns: repeat(1, 1fr) !important; }
}

/* Legacy custom dropdown removed: using native <select> styled via .filter-select */

/* Product cards tweak */
.product-actions { margin-top: 10px; display:flex; gap:8px }
.btn-primary { border-radius:10px; padding:10px 12px; border:none }
.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-ghost { background:transparent; border:1px solid var(--border); padding:10px 12px; border-radius:10px }

/* Cart page styles */
.cart-page-container { max-width: 1120px; margin: 32px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--elev-3); padding: 16px; }
.cart-title { font-size: 1.8rem; font-weight: 800; text-align:center; margin-bottom: 20px; }
.cart-empty { color: var(--muted); text-align:center; font-size: 1.05rem; margin: 28px 0; }
.cart-list { list-style:none; margin:0 0 24px 0; padding:0; }
.cart-item { display:flex; align-items:center; justify-content: space-between; padding: 14px 0; border-bottom:1px solid #edf1f7; }
.cart-item:last-child { border-bottom:none; }
.cart-item-name { font-weight:600; }
.cart-item-qty { color: var(--muted); margin-left: 8px; }
.cart-item-price { color: var(--brand); font-weight: 700; }
.cart-summary { margin-top: 18px; padding-top: 12px; border-top: 2px solid #edf1f7; }
.cart-summary-row { display:flex; justify-content: space-between; font-size: 1rem; margin-bottom: 6px; }
.cart-summary-row.total { font-weight: 800; font-size: 1.1rem; color: var(--brand); }
.cart-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.cart-page-items { display: flex; flex-direction: column; gap: 14px; }
.cart-page-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 120px 140px auto; gap: 16px; align-items: center; border: 1px solid #e5e9f2; border-radius: 18px; padding: 16px; background: #fff; }
.cart-page-thumb { width: 88px; height: 88px; border-radius: 16px; background: #f3f6fb; overflow: hidden; display: grid; place-items: center; }
.cart-page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb-placeholder { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #d7deea, #edf2f8); }
.cart-page-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-page-meta strong { font-size: 1rem; }
.cart-page-meta span { color: #6b7280; font-size: 0.92rem; }
.cart-page-qty { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; color: #64748b; }
.cart-page-qty input { width: 100%; border: 1px solid #d4dbe6; border-radius: 12px; padding: 10px 12px; font: inherit; }
.cart-page-price { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; text-align: right; }
.cart-page-price span { color: #6b7280; font-size: 0.9rem; }
.cart-page-price strong { font-size: 1.05rem; }
.cart-page-remove { justify-self: end; }
.cart-page-summary-card { border: 1px solid #e5e9f2; border-radius: 18px; padding: 18px; background: linear-gradient(180deg, #f8fafc, #fff); position: sticky; top: 96px; }
.cart-page-summary-card h2 { margin: 0 0 16px 0; font-size: 1.05rem; }
.cart-workflow-page { display: flex; flex-direction: column; gap: 18px; }
.cart-workflow-banner { border-radius: 16px; padding: 14px 16px; background: #f6efe8; border: 1px solid #e5d0bf; color: #5c3d23; line-height: 1.5; }
.cart-note-field { display: block; font-size: 0.92rem; font-weight: 700; margin-bottom: 8px; }
.cart-workflow-page textarea { width: 100%; border: 1px solid #d4dbe6; border-radius: 14px; padding: 12px 14px; font: inherit; resize: vertical; min-height: 92px; }
.cart-workflow-actions { display: flex; justify-content: flex-end; gap: 12px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.checkout-card { border: 1px solid #e5e9f2; border-radius: 18px; background: #fff; padding: 20px; }
.checkout-card-header h2 { margin: 0; font-size: 1.15rem; }
.checkout-card-header p { margin: 8px 0 0 0; color: #64748b; line-height: 1.5; }
.checkout-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.checkout-form-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; font-weight: 700; color: #334155; }
.checkout-form-grid input,
.checkout-form-grid select,
.checkout-form-grid textarea { width: 100%; min-height: 48px; border: 1px solid #d4dbe6; border-radius: 14px; padding: 11px 14px; font: inherit; color: #0f172a; background: #fff; }
.checkout-form-grid textarea { min-height: 92px; }
.checkout-form-span-2 { grid-column: 1 / -1; }
.checkout-review-card { position: sticky; top: 96px; background: linear-gradient(180deg, #f8fafc, #fff); }
.checkout-review-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.checkout-review-panel { border: 1px solid #e5e9f2; border-radius: 16px; padding: 14px; background: #fff; }
.checkout-review-panel h3 { margin: 0 0 10px 0; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; color: #475569; }
.checkout-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #eef2f7; color: #475569; }
.checkout-review-row:last-child { border-bottom: none; padding-bottom: 0; }
.checkout-review-row span { min-width: 0; }
.checkout-review-row strong { text-align: right; color: #0f172a; }
.checkout-confirmation { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #f8fafc; border: 1px solid #e5e9f2; color: #334155; }
.checkout-confirmation input { margin-top: 3px; }

@media (max-width: 960px) {
    .cart-page-grid { grid-template-columns: 1fr; }
    .cart-page-summary-card { position: static; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-review-card { position: static; }
}

@media (max-width: 760px) {
    .cart-page-row { grid-template-columns: 72px minmax(0, 1fr); }
    .cart-page-thumb { width: 72px; height: 72px; }
    .cart-page-qty,
    .cart-page-price,
    .cart-page-remove { grid-column: 2; }
    .cart-page-price { align-items: flex-start; text-align: left; }
    .cart-page-remove { justify-self: start; }
    .cart-workflow-actions { justify-content: stretch; }
    .cart-workflow-actions .btn { width: 100%; }
    .checkout-form-grid { grid-template-columns: 1fr; }
    .checkout-form-span-2 { grid-column: auto; }
    .checkout-review-row { flex-direction: column; }
    .checkout-review-row strong { text-align: left; }
}

/* Profile page styles */
.profile-container { max-width: 820px; margin: 32px auto; }
.form-section { margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-actions { margin-top: 8px; display:flex; gap:12px; justify-content:flex-end; }
.radio-group-row { display:flex; align-items:center; justify-content: space-between; width:100%; padding: 6px 0; }
.radio-group-row .radio-controls { display:flex; align-items:center; gap:10px; }
.note { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* Customer cabinet */
.profile-dashboard-page .profile-dashboard-container { padding: 24px 0 120px 0; }
.profile-shell { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-sidebar,
.profile-main { display: flex; flex-direction: column; gap: 18px; }
.profile-summary-card { padding: 22px; display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, #0f172a, #9a6b3f); color: #fff; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; }
.profile-eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: #8b98aa; margin-bottom: 4px; }
.profile-title { margin: 0; font-size: clamp(1.7rem, 2vw, 2.2rem); }
.profile-subtitle { margin: 6px 0 0 0; color: #5f6b7c; line-height: 1.5; }
.profile-nav { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.profile-nav-btn { width: 100%; border: 1px solid #e6ebf3; background: #fff; color: #0f172a; border-radius: 14px; padding: 12px 14px; font-weight: 700; text-align: left; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.profile-nav-btn:hover { background: #f8fafc; }
.profile-nav-btn.is-active { background: #0f172a; color: #fff; border-color: #0f172a; }
.profile-stats { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.profile-stat-item { background: #f8fafc; border: 1px solid #e5e9f2; border-radius: 14px; padding: 14px 10px; text-align: center; }
.profile-stat-item strong { display: block; font-size: 1.35rem; color: #0f172a; }
.profile-stat-item span { color: #667085; font-size: 0.9rem; }
.profile-panel { display: none; }
.profile-panel.is-active { display: flex; flex-direction: column; gap: 18px; }
.profile-panel-card { padding: 22px; }
.profile-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.profile-panel-head-spread { align-items: center; }
.profile-panel-kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: #8b98aa; margin-bottom: 6px; }
.profile-permissions-inline { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.permission-pill { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: #eef2ff; color: #263ea8; font-size: 12px; font-weight: 700; }
.profile-form-grid,
.machine-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-form-span-2 { grid-column: 1 / -1; }
.profile-form-actions { justify-content: flex-start; }
/* Profile head: permissions + edit button aligned right */
.profile-head-aside { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.profile-edit-btn { white-space: nowrap; }
/* Section subheadings inside the profile grid */
.profile-section-title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8b98aa; font-weight: 700; border-bottom: 1px solid #eef1f6; padding-bottom: 6px; margin-top: 4px; }
.profile-section-title:first-child { margin-top: 0; }
/* Read-only (view) mode: inputs render as compact plain text */
.profile-form-grid.is-readonly { column-gap: 24px; row-gap: 9px; }
.profile-form-grid.is-readonly .form-group { gap: 1px; min-height: 0; }
.profile-form-grid.is-readonly label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; }
.profile-form-grid.is-readonly input,
.profile-form-grid.is-readonly select { border: 0; background: transparent; padding: 1px 0; min-height: 0; height: auto; line-height: 1.25; font-size: 0.98rem; font-weight: 600; color: #0f172a; box-shadow: none; -webkit-appearance: none; appearance: none; cursor: default; pointer-events: none; }
.profile-form-grid.is-readonly input::placeholder { color: transparent; }
.profile-form-grid.is-readonly input:placeholder-shown::after { content: '—'; }
.profile-form-grid.is-readonly .form-group.is-disabled { opacity: 1; }
.profile-form-grid.is-readonly .is-readonly-hidden { display: none !important; }
.profile-form-grid.is-readonly .profile-section-title { margin-top: 2px; padding-bottom: 5px; }
.permission-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.permission-card { border: 1px solid #e6ebf3; border-radius: 18px; background: #fbfcfe; padding: 18px; }
.permission-card-title { font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8b98aa; margin-bottom: 8px; }
.permission-card-value { font-size: 1.18rem; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.permission-card p { margin: 0; color: #5f6b7c; line-height: 1.5; }
.profile-notifications-summary { margin-top: 14px; color: #475569; }
.profile-notifications-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.profile-notification-card { border: 1px solid #e6ebf3; border-radius: 18px; background: #fbfcfe; padding: 16px 18px; }
.profile-notification-card.is-unread { background: #fffaf2; border-color: rgba(201, 159, 114, 0.45); box-shadow: inset 0 0 0 1px rgba(201, 159, 114, 0.08); }
.profile-notification-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-notification-head h3 { margin: 6px 0 0 0; font-size: 1rem; color: #0f172a; }
.profile-notification-head time { color: #64748b; font-size: 0.88rem; white-space: nowrap; }
.profile-notification-type { display: inline-block; border-radius: 999px; padding: 4px 10px; background: #eef2ff; color: #1d4ed8; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.profile-notification-message { margin: 12px 0 0 0; color: #334155; line-height: 1.55; }
.profile-notification-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.profile-notification-read { color: #64748b; font-size: 0.9rem; font-weight: 600; }
.form-group.is-disabled { opacity: 0.55; }
.machines-layout { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 18px; }
.machine-photo-preview { min-height: 138px; border: 1px dashed #cdd5df; border-radius: 18px; display: grid; place-items: center; background: #f8fafc; color: #748194; overflow: hidden; }
.machine-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.machine-cards { display: flex; flex-direction: column; gap: 12px; }
.machine-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; border: 1px solid #e6ebf3; border-radius: 18px; padding: 12px; background: #fff; cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease; }
.machine-card:hover { border-color: #c99f72; box-shadow: 0 12px 24px rgba(15, 21, 35, 0.08); }
.machine-card.is-active { border-color: #0f172a; box-shadow: 0 12px 24px rgba(15, 21, 35, 0.12); }
.machine-card-media { width: 92px; height: 92px; border-radius: 16px; background: #f4f7fb; overflow: hidden; }
.machine-card-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #7a8799; font-size: 0.9rem; padding: 12px; text-align: center; }
.machine-card-body { display: flex; flex-direction: column; gap: 4px; color: #5f6b7c; }
.machine-card-body strong { color: #0f172a; font-size: 1rem; }
.machine-card-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 4px; font-size: 0.84rem; color: #8b98aa; }
.machine-detail-card { min-height: 420px; }
.machine-product-picker { margin-bottom: 16px; }
.machine-search-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.machine-search-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid #e6ebf3; background: #fff; cursor: pointer; text-align: left; }
.machine-search-item:hover { border-color: #c99f72; background: #fffaf5; }
.machine-search-item-title { color: #0f172a; font-weight: 700; }
.machine-search-item-meta,
.machine-search-empty { color: #6b7280; font-size: 0.92rem; }
.selected-product-pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e5e9f2; margin-top: 10px; flex-wrap: wrap; }
.chip-remove-btn { border: none; background: transparent; color: #8b98aa; cursor: pointer; font-size: 18px; line-height: 1; }
.machine-component-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.machine-components-list { display: flex; flex-direction: column; gap: 16px; }
.machine-component-card { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 16px; border-radius: 18px; border: 1px solid #e6ebf3; background: #fff; }
.machine-component-media { width: 140px; height: 140px; border-radius: 18px; background: #f4f7fb; overflow: hidden; }
.machine-component-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-component-body { display: flex; flex-direction: column; gap: 14px; }
.machine-component-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.machine-component-code { color: #8b98aa; font-size: 0.88rem; margin-top: 4px; }
.machine-component-price { font-weight: 800; color: #0f172a; white-space: nowrap; }
.machine-component-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.machine-component-controls label,
.machine-component-notes { display: flex; flex-direction: column; gap: 6px; color: #4b5563; font-weight: 600; }
.machine-component-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.permissions-checkboxes { display: flex; flex-wrap: wrap; gap: 14px 18px; color: #334155; }
.permissions-checkboxes label { display: inline-flex; align-items: center; gap: 8px; }
.linked-accounts-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.linked-account-card { border: 1px solid #e6ebf3; border-radius: 18px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 14px; }
.linked-account-card.is-archived { background: #f8fafc; border-style: dashed; }
.linked-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.linked-account-head span { display: block; color: #6b7280; margin-top: 4px; }
.linked-account-company { color: #475467; font-weight: 600; margin-top: -4px; }
.linked-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.linked-account-grid label { display: flex; flex-direction: column; gap: 6px; color: #475467; font-weight: 600; }
.linked-account-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.profile-subsection-head { margin-top: 24px; display: flex; flex-direction: column; gap: 6px; }
.profile-subsection-head h3 { margin: 0; font-size: 1.02rem; color: #0f172a; }
.profile-subsection-head p { margin: 0; color: #64748b; }
.admin-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-meta-card-wide { grid-column: span 1; }
.admin-company-selected { margin: 18px 0 6px; border: 1px solid #dbe4f0; border-radius: 18px; padding: 16px; background: linear-gradient(180deg, #fbfdff 0%, #f5f8fc 100%); }
.admin-company-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-company-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-company-title-row strong { font-size: 1.1rem; color: #0f172a; }
.admin-company-subtitle { margin: 6px 0 0 0; color: #64748b; }
.admin-company-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.admin-company-contact-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.admin-company-note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #e6ebf3; color: #475467; line-height: 1.6; }
.admin-company-search-result { width: 100%; text-align: left; cursor: pointer; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.admin-company-search-result:hover { border-color: #c7d6ea; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05); }
.admin-company-autocomplete { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid #dbe4f0; border-radius: 16px; background: #fbfdff; }
.admin-company-option { width: 100%; text-align: left; border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.admin-company-option strong { color: #0f172a; }
.admin-company-option span { color: #64748b; font-size: 0.92rem; }
.admin-company-option:hover { border-color: #c7d6ea; background: #f8fbff; }
.admin-company-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.admin-company-edit-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e6ebf3; }
.admin-company-meta-grid { align-items: stretch; }
.admin-company-machines-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e6ebf3; }
.admin-company-machines-head { margin-top: 0; }
.admin-company-machines-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admin-company-machine-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: stretch; padding: 12px; border-radius: 16px; border: 1px solid #e6ebf3; background: #fff; }
.admin-company-machine-media { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: #f4f7fb; }
.admin-company-machine-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-company-machine-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #5f6b7c; }
.admin-company-machine-body strong { color: #0f172a; }
.admin-company-flow-form { margin-top: 16px; padding-top: 18px; border-top: 1px solid #e6ebf3; display: flex; flex-direction: column; gap: 16px; }
.admin-company-flow-head { margin-top: 0; }
.admin-company-flow-products { display: flex; flex-direction: column; gap: 12px; }
.admin-company-flow-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.admin-company-flow-items { display: flex; flex-direction: column; gap: 10px; }
.admin-company-flow-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-company-flow-item { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid #e6ebf3; background: #fff; }
.admin-company-flow-item label { display: flex; flex-direction: column; gap: 6px; color: #475467; font-weight: 600; }
.admin-company-flow-item input { width: 100%; }
.profile-company-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.profile-company-tab { border: 1px solid #d8e2ef; background: #fff; color: #334155; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.profile-company-tab.is-active { background: #0f172a; border-color: #0f172a; color: #fff; }
.superadmin-dashboard-page .profile-nav-btn[data-tab="overview"],
.superadmin-dashboard-page .profile-nav-btn[data-tab="orders"],
.superadmin-dashboard-page .profile-nav-btn[data-tab="machines"],
.superadmin-dashboard-page .profile-panel[data-panel="overview"],
.superadmin-dashboard-page .profile-panel[data-panel="orders"],
.superadmin-dashboard-page .profile-panel[data-panel="machines"] { display: none !important; }
.superadmin-dashboard-page .profile-summary-card { background: linear-gradient(135deg, #0f172a 0%, #162235 55%, #8f623c 100%); border: 1px solid rgba(255, 255, 255, 0.08); }
.superadmin-dashboard-page .profile-summary-card .profile-eyebrow,
.superadmin-dashboard-page .profile-summary-card .profile-title { color: #fff; }
.superadmin-dashboard-page .profile-summary-card .profile-subtitle { color: rgba(255, 255, 255, 0.78); }
.superadmin-dashboard-page .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.superadmin-hero-card { background: linear-gradient(180deg, #fffaf4 0%, #f7fafc 100%); }
.superadmin-hero-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 16px; align-items: start; }
.superadmin-hero-copy p { margin: 0; color: #475467; line-height: 1.7; max-width: 62ch; }
.superadmin-hero-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1080px) {
    .profile-shell,
    .machines-layout,
    .superadmin-hero-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .profile-stats,
    .permission-cards,
    .profile-form-grid,
    .machine-form-grid,
    .machine-component-form,
    .linked-account-grid,
    .machine-component-controls,
    .admin-meta-grid,
    .admin-company-facts,
    .admin-company-contact-grid,
    .admin-company-machines-list,
    .superadmin-hero-points { grid-template-columns: 1fr; }
    .admin-company-quick-actions { flex-direction: column; }
    .profile-company-tabs { flex-direction: column; }
    .admin-company-flow-summary { grid-template-columns: 1fr; }
    .admin-company-flow-item { grid-template-columns: 1fr; }
    .profile-panel-card { padding: 18px; }
    .profile-summary-card { align-items: flex-start; }
    .machine-component-card { grid-template-columns: 1fr; }
    .machine-component-media { width: 100%; height: 220px; }
    .linked-account-actions,
    .form-actions { justify-content: stretch; }
    .linked-account-actions .btn,
    .form-actions .btn,
    .machine-component-actions .btn,
    .profile-nav-btn { width: 100%; }
    .profile-notification-actions .btn { width: 100%; }
    .profile-notification-head { flex-direction: column; }
    .profile-notification-head time { white-space: normal; }
}

/* ======================================
    Modern UI Refresh — Lightweight Overrides
    ====================================== */
/* Simplify footer overlay */
.footer::before { display: none !important; content: none !important; }

/* Unified compact filters panel and chips */
.filters-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0 0 12px 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.filters-panel > * { min-width: 0; width: 100%; }
.filters-panel > button,
.filters-panel > a { width: 100%; display: inline-flex; align-items: center; justify-content: center; }
.filters-panel .filter-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; }

.filters-extra {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 18px 20px;
    margin: 0 auto 28px auto;
    border: 1px solid #e4dccf;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(15,21,35,0.08);
    background: #fff;
    width: min(100%, 1100px);
}
.filters-extra[hidden] { display: none !important; }

.filters-collapse { display: flex; align-items: center; justify-content: center; margin: -6px 0 18px 0; width: 100%; }
.filters-collapse .filters-toggle { 
    min-width: 160px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fdf4ea !important;
    color: #4a3625;
    border: 1px solid #e2cebb !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(15,21,35,0.12);
    cursor: pointer;
    padding: 4px 14px;
    transition: box-shadow .15s ease, transform .15s ease, background .2s ease, color .2s ease;
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.filters-collapse .filters-toggle:hover,
.filters-collapse .filters-toggle:active,
.filters-collapse .filters-toggle:focus,
.filters-collapse .filters-toggle:focus-visible {
    background: #fbead8 !important; border-color: #d7ba94 !important; box-shadow: 0 8px 18px rgba(15,21,35,0.18); outline: none !important; transform: translateY(-1px);
}
.filters-collapse .filters-toggle.open {
    background: #513624 !important;
    color: #fff;
    border-color: #513624 !important;
    box-shadow: 0 10px 24px rgba(15,21,35,0.2);
}
.filters-collapse .toggle-label { color: inherit; }
.filters-collapse .chev { display: inline-block; transition: transform .18s ease; font-size: 14px; line-height: 1; }
.filters-collapse .filters-toggle.open .chev { transform: rotate(180deg); color: inherit; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px 0; }
.active-filters:empty { display: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--border); background: #f8fafc; color: #0b1220; border-radius: 999px; font-size: 12px; line-height: 1; }
.filter-chip:hover { background: #eef2ff; border-color: #c7d2fe; }
.filter-chip:active { transform: translateY(0.5px); }
.filter-chip .chip-remove { background: transparent; border: none; cursor: pointer; color: #6b7280; font-weight: 700; padding: 0; }
.filter-chip .chip-remove:hover { color: #111827; }
.active-filters .clear-all { background: transparent; border: none; color: var(--brand); cursor: pointer; font-size: 12px; padding: 0 0 0 2px; }

/* Clamp long descriptions inside cards to keep grid tidy */
.product-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }

/* Subcategory card content spacing (moved from inline styles) */
.subcategory-box .product-actions { padding: 0 10px 12px 10px; }
.subcategory-box .desc { padding: 10px; flex: 1; color: #444; }
.subcategory-box .price { padding: 10px; font-weight: 700; color: var(--brand); }

/* ===============================
    Skeletons (loading placeholders)
    =============================== */
.skeleton-grid { display: grid; gap: 18px; }
.skeleton-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.skeleton-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.skeleton-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.skeleton-grid.cols-1 { grid-template-columns: 1fr; }
@media (max-width: 900px) { .skeleton-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .skeleton-grid.cols-4, .skeleton-grid.cols-3 { grid-template-columns: 1fr; } }
.skel-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px; box-shadow: var(--elev-2); }
.skel-thumb { height: 140px; border-radius: 8px; background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%); background-size: 400% 100%; animation: skel 1.2s ease-in-out infinite; }
.skel-line { height: 12px; margin-top: 10px; border-radius: 6px; background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%); background-size: 400% 100%; animation: skel 1.2s ease-in-out infinite; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-line.w40 { width: 40%; }

/* Status messages used across pages (loading/empty/error) */
.status-msg { padding: 40px; text-align: center; color: #888; }
.status-msg.error { color: #c00; }
.status-msg.muted { color: #9aa3ad; }

/* ===============================
    Subcategory page layout (moved from inline <style> in subcategory.html)
    =============================== */
.subcategory-page .main-content {
    /* Homepage-like: rails provided by inner .container */
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 0 0 0;
}
.subcategory-page #breadcrumbsContainer { margin: 0 0 4px 0; }
.subcategory-page #categoryTitle, .subcategory-page #pageTitle { margin: 0 0 8px 0; }
.subcategory-page .subcategories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 24px; margin-bottom: 120px; }
.subcategory-page .subcategories-grid { content-visibility: auto; contain-intrinsic-size: 800px; }
.subcategory-page .subcategory-box { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 12px rgba(16,24,40,0.08); transition: box-shadow 0.2s ease; display: flex; flex-direction: column; cursor: pointer; }
.subcategory-page .subcategory-box:hover { transform: none; box-shadow: 0 4px 12px rgba(16,24,40,0.08); }
.subcategory-page .subcategory-title { padding: 12px; background: #f8fafc; border-top: 1px solid #eef2f7; font-weight: 700; text-align: center; }
.subcategory-page .subcategory-image { width: 100%; height: 200px; object-fit: cover; display: block; }
/* Animate only the image on hover to avoid tile jump */
.subcategory-page .subcategory-box .subcategory-image { transition: none; will-change: auto; }
.subcategory-page .subcategory-box:hover .subcategory-image { transform: none; }
@media (max-width: 768px) { .subcategory-page .subcategories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .subcategory-page .subcategories-grid { grid-template-columns: 1fr; } }

/* ===============================
     Group page layout (moved from inline <style> in group.html)
     =============================== */
.group-page .main-content { max-width: 1320px; margin: 0 auto; padding: 16px 0 0 0; }
.group-page #breadcrumbsContainer { margin-bottom: 2px; margin-top: 0; font-size: 14px; }
.group-page .group-title { margin: 0 0 8px 0; font-size: 1.6rem; font-weight: 800; }

/* Hero: shared for group-page and subcategory-page */
.group-page .group-hero,
.subcategory-page .group-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: stretch; background: #fff; border-radius: 0; box-shadow: var(--elev-3); padding: 24px; }
.group-page .group-desc,
.subcategory-page .group-desc { background: transparent; border-radius: 0; }
.group-page .group-desc-inner,
.subcategory-page .group-desc-inner { padding: 8px; display: flex; flex-direction: column; gap: 10px; }
.group-page .group-desc-inner h3,
.subcategory-page .group-desc-inner h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.group-page .group-description,
.subcategory-page .group-description { color: #374151; font-size: 14px; line-height: 1.5; }
.group-page .group-meta,
.subcategory-page .group-meta { list-style: none; padding: 0; margin: 6px 0 0 0; color: #6b7280; font-size: 13px; }

/* Gallery */
.group-page .group-gallery,
.subcategory-page .group-gallery { position: relative; background: #f8fafc; border: 0px solid var(--border); border-radius: 0; display: grid; place-items: center; overflow: hidden; min-height: 280px; width: 100%; aspect-ratio: 1 / 1; }
.group-page .gallery-view,
.subcategory-page .gallery-view { width: 100%; height: 100%; display: grid; place-items: center; }
.group-page .gallery-view img,
.subcategory-page .gallery-view img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.group-page .gallery-arrow,
.subcategory-page .gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: transparent; /* no fill */
    color: #ffffff;
    border: none; /* no border */
    border-radius: 0; /* squared globally anyway */
    width: 44px; height: 44px; /* keep a generous hit area */
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: none; /* no shadow */
    font-size: 69px; line-height: 1; /* larger arrow glyph */
    /* Make arrow visible on any background without a pill */
    -webkit-text-stroke: 1px #0f15231f;
    text-shadow:
        0 0 2px rgba(255,255,255,0.9),
        0 1px 2px rgba(0,0,0,0.45),
        0 2px 6px rgba(0,0,0,0.35);
}
.group-page .gallery-arrow.left,
.subcategory-page .gallery-arrow.left { left: 4px; }
.group-page .gallery-arrow.right,
.subcategory-page .gallery-arrow.right { right: 4px; }
.group-page .gallery-arrow:hover,
.subcategory-page .gallery-arrow:hover { background: transparent; }

@media (max-width: 900px) {
    .group-page .group-hero, .subcategory-page .group-hero { grid-template-columns: 1fr; gap: 18px; }
}
/* Subcategory-only: make hero block shorter in height */
.subcategory-page .group-hero { padding: 16px; margin-bottom: 16px; }
.subcategory-page .group-gallery { aspect-ratio: 16 / 10; min-height: 200px; }
/* filters-panel already globally defined; ensure width/content behavior */
/* Using CSS grid (6 columns); children will auto-fill cells */
/* Prevent label overflow inside equal-width tiles */
.filters-panel .select-toggle.filter-select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.series-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
    gap: 32px;
    padding: 24px;
    margin: 16px 0 24px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--elev-3);
}
.series-copy { display: flex; flex-direction: column; gap: 10px; }
.series-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; color: #9ca3af; margin: 0; }
.series-name { margin: 0; font-size: 1.8rem; }
.series-text p { margin: 0 0 10px 0; line-height: 1.55; color: #4b5563; }
.series-gallery {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    justify-items: stretch;
    width: min(100%, 520px);
    margin-left: auto;
}
.series-main {
    background: #ffffff;
    border-radius: 18px;
    aspect-ratio: 1 / 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    justify-self: stretch;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    grid-column: 2;
    grid-row: 1;
}
.series-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.series-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}
.series-arrow.prev { left: 10px; }
.series-arrow.next { right: 10px; }
.series-arrow:hover:not(:disabled) { background: rgba(0,0,0,0.75); transform: translateY(-50%) scale(1.05); }
.series-arrow:disabled { opacity: 0.35; cursor: default; }
.series-thumbs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}
.series-thumbs .series-thumb { width: 60px; height: 60px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 0; background: rgba(255,255,255,0.05); cursor: pointer; transition: border-color .12s ease, transform .12s ease; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.series-thumbs .series-thumb.active { border-color: #c99f72; transform: translateY(-1px); }
.series-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.series-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 19, 0.82);
    padding: 24px;
}
.series-lightbox.is-open {
    display: flex;
}
.series-lightbox-stage {
    position: relative;
    width: min(92vw, 1040px);
    height: min(86vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.series-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.22);
    box-shadow: 0 18px 36px rgba(0,0,0,0.35);
    user-select: none;
    -webkit-user-drag: none;
}
.view-toggle { display: flex; align-items: center; gap: 12px; margin: 8px 0 18px 0; }
.view-toggle[hidden] { display: none !important; }
.view-toggle-label { font-weight: 600; font-size: 14px; color: #4b5563; }
.view-toggle-buttons { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.view-toggle-buttons button { border: none; background: transparent; padding: 6px 14px; font-weight: 600; cursor: pointer; color: #4b5563; transition: background .12s ease, color .12s ease; }
.view-toggle-buttons button.active { background: #0f1523; color: #fff; }
.view-toggle-buttons button:not(.active):hover { background: rgba(0,0,0,0.05); }
@media (max-width: 900px) {
    .series-hero { grid-template-columns: 1fr; }
    .series-gallery {
        grid-template-columns: 56px minmax(0, 1fr);
        align-items: start;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
    .series-main { width: 100%; }
    .series-thumbs {
        max-height: 340px;
    }
    .series-thumbs .series-thumb {
        width: 52px;
        height: 52px;
    }
}
.group-page .filter-block,
.subcategory-page .filter-block {
    padding: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
    border: none;
    background: transparent;
    box-shadow: none;
}
.group-page .filter-label,
.subcategory-page .filter-label {
    font-weight: 700;
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #5b4736;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.group-page .products-list { margin: 32px auto 120px auto; content-visibility: auto; contain-intrinsic-size: 1000px; }
.group-page .product-card { background: #fff; border-radius: 12px; border: 1px solid #d8dee8; box-shadow: none; min-width: 0; }
.group-page .product-title { font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.group-page .product-desc { color: #6b7280; font-size: 13px; margin-bottom: 6px; }
.group-page .product-price { margin-bottom: 8px; font-size: clamp(1.6rem, 1vw + 1rem, 2.1rem); line-height: 1.1; }
@media (max-width: 600px) {
    .group-page .main-content { padding: 12px 0 0 0; }
}

/* ===============================
     Favorites page layout
     =============================== */
.favorites-page .main-content { max-width: 1320px; margin: 0 auto; padding: 16px 0 0 0; }
.favorites-page #breadcrumbsContainer { margin: 6px 0 4px 0; }
.favorites-page .group-title { margin: 0 0 8px 0; font-size: 1.6rem; font-weight: 800; }
.favorites-page .products-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 24px 0 120px 0; justify-content: start; justify-items: stretch; }
.favorites-page .products-list { content-visibility: auto; contain-intrinsic-size: 1000px; }
.favorites-page .product-card { background: #fff; border-radius: 12px; border: 1px solid #d8dee8; box-shadow: none; padding: 14px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.favorites-page .product-card img { width: 140px; height: 120px; object-fit: contain; margin-bottom: 8px; }
.favorites-page .product-title { font-weight: 700; margin-bottom: 6px; font-size: 15px; text-align: center; }
.favorites-page .product-price { margin-bottom: 8px; font-size: clamp(1.4rem, 0.8vw + 0.95rem, 1.8rem); line-height: 1.1; }
@media (max-width: 900px) { .favorites-page .products-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .favorites-page .products-list { grid-template-columns: 1fr; } }

/* Orders history page */
.orders-page .orders-container { padding: 24px 0 120px 0; }
.orders-page .breadcrumbs { margin-top: 8px; }
.orders-page .group-title { margin: 8px 0 16px 0; font-size: clamp(1.8rem, 2vw, 2.2rem); font-weight: 800; }
.orders-page .orders-list { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.orders-page .order-card { background: #fff; border-radius: 18px; border: 1px solid #e5e9f2; box-shadow: 0 18px 34px rgba(15, 21, 35, 0.08); padding: 20px; }
.request-card { gap: 14px; }
.order-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-number { font-size: 1.05rem; font-weight: 700; color: #0b1220; margin-bottom: 4px; }
.order-date { color: #6b7280; font-size: 0.95rem; }
.request-card-owner { margin-top: 6px; color: #64748b; font-size: 0.92rem; }
.order-status { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; }
.order-status.is-pending { background: #fff7ed; color: #c2410c; border-color: rgba(234, 88, 12, 0.3); }
.order-status.is-paid { background: #ecfdf5; color: #047857; border-color: rgba(16, 185, 129, 0.25); }
.order-status.is-shipped { background: #eff6ff; color: #0f52ba; border-color: rgba(59, 130, 246, 0.25); }
.order-status.is-delivered { background: #eefae7; color: #15803d; border-color: rgba(34, 197, 94, 0.25); }
.order-status.is-cancelled { background: #fef2f2; color: #b91c1c; border-color: rgba(248, 113, 113, 0.35); }
.order-card-body { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.order-summary { flex: 1 1 140px; background: #f8fafc; border: 1px solid #e5e9f2; border-radius: 14px; padding: 10px 14px; }
.order-summary-label { color: #6b7280; font-size: 0.85rem; display: block; }
.order-summary-value { font-size: 1.15rem; font-weight: 700; }
.records-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.records-toolbar input,
.records-toolbar select {
    flex: 1 1 220px;
    min-height: 46px;
    border: 1px solid #d4dbe6;
    border-radius: 14px;
    background: #fff;
    padding: 0 14px;
    font: inherit;
    color: #0f172a;
}
.order-toggle { margin-left: auto; padding: 10px 18px; border-radius: 999px; border: 1px solid #c99f72; background: transparent; color: #c99f72; font-weight: 700; cursor: pointer; transition: background .15s ease, color .15s ease; }
.order-toggle:hover { background: rgba(201, 159, 114, 0.12); }
.request-card-note { margin-top: 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e6ebf3; padding: 12px 14px; color: #334155; line-height: 1.5; }
.request-card-note-resolution { background: #f3f8f4; border-color: #cfe1d4; }
.request-card-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; border-top: 1px solid #e6ebf3; padding-top: 14px; }
.request-resolution-input { width: 100%; border: 1px solid #d4dbe6; border-radius: 14px; padding: 12px 14px; font: inherit; resize: vertical; min-height: 84px; }
.order-items { margin-top: 18px; border-top: 1px solid #eef2f7; padding-top: 14px; }
.order-items-section + .order-items-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef2f7; }
.order-items-section-title { font-size: 0.88rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #475569; margin-bottom: 12px; }
.order-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.order-meta-card { border: 1px solid #e5e9f2; border-radius: 14px; padding: 12px 14px; background: #fbfcfe; display: flex; flex-direction: column; gap: 6px; }
.order-meta-card span { color: #64748b; font-size: 0.82rem; }
.order-meta-card strong { color: #0f172a; line-height: 1.45; }
.order-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f2f7; }
.order-item:last-child { border-bottom: none; }
.order-timeline { display: flex; flex-direction: column; gap: 12px; }
.order-timeline-item { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 12px 14px; border: 1px solid #e6ebf3; border-radius: 14px; background: #fbfcfe; }
.order-timeline-item .order-status { align-self: start; }
.order-timeline-meta { display: flex; flex-direction: column; gap: 4px; color: #475569; }
.order-timeline-note { grid-column: 2; color: #334155; line-height: 1.5; }
.order-item-thumb { width: 64px; height: 64px; border-radius: 14px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.order-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-item-body { display: flex; flex-direction: column; gap: 2px; }
.order-item-name { font-weight: 600; color: #0b1220; }
.order-item-meta { font-size: 0.85rem; color: #6b7280; }
.order-item-qty { font-weight: 700; color: #0b1220; }
.order-item-price { text-align: right; font-weight: 700; color: #0b1220; }
.order-item-price small { display: block; font-size: 0.8rem; color: #6b7280; font-weight: 600; }
.order-items-loading,
.order-items-empty,
.order-items-error { padding: 14px; text-align: center; color: #6b7280; }
.order-items-error { color: #b91c1c; }
.thumb-placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 10px, #f3f4f6 10px, #f3f4f6 20px); border-radius: 14px; }
@media (max-width: 640px) {
    .order-card-body { flex-direction: column; align-items: stretch; }
    .order-summary { width: 100%; }
    .order-toggle { width: 100%; text-align: center; }
    .order-item { grid-template-columns: 64px 1fr; grid-template-rows: auto auto auto; }
    .order-item-qty, .order-item-price { justify-self: flex-start; }
    .request-card-actions .machine-component-actions { flex-direction: column; }
    .request-card-actions .machine-component-actions .btn { width: 100%; }
}

/* In-cart indicator on favorites cards */
.in-cart-info { margin-top: 4px; color: #6b7280; font-size: 13px; }

/* ===============================
   Utilities: Scroll-to-top button
   =============================== */
.scroll-to-top { 
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #C99F72;
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1100;
}
/* removed assistant overlap rule */

/* ===============================
     Row-style product list (subcategory product view)
     =============================== */
.product-rows { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 120px 0; }
.product-row { display: grid; grid-template-columns: auto 1.6fr 1fr auto auto; align-items: center; gap: 16px; padding: 14px; background: #fff; border: 1px solid #C99F72; border-radius: var(--radius-card); box-shadow: var(--elev-2); }
.product-row:hover { box-shadow: var(--elev-3); }
.product-row .pr-thumb { width: 84px; height: 84px; border-radius: var(--radius-ctrl); background: #f1f5f9; display: grid; place-items: center; overflow: hidden; }
.product-row .pr-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.product-row .pr-title { font-weight: 700; color: #111827; margin: 0 0 6px 0; }
.product-row .pr-attrs { display: grid; grid-template-columns: repeat(4, max-content); gap: 8px 12px; font-size: 12px; color: #374151; margin-top: 6px; }
.product-row .pr-attr { background: #f9fafb; border: 1px solid #eef2f7; border-radius: var(--radius-ctrl); padding: 4px 8px; }
.product-row .pr-price { font-weight: 800; color: #111827; text-align: right; }
.product-row .pr-qty { display: inline-flex; align-items: center; gap: 6px; }
.product-row .pr-qty input { width: 60px; padding: 6px 8px; border: 1px solid #d0d7e2; border-radius: var(--radius-ctrl); font-size: 14px; }
.product-row .pr-actions { display: inline-flex; gap: 8px; align-items: center; }
.product-row .btn-add { background: #0d6efd; color: #fff; border: 1px solid #0d6efd; padding: 8px 12px; border-radius: var(--radius-ctrl); font-weight: 700; cursor: pointer; }
.product-row .btn-add:hover { background: var(--brand); border-color: var(--brand); }
.product-row .btn-fav { background: transparent; border: 1px solid rgba(0,0,0,0.2); width: 38px; height: 38px; border-radius: var(--radius-ctrl); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.product-row .btn-fav .fav-icon { font-size: 18px; }
@media (max-width: 980px) { .product-row { grid-template-columns: auto 1fr auto; grid-auto-rows: auto; grid-template-areas: 'thumb title price' 'thumb attrs actions'; }
    .product-row .pr-title { grid-area: title; }
    .product-row .pr-attrs { grid-area: attrs; grid-template-columns: repeat(2, max-content); }
    .product-row .pr-price { grid-area: price; text-align: right; }
    .product-row .pr-actions { grid-area: actions; justify-content: flex-end; }
}
@media (max-width: 600px) {
    .product-row { grid-template-columns: auto 1fr; grid-template-areas: 'thumb title' 'thumb attrs' 'thumb actions'; gap: 10px; }
    .product-row .pr-price { text-align: left; }
}
.scroll-to-top svg { width: 20px; height: 20px; }
.scroll-to-top.show { opacity: 1; transform: translateY(0); }
.scroll-to-top:focus-visible { outline: 3px solid rgba(255,255,255,0.8); outline-offset: 2px; }
body.theme-dark .scroll-to-top { background: #2b3553; box-shadow: 0 8px 24px rgba(0,0,0,0.45); }
@media (prefers-reduced-motion: reduce) { .scroll-to-top { transition: none !important; } }

/* Ensure [hidden] elements stay hidden even if base styles set display */
[hidden] { display: none !important; }
/* Ensure native selects are visible now that custom dropdowns are removed */
.filter-select-native { display: inline-block !important; }

/* Round exceptions: search search button + back-to-top must be circular */
.header .search-container > .search-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
}
.header .search-container > .search-btn::before { content: none !important; }
.scroll-to-top { border-radius: 50% !important; }
@media (max-width: 600px) {
    .header .search-container > .search-btn { width: 40px !important; min-width: 40px !important; height: 40px !important; }
}

/* Make the whole search field pill-shaped */
.header .search-container,
.header .search-container:focus-within { border-radius: 999px !important; }

/* ===============================
   Final Product Tile Refresh
   (must stay near file end)
   =============================== */
body.theme-b2b .products-list .product-card {
    border: 1px solid #d8dee8 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
body.theme-b2b .products-list .product-card:hover {
    border-color: #cfd7e3 !important;
    box-shadow: none !important;
    transform: none !important;
}

.products-list .product-media {
    border: 1px solid #e7ecf3 !important;
    border-radius: 10px !important;
    background: #f7f9fc !important;
}
.products-list .product-media img,
.product-card .product-media img {
    object-fit: contain !important;
}

.products-list .product-specs .spec-row {
    background: #f7f9fc;
    border: 1px solid #e7ecf3;
    border-radius: 10px;
    padding: 8px 10px;
}
.products-list .product-specs dt { color: #7b8698; }
.products-list .product-specs dd { color: #111827; font-weight: 700; }

.products-list .product-title { color: #111827; }
.products-list .product-desc { color: #6b7280; }
.products-list .product-price { color: #111827; }

body.theme-b2b .products-list .product-order .btn-primary,
body.theme-b2b .products-list .product-actions .btn-primary {
    background: #155eef !important;
    border: 1px solid #155eef !important;
    color: #fff !important;
    box-shadow: none !important;
}
body.theme-b2b .products-list .product-order .btn-primary:hover,
body.theme-b2b .products-list .product-actions .btn-primary:hover {
    background: #0e4fd6 !important;
    border-color: #0e4fd6 !important;
    transform: none !important;
}

.products-list .fav-toggle {
    border: 1px solid #dde3ec;
    background: #fff;
    box-shadow: none;
}
.products-list .fav-toggle:hover {
    background: #f8fafd;
    border-color: #cfd7e3;
}

/* Disable decorative favorite animations/waves for cleaner UI. */
.products-list .fav-icon.anim-pop,
.products-list .fav-icon.hearted.anim-pulse {
    animation: none !important;
}
.products-list .btn-wave {
    display: none !important;
}

/* Balanced subcategory row tiles: compact, readable, and less visually heavy. */
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-card {
    grid-template-columns: minmax(128px, 164px) minmax(0, 1fr) minmax(176px, 214px);
    gap: 10px;
    padding: 9px 11px;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-media {
    aspect-ratio: 5 / 3;
}
.subcategory-page.group-page .products-list .product-media {
    height: auto;
    min-height: 0;
    max-height: none;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-media {
    width: 100%;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-body {
    gap: 3px;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-title {
    font-size: 1rem;
    line-height: 1.2;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-desc {
    font-size: 0.9rem;
    line-height: 1.3;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-specs {
    gap: 5px;
    grid-auto-rows: 1fr;
    align-items: stretch;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-specs .spec-row {
    padding: 2px 7px;
    min-height: 34px;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: stretch;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-specs dt {
    font-size: 0.58rem;
    margin: 0;
    line-height: 1.05;
    min-height: 10px;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-specs dd {
    font-size: 0.9rem;
    line-height: 1.05;
    margin-top: 2px;
    display: flex;
    align-items: flex-end;
}

.subcategory-page.group-page .products-list[data-layout="grid"] .product-specs dt {
    margin: 0;
    line-height: 1.05;
    min-height: 0;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-specs dd {
    line-height: 1.05;
    margin-top: 1px;
    display: block;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "qty price"
        "actions actions";
    align-items: end;
    column-gap: 8px;
    row-gap: 5px;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-price {
    font-size: clamp(1.55rem, 0.95vw + 0.85rem, 2.25rem);
    line-height: 1;
    grid-area: price;
    justify-self: start;
    align-self: end;
    margin: 0;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .qty-control {
    font-size: 0.7rem;
    grid-area: qty;
    align-items: flex-end;
    justify-self: end;
    align-self: end;
    width: auto;
    margin: 0;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .qty-input {
    width: 46px;
    padding: 2px 5px;
    font-size: 0.9rem;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .qty-unit {
    font-size: 0.82rem;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .btn-primary.btn-wide {
    min-width: 170px;
    height: 34px;
    font-size: 0.9rem;
    font-weight: 700;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .product-actions {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    width: 100%;
    grid-area: actions;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .product-actions .fav-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    padding: 0;
    flex: 0 0 auto;
}
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .product-actions .btn-primary.btn-wide {
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

/* Keep the same behavior in grid mode: compact specs, right-aligned price+qty line. */
.subcategory-page.group-page .products-list[data-layout="grid"] .product-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "qty price"
        "actions actions";
    align-items: end;
    column-gap: 8px;
    row-gap: 4px;
    text-align: right;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-price {
    grid-area: price;
    justify-self: start;
    align-self: end;
    margin: 0;
    font-size: clamp(1.7rem, 1vw + 0.8rem, 2.35rem);
}
.subcategory-page.group-page .products-list[data-layout="grid"] .qty-control {
    grid-area: qty;
    justify-self: end;
    align-items: flex-end;
    align-self: end;
    width: auto;
    margin: 0;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .qty-input {
    width: 30px;
    height: 15px;
    padding: 4px 6px;
    margin: 0;
    border-width: 1px;
    box-sizing: content-box;
    font-size: 14px;
    font-weight: 600;
    line-height: 15px;
    text-align: center;
    vertical-align: middle;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-order .product-actions {
    grid-area: actions;
    margin-top: -1px;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-specs .spec-row {
    padding: 2px 7px;
    min-height: 34px;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: stretch;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-specs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Keep image size static and reserve equal content space in grid cards. */
.subcategory-page.group-page .products-list[data-layout="grid"] .product-card {
    grid-template-rows: 170px 1fr auto;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-media {
    height: 170px;
    min-height: 170px;
    max-height: 170px;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-body {
    min-height: 0;
}


/* Grid cards keep a stable default size; specs can expand per-card via arrow. */
.subcategory-page.group-page .products-list[data-layout="grid"] .product-card {
    min-height: 466px;
    align-self: start;
}
.subcategory-page.group-page .products-list[data-layout="grid"] {
    align-items: start;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-body {
    display: flex;
    flex-direction: column;
    position: relative;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-card {
    position: relative;
    overflow: visible;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-card.specs-expanded {
    z-index: 20;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-expand {
    margin-top: 6px;
    align-self: flex-start;
    width: 28px;
    height: 24px;
    border: 1px solid #d6deea;
    border-radius: 8px;
    background: #fff;
    color: #60708a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-expand:hover {
    background: #f6f9ff;
    border-color: #c8d3e3;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-expand-icon {
    font-size: 14px;
    line-height: 1;
    transition: transform .12s ease;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .product-card.specs-expanded .specs-expand-icon {
    transform: rotate(180deg);
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-popover {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(16,24,40,0.16);
    padding: 8px;
    z-index: 30;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-popover[hidden] {
    display: none !important;
}
.subcategory-page.group-page .products-list[data-layout="grid"] .specs-popover .product-specs-popover {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

/* Favorite button now lives in actions for subcategory rows (not over image). */
.subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-media > .fav-toggle {
    display: none !important;
}

@media (max-width: 980px) {
    .subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }
    .subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order {
        align-items: stretch;
        text-align: left;
        grid-template-columns: 1fr;
        grid-template-areas:
            "price"
            "qty"
            "actions";
    }
    .subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .btn-primary.btn-wide {
        min-width: 0;
        width: 100%;
    }
    .subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .product-actions {
        justify-content: stretch;
    }
    .subcategory-page.group-page .products-list:not([data-layout="grid"]) .product-order .product-actions .btn-primary.btn-wide {
        flex: 1 1 auto;
    }
}
.header .search-container .search-input { border-radius: 999px 0 0 999px !important; }

/* ===============================
   Airport board-style ticker under slider
   =============================== */
.ticker { position: relative; background: #0b1120; color: #eaf2ff; border-bottom: 1px solid #0e1730; overflow: hidden; min-height: 42px; }
.ticker > .container { padding-left: 20px; padding-right: 16px; }
.ticker .ticker-track { display: inline-flex; align-items: center; gap: 28px; padding: 10px 0; will-change: transform; white-space: nowrap; }
.ticker .ticker-seg { font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffffff; }
/* subtle flap-like separators via text-shadow */
.ticker .ticker-seg { text-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 -1px 0 rgba(0,0,0,0.35); }
.ticker .ticker-track.run { animation: ticker-scroll 28s linear infinite; }
@keyframes ticker-scroll {
    from { transform: translate3d(0,0,0); }
    to   { transform: translate3d(-50%,0,0); }
}
/* Dark theme variant (keep same palette) */
body.theme-dark .ticker { background: #0b1120; color: #eaf2ff; border-bottom-color: #222a42; }
/* Remove top-edge shadow on categories when ticker is present */
.ticker + .categories.section-shadow-top::before { display: none !important; content: none !important; }

/* removed assistant dark theme adjustments */

/* Assistant header button */
.assistant-header-btn{margin:0 10px;display:inline-flex;align-items:center;justify-content:center;width:50px;height:50px;min-width:50px;min-height:50px;flex:0 0 50px;aspect-ratio:1/1;flex-shrink:0;padding:0 !important;border:1px solid transparent;background:#000;color:#fff;border-radius:50% !important;clip-path: circle(50% at 50% 50%);cursor:pointer;line-height:0;vertical-align:middle;font-weight:700;font-size:21px;position:relative;overflow:hidden;isolation:isolate;/* subtle moving black-on-black gradient */background-image: radial-gradient(140% 140% at 30% 30%, #111 0%, #000 45%, #101010 70%, #000 100%)}
.assistant-header-btn .ai-label{position:relative;z-index:1;padding:0 !important;margin:0 !important;line-height:1}
/* Animated sheen stripe */
.assistant-header-btn::after{content:"";position:absolute;inset:-35%;background:linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.14) 46%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0.14) 54%, transparent 70%);transform:translateX(-60%) rotate(18deg);opacity:.75;pointer-events:none;border-radius:50%;mix-blend-mode:screen;animation:aiSheen 3.6s ease-in-out infinite}
.assistant-header-btn .ai-label{line-height:1;display:inline-flex;align-items:center;justify-content:center;padding:0 !important}
.assistant-header-btn:hover{background:#000 !important;color:#fff !important;border-color:transparent !important}
.assistant-header-btn:hover::after{opacity:1;animation-duration:2.2s}

@keyframes aiSheen{0%{transform:translateX(-60%) rotate(18deg)}50%{transform:translateX(60%) rotate(18deg)}100%{transform:translateX(-60%) rotate(18deg)}}

/* Header button shadows */
/* Base subtle elevation for header controls (exclude brand to keep it text-like) */
.header .search-container,
.assistant-header-btn,
#cartBtn.cart-flat,
.auth-buttons .profile-wrapper {
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.14) !important;
    transition: box-shadow .15s ease;
}

/* Header buttons (except AI) should be backgroundless */
.header .auth-buttons button,
#cartBtn.cart-flat,
.auth-buttons .profile-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text) !important;
}
/* Hover: keep background transparent and tint text/icons to brand */
.header .auth-buttons button:hover,
#cartBtn.cart-flat:hover,
.auth-buttons .profile-wrapper:hover {
    background: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
    color: #c99f72 !important;
}
/* Ensure nested controls/icons inherit the hover tint for profile only */
.auth-buttons .profile-wrapper:hover > #profileBtn,
.auth-buttons .profile-wrapper:hover > #profileBtn * {
    color: #c99f72 !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

@media (max-width: 640px) {
    :root { --header-h: 136px; }

    .header {
        padding: 8px 0;
    }

    .header > .container {
        min-height: var(--header-h);
        align-items: flex-start;
    }

    .header-content {
        flex-wrap: wrap;
        align-items: center;
        column-gap: 8px;
        row-gap: 10px;
        padding: 6px 0;
    }

    .header .brand {
        margin-right: auto;
    }

    .assistant-header-btn {
        margin: 0;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        flex: 0 0 44px;
    }

    .header .auth-buttons {
        margin-left: 0;
        gap: 4px;
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
    }

    .auth-buttons .profile-wrapper {
        min-width: 0;
        max-width: calc(100vw - 168px);
        padding: 0 8px;
    }

    #profileBtn {
        font-size: 14px !important;
    }

    .profile-btn-label {
        max-width: 96px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #cartBtn.cart-flat {
        gap: 4px;
        padding: 8px 2px !important;
        font-size: 14px !important;
    }

    #cartBtn.cart-flat .cart-icon {
        width: 24px;
        height: 24px;
    }

    #cartBtn.cart-flat .cart-count-text {
        font-size: 14px;
    }

    .header .search-container {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        margin: 2px 0 0 0;
    }
}

/* Cart: only outline stroke changes color, wheels stay constant */
#cartBtn.cart-flat .cart-icon path { transition: stroke .18s ease; }
#cartBtn.cart-flat .cart-icon circle { fill: #111 !important; transition: fill .18s ease; }
#cartBtn.cart-flat:hover .cart-icon path { stroke: #c99f72 !important; }
#cartBtn.cart-flat:hover .cart-icon circle { fill: #c99f72 !important; }

/* No special shadow overrides for alternate header modes */

/* Hover state: a touch more elevation for clarity (exclude cart/profile/brand) */
.header .search-container:hover,
.assistant-header-btn:hover {
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.22) !important;
}
