/* ============================================
   КОЛЬОРОВА СХЕМА
   ============================================ */
:root {
    --primary-black: #1a1a1a;
    --primary-gray: #333333;
    --secondary-gray: #666666;
    --border-gray: #e5e5e5;
    --light-gray: #f5f5f5;
    
    --accent-gold: #d4af37;
    --accent-red: #d32f2f;
    
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-gray: #666666;

    /* Mobile drawer width shared between nav and cart (adjustable) */
    --mobile-drawer-width: 250px;
    /* Global radius for rounded theme */
    --radius: 8px;
}

/* ======= Strong mobile overrides (last resort) ======= */
@media (max-width: 900px) {
    /* Keep navbar sticky on mobile so it stays at the top during scroll */
    .navbar { position: sticky !important; top: 0; z-index: 1200; padding: 0.75rem 0.6rem !important; }
    .nav-container { width: 100% !important; gap: 0.75rem !important; padding: 0 !important; align-items: center !important; justify-content: space-between !important; }
    .nav-brand { flex: 0 0 auto !important; }
    .nav-brand h1 { font-size: 1.05rem !important; margin: 0 !important; letter-spacing: 0.08em !important; }
    .nav-right { flex: 0 0 auto !important; gap: 0.6rem !important; }
    .nav-center-links { display: none !important; }
    .language-switcher { gap: 0.3rem !important; padding-right: 0.6rem !important; border-right: 1px solid var(--border-gray) !important; }
    .lang-btn { padding: 0.3rem 0.5rem !important; font-size: 0.65rem !important; }
    .icon-btn { padding: 0.5rem !important; width: 36px !important; height: 36px !important; }

    /* Ensure search is hidden but animatable on mobile; keep header compact */
    .search-container {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        order: 3 !important;
        max-height: 0 !important;
        width: 100% !important;
        opacity: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        transform: translateY(-6px) !important;
        padding: 0 !important;
        margin-top: 0 !important;
        transition: max-height 280ms ease, opacity 220ms ease, transform 200ms ease, padding 220ms ease !important;
    }

    /* Make the main layout a single column and put sidebar above products */
    .main-wrapper { display: flex !important; flex-direction: column !important; padding: 1rem !important; }
    .sidebar { order: -1 !important; width: 100% !important; }
    .sidebar-content { position: static !important; max-height: none !important; }

    /* Product gallery: big main image and horizontal thumbs */
    .gallery { display: flex !important; flex-direction: column !important; gap: 0.75rem !important; }
    .gallery-main { width: 100% !important; }
    .gallery-main-img { max-height: 420px !important; height: auto !important; object-fit: contain !important; }
    .gallery-thumbs { display: flex !important; flex-direction: row !important; gap: 0.6rem !important; overflow-x: auto !important; padding-bottom: 0.25rem !important; }
    .gallery-thumb { width: 64px !important; height: 64px !important; flex: 0 0 auto !important; }

    /* Product details spacing */
    .details { padding: 0.5rem 0 !important; }
    .product-sizes .checkbox { width: 100% !important; }

    /* Footer safe area handled on footer itself; removed body padding to avoid white band under footer */
}

@media (max-width: 600px) {
    .navbar { padding: 0.65rem 0.5rem !important; }
    .nav-container { gap: 0.4rem !important; }
    .nav-brand h1 { font-size: 1.05rem !important; }
    .nav-right { gap: 0.45rem !important; }
    .language-switcher { gap: 0.25rem !important; padding-right: 0.45rem !important; }
    .lang-btn { padding: 0.25rem 0.4rem !important; font-size: 0.6rem !important; }
    .icon-btn { padding: 0.42rem !important; width: 34px !important; height: 34px !important; }
}

@media (max-width: 480px) {
    .navbar { padding: 0.55rem 0.45rem !important; }
    .nav-container { gap: 0.25rem !important; }
    .nav-brand h1 { font-size: 0.95rem !important; letter-spacing: 0.05em !important; }
    .nav-right { gap: 0.3rem !important; }
    .language-switcher { gap: 0.15rem !important; padding-right: 0.35rem !important; }
    .lang-btn { padding: 0.2rem 0.3rem !important; font-size: 0.55rem !important; }
    .icon-btn { padding: 0.4rem !important; width: 32px !important; height: 32px !important; }

    /* Even more compact gallery on small phones */
    .gallery-main-img { max-height: 360px !important; }
    .gallery-thumb { width: 54px !important; height: 54px !important; }

    /* Bigger tap targets for product controls */
    #btn-add-to-cart { padding: 0.9rem 1rem !important; font-size: 1rem !important; }

    /* Ensure filters are visible above content and not collapsed by layout */
    .sidebar-toggle { display: block !important; }
    .sidebar-content { border: 1px solid var(--border-gray) !important; margin-bottom: 1rem !important; }
}

/* ==================================================
   Rounded theme: apply subtle border-radius across UI
   ================================================== */
:root { --ui-radius: var(--radius); }

/* Buttons and interactive controls */
.btn-primary, .btn-secondary, button, .icon-btn, .lang-btn {
    border-radius: var(--ui-radius) !important;
}

/* Form controls */
input[type="text"], input[type="email"], input[type="tel"], select, textarea, .search-input {
    border-radius: calc(var(--ui-radius) - 2px) !important;
    background: #fff;
    border: 1px solid var(--border-gray);
    padding: 0.6rem 0.75rem;
    font-family: Roboto, sans-serif;
}

/* Checkout select: styled to match site look with custom arrow */
.checkout-card select,
.checkout-card select:-moz-focusring {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 2.0rem 0.6rem 0.75rem;
    height: 44px;
    line-height: 1.2;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    background-color: #fff;
    border-radius: 8px !important;
    border: 1px solid #e6e6e6;
}
.checkout-card select:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }

/* Make country select visually consistent */
#country { -webkit-appearance: none; -moz-appearance: none; appearance: none; }

/* Radios and checkboxes use site's dark accent (black) */
input[type="radio"], input[type="checkbox"] { accent-color: var(--text-dark) !important; }

/* Provide higher contrast when radios are focused */
input[type="radio"]:focus { outline: 2px solid rgba(0,0,0,0.06); outline-offset: 2px; }

/* Checkout: static comment textarea and privacy row styling */
.static-comment {
    width: 100% !important;
    padding: 0.8rem !important;
    border: 1px solid var(--border-gray) !important;
    border-radius: 6px !important;
    resize: none !important;
    height: 96px !important;
    margin-top: 0.5rem !important;
    font-family: Roboto, sans-serif !important;
}
.privacy-row { display:inline-flex; align-items:center; gap:0.45rem; font-weight:500; }
.privacy-row input[type="checkbox"] { width:18px; height:18px; margin:0; }
.privacy-link { margin-left:0px; text-decoration:underline; color:var(--text-dark); font-weight:600; display:inline-block; }


/* ---------- Custom select (used for country on checkout) ---------- */
.custom-select-wrapper { position: relative; width: 100%; margin-top: 0.5rem; }
.custom-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    height: 44px;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
}
.custom-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.custom-select__value { font-family: Roboto, sans-serif; color: var(--text-dark); }
.custom-select__arrow { width: 14px; height: 14px; opacity: 0.9; }
.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(18,18,18,0.08);
    max-height: 240px;
    overflow: auto;
    z-index: 1300;
    padding: 6px 6px;
    display: none;
}
.custom-options.open { display: block; }
.custom-option {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: Roboto, sans-serif;
    color: var(--text-dark);
}
.custom-option:hover { background: var(--light-gray); }
.custom-option.selected { background: #111; color: #fff; }

/* Ensure native select hidden but accessible to forms */
.custom-select-hidden { position: absolute !important; left: -9999px !important; }


/* Cards, panels, drawers */
.checkout-card, .product-card, .feature, .guide-card, .sidebar-content, .footer-section, .hero, .cart-drawer {
    border-radius: var(--ui-radius) !important;
}

/* Make images slightly rounded (subtle) */
.product-image img, .gallery-main-img, .gallery-thumb, .cart-drawer .cart-item img, .guide-card .guide-image img {
    border-radius: calc(var(--ui-radius) / 2) !important;
}

/* Ensure small elements remain usable */
.btn-primary, .btn-secondary { overflow: hidden; }

/* Tweak specific components that earlier forced no-radius */
.guide-card .guide-image img { border-radius: calc(var(--ui-radius) / 2) !important; }
.form-success { border-radius: calc(var(--ui-radius) / 2) !important; }

/* Keep certain UI controls square: filters, size pickers, checkbox controls only */
.filter-group,
.filter-group-header,
.filter-group .checkbox,
.checkbox {
    border-radius: 0 !important;
}

/* Product sizes (explicit): keep them rounded for better UX */
.product-sizes .checkbox {
    border-radius: 8px !important;
    border: 1px solid var(--border-gray);
    padding: 0.6rem 0.8rem !important;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
} 
.product-sizes .checkbox input { margin-right: 0.75rem; }
.product-sizes .checkbox:hover { background: #fafafa; }

/* Social links and buttons should be rounded */
.social-link {
    border-radius: var(--ui-radius) !important;
}

/* Sort and filter options themselves can be rounded or square depending on context */
.sort-options {
    border-radius: 0 !important;
}
.sort-option {
    border-radius: 0 !important;
}

/* Add rounding to other common containers and panels */
form, fieldset, .form-group, .panel, .section, .info-block, .contact-block, .message-block {
    border-radius: var(--ui-radius) !important;
}

/* Ensure supply/contact sections are rounded */
.supplier-card, .mission-section {
    border-radius: var(--ui-radius) !important;
}

/* Additional rounded elements for consistency */
.modal, .dialog, .popup, .notification, .alert, .badge {
    border-radius: var(--ui-radius) !important;
}

/* Notification default appearance (toast style) */
.notification {
    background: #1a1a1a;
    color: #fff;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 4px 12px rgba(18,18,18,0.25);
    font-weight: 600;
    font-family: Roboto, sans-serif;
    z-index: 1200;
    border-radius: 8px !important;
    display: inline-block;
}

@keyframes slideIn {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-8px); opacity: 0; }
} 


/* Gallery navigation and other controls */
.gallery-control, .gallery-nav, .carousel-control, .carousel-btn {
    border-radius: calc(var(--ui-radius) / 2) !important;
}

/* Contact and info sections */
.contact-section, .info-section, .address-block, .contact-card, .email-block, .phone-block, .telegram-block {
    border-radius: var(--ui-radius) !important;
}

/* Form wrappers and fieldsets */
.form-wrapper, .form-container, fieldset {
    border-radius: var(--ui-radius) !important;
}

/* Sidebar and filter header/toggle */
.sidebar, .sidebar-toggle {
    border-radius: var(--ui-radius) !important;
}

/* Make sure all panels/boxes are rounded */
.box, .card, .panel-content, .container-rounded {
    border-radius: var(--ui-radius) !important;
}

/* Hero sections and main containers */
.hero-section, .section-content {
    border-radius: var(--ui-radius) !important;
}

/* Product containers */
.product-detail, .product-info-container {
    border-radius: var(--ui-radius) !important;
}


/* Mobile: keep tap targets rounded too */
@media (max-width: 900px) {
    .icon-btn, .lang-btn { border-radius: calc(var(--ui-radius) + 2px) !important; }
}


/* Mobile search overlay: when search activated, make it fixed and overlay language switcher */
@media (max-width: 900px) {
    .search-container.active {
        position: fixed !important;
        top: 0; left: 0; right: 0;
        background: rgba(255,255,255,0.98) !important;
        padding: 0.6rem 0.75rem !important;
        z-index: 1400 !important;
        display: flex !important;
        align-items: center !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
        max-height: 120px !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: all !important;
        overflow: visible !important;
    }
    .search-container.active .search-input {
        width: 100% !important;
        padding: 0.5rem 2.5rem 0.5rem 0.75rem !important;
        font-size: 0.95rem !important;
    }
    /* Hide language switcher when search overlay is active */
    .nav-container .search-container.active ~ .nav-right .language-switcher {
        display: none !important;
    }
    /* Ensure nav-right icons remain visible above overlay when needed */
    .nav-container .search-container.active ~ .nav-right { z-index: 1450 !important; }
}

/* ============================================
   БАЗОВІ СТИЛІ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Плавные переходы страницы */
.page-transition-target {
    transition: opacity 320ms cubic-bezier(.2,.8,.2,1), transform 320ms cubic-bezier(.2,.8,.2,1);
    will-change: opacity, transform;
}
.page-exit {
    opacity: 0;
    transform: translateY(8px) scale(0.998);
}
.page-enter {
    opacity: 0;
    transform: translateY(-8px) scale(0.998);
}
.page-enter.page-transition-target {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Мягкая анимация появления для карточек товаров */
.product-card {
    transition: transform 280ms cubic-bezier(.2,.8,.2,1), box-shadow 280ms ease, opacity 280ms ease;
    will-change: transform, opacity;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(18,18,18,0.06);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Roboto', sans-serif;
    font-weight: 600;
    letter-spacing: 0;
}

/* ============================================
   НАВІГАЦІЯ
   ============================================ */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-gray);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    width: 100%;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-dark);
}

.nav-brand-link { text-decoration: none; color: inherit; }
.nav-brand-link h1 { margin: 0; }

.nav-center-links {
    display: flex;
    gap: 2.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--secondary-gray);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--text-dark);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Mobile nav drawer (left side) */
.mobile-nav-drawer {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--mobile-drawer-width);
    background: #ffffff;
    border-right: 1px solid var(--border-gray);
    z-index: 1150;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 320ms cubic-bezier(.2,.8,.2,1);
    box-shadow: none;
    border-radius: 0 12px 12px 0;
}
.mobile-nav-drawer.open { transform: translateX(0%); }
.mobile-nav-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1100;
    display: none;
}
.mobile-nav-drawer.open ~ .mobile-nav-drawer-backdrop { display: block; }
.mobile-nav-drawer-header { padding: 16px; border-bottom: 1px solid var(--border-gray); display: flex; align-items: center; justify-content: space-between; }
.mobile-nav-drawer-header .close-btn { background: none; border: none; color: var(--text-dark); font-size: 1.5rem; cursor: pointer; padding: 0; }
.mobile-nav-drawer-content { padding: 0; overflow-y: auto; flex: 1; }
.mobile-nav-item { display: block; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; color: var(--text-dark); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: all 0.3s ease; }
.mobile-nav-item:hover { background: var(--light-gray); color: var(--text-dark); }
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.4rem;
    width: 32px;
    height: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-right: 10px;
    order: -1;
}
.hamburger-btn span {
    width: 20px;
    height: 2px;
    background: currentColor;
    display: block;
    transition: all 0.3s ease;
}

@media (max-width: 900px) {
    .hamburger-btn { display: flex; }
}

@media (max-width: 480px) {
    .hamburger-btn {
        padding: 0.3rem !important;
        width: 28px !important;
        height: 28px !important;
        gap: 3px !important;
    }
    .hamburger-btn span {
        width: 18px !important;
        height: 1.5px !important;
    }
    /* Use variable so cart and nav stay in sync */
    :root { --mobile-drawer-width: 220px; }
    .mobile-nav-drawer { width: var(--mobile-drawer-width); }
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 380px;
    max-width: 100%;
    background: #ffffff;
    border-left: 1px solid var(--border-gray);
    z-index: 1600; /* above most UI elements */
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(.2,.8,.2,1);
    box-shadow: -8px 0 24px rgba(18,18,18,0.06);
    will-change: transform;
}
.cart-drawer.open { transform: translateX(0%); }
.cart-drawer .cart-header { padding: 18px; border-bottom: 1px solid var(--border-gray); display:flex; align-items:center; justify-content:space-between; }
.cart-drawer .cart-body { padding: 12px 16px; overflow-y: auto; flex:1; }
.cart-drawer .cart-item { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border-gray); }
.cart-drawer .cart-item img { width:64px; height:64px; object-fit:cover; border:1px solid #eee; }
.cart-drawer .cart-footer { padding: 12px 16px; border-top: 1px solid var(--border-gray); }
.cart-drawer .cart-empty { padding: 24px; color: var(--secondary-gray); }
.cart-drawer .btn-plain { background: transparent; border: none; color: var(--primary-black); cursor: pointer; font-weight: 600; }
.cart-drawer .btn-primary { background: var(--primary-black); color: white; border: none; padding: 10px 12px; cursor: pointer; font-weight:700; }
@media (max-width: 768px) {
    /* Match mobile nav drawer width so cart is a compact side panel on phones/tablets */
    .cart-drawer {
        width: var(--mobile-drawer-width);
        max-width: var(--mobile-drawer-width);
    }
    .cart-drawer .cart-header { padding: 14px; }
    .cart-drawer .cart-body { padding: 8px 12px; }

    /* Make cart items more compact so name/price fit in narrow drawer */
    .cart-drawer .cart-item { padding: 8px 0; gap: 8px; align-items: flex-start; }
    .cart-drawer .cart-item img { width: 48px; height: 48px; flex: 0 0 auto; }
    /* Target info container (image + info order) */
    .cart-drawer .cart-item img + div { font-size: 0.95rem; line-height: 1.15; }
    .cart-drawer .cart-item img + div div { font-size: 0.85rem; color: var(--secondary-gray); margin-top: 4px; }

    /* Compact controls */
    .cart-drawer .cart-item input[type="number"] { width: 42px; font-size: 0.95rem; padding: 4px; }
    .cart-drawer .cart-item .btn-plain { padding: 6px 8px; font-size: 0.95rem; }

    .cart-drawer .cart-footer { padding: 8px 12px; }
}
@media (max-width: 480px) {
    /* Smaller phones: match narrower mobile nav width */
    .cart-drawer {
        width: var(--mobile-drawer-width);
        max-width: var(--mobile-drawer-width);
    }
    .cart-drawer .cart-header { padding: 12px; font-size: 0.95rem; }
    .cart-drawer .cart-body { padding: 6px 10px; }

    /* Even more compact for small phones */
    .cart-drawer .cart-item { padding: 6px 0; gap: 6px; align-items: flex-start; }
    .cart-drawer .cart-item img { width: 44px; height: 44px; }
    .cart-drawer .cart-item img + div { font-size: 0.92rem; }
    .cart-drawer .cart-item img + div div { font-size: 0.82rem; }

    .cart-drawer .cart-item input[type="number"] { width: 36px; font-size: 0.9rem; padding: 3px; }
    .cart-drawer .cart-item .btn-plain { padding: 5px 6px; font-size: 0.9rem; }

    .cart-drawer .cart-footer { padding: 6px 10px; }
}

/* Backdrop for cart drawer (covers page and allows click to close) */
.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1500; /* below cart but above content */
    display: block;
}

/* Lock body scroll while cart is open */
body.cart-open { overflow: hidden; }

/* Product page: size guides styling */
.product-size-guides { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.product-size-guides .title { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); }

/* Clickable text link matching site style */
.size-guides-link {
    display: inline-block;
    color: var(--text-dark);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 180ms ease, background 180ms ease;
    padding: 6px 0;
}
.size-guides-link:hover { color: var(--secondary-gray); }

/* Small helper block (kept for potential future use) */
.product-size-guides .size-guide { display: inline-flex; align-items: center; gap: 0.6rem; padding: 8px 10px; border: 1px solid var(--border-gray); background: #fff; color: var(--text-dark); text-decoration: none; border-radius: 6px; font-size: 0.92rem; }
.product-size-guides .size-guide:hover { background: var(--light-gray); }
.product-size-guides .size-guide img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; }
@media (max-width: 480px) {
    .size-guides-link { font-size: 0.92rem; }
    .product-size-guides .size-guide img { width: 28px; height: 28px; }
    .product-size-guides .size-guide { padding: 6px 8px; font-size: 0.86rem; }
}

/* Size guides page: uniform cards */
.guides-grid { gap: 1rem; }
.guide-card { border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--border-gray); }
.guide-card .guide-image { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; min-height: 420px; display: block; }
.guide-card .guide-image img { width: 100%; height: 100%; object-fit: contain; display:block; border-radius: 8px; }
.guide-card .guide-caption { padding: 12px; font-weight: 600; color: var(--text-dark); }
.guide-card:hover { box-shadow: 0 8px 20px rgba(18,18,18,0.06); }
.guide-card:active { transform: translateY(1px); }

@media (max-width: 820px){
    .guides-grid{ grid-template-columns: 1fr !important; }
    .guide-card .guide-image { min-height: 300px; }
}

/* Ensure rounded corners on size guide cards and images */
.guides-grid .guide-card,
.guides-grid .guide-card .guide-image,
.guides-grid .guide-card .guide-image img {
    border-radius: 8px !important;
}
.guides-grid .guide-card .guide-caption,
.size-guide {
    border-radius: 6px !important;
}

/* ============================================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ
   ============================================ */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Separator between language switcher and header icons */
.nav-right .language-switcher {
    padding-right: 2.0rem;
    margin-right: 0.0rem;
    border-right: 1px solid var(--border-gray);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-gray);
    color: var(--text-dark);
    padding: 0.4rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    border-radius: 2px;
}

.lang-btn:hover {
    border-color: var(--text-dark);
    background: var(--light-gray);
}

.lang-btn.active {
    background: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.icon-btn:hover {
    color: var(--secondary-gray);
}

.nav-cart {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-red);
    color: var(--text-light);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================
   ПОШУК
   ============================================ */
.search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    width: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.search-container.active {
    opacity: 1;
    width: 400px;
    pointer-events: all;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-gray);
    background: white;
    font-family: Roboto, sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.search-input:focus {
    border-color: var(--text-dark);
}

.search-close-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-gray);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 500;
    border-radius: 8px;
}

.search-results-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-result-item:hover {
    background: var(--light-gray);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 50px;
    height: 50px;
    background: var(--light-gray);
    flex-shrink: 0;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-gray);
    border-radius: 6px;
    overflow: hidden;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.search-result-price {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

#nav-center-links {
    transition: opacity 0.4s ease;
}

/* ====== Product gallery carousel controls ====== */
.gallery-wrap { position: relative; }
.gallery-main { display:flex; justify-content:center; align-items:center; }
.gallery-main-img { max-width:100%; max-height:60vh; object-fit:contain; }
.gallery-thumbs { display:flex; gap:8px; overflow-x:auto; padding:8px 0; }
.gallery-thumb { width:64px; height:64px; object-fit:cover; cursor:pointer; opacity:0.75; border:2px solid transparent; border-radius: 6px; }
.gallery-thumb.active { opacity:1; border-color: #1a1a1a; }

.gallery-prev, .gallery-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; width:40px; height:40px; border-radius:20px; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:20; }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-prev:focus, .gallery-next:focus { outline: 2px solid rgba(255,255,255,0.9); }

@media (max-width: 480px){
    .gallery-prev, .gallery-next { width:34px; height:34px; border-radius:17px; font-size:1.1rem; }
    .gallery-thumb { width:52px; height:52px; }
}

#nav-center-links.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   ОСНОВНА ОБГОРТКА
   ============================================ */
.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem;
    min-height: calc(100vh - 200px);
}

/* ============================================
   САЙДБАР
   ============================================ */
.sidebar {
    width: 250px;
    position: relative;
}

.sidebar-toggle {
    background: var(--light-gray);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-gray);
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.sidebar-toggle h2 {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-content {
    background: white;
    border: 1px solid var(--border-gray);
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 100px;
}

.sidebar-filters {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Separator between each filter group in the sidebar */
.sidebar-filters > .filter-group {
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 2rem;
    margin-bottom: 0rem;
}
.sidebar-filters > .filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* По-умолчанию скрываем списки фильтров (будут открываться кнопками) */
.sidebar-content .category-list,
.sidebar-content .brand-list,
.sidebar-content .size-grid,
.sidebar-content .price-range-wrapper,
.sidebar-content .price-filter {
    display: none;
}

/* ========== Landing page hero styles ========== */
.landing-main {
    width: 100%;
    padding: 4rem 2rem;
    /* Ensure landing content is tall enough so footer stays below */
    min-height: calc(100vh - 160px);
    box-sizing: border-box;
}
.hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    padding: 3rem;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(18,18,18,0.03);
}
.hero-inner h2 {
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.06em;
    font-weight: 800;
}
.hero-lead {
    color: var(--text-gray);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}
.hero-cta {
    display: flex;
    gap: 1rem;
}
.btn-primary {
    display: inline-block;
    padding: 0.85rem 1.25rem;
    background: var(--primary-black);
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0;
}
.btn-primary:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-secondary {
    display: inline-block;
    padding: 0.7rem 1rem;
    background: transparent;
    border: 1px solid var(--border-gray);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 0;
}
.btn-secondary:hover { background: var(--light-gray); }
.features {
    margin-top: 2.5rem;
    display: flex;
    gap: 2rem;
}
.feature {
    background: white;
    padding: 1.25rem;
    border: 1px solid var(--border-gray);
    border-radius: 0;
    flex: 1;
    text-align: center;
}
.hero-image {
    height: 360px;
    background: linear-gradient(135deg, #f6f0ff 0%, #fff 100%);
    border-radius: 0;
    box-shadow: 0 6px 30px rgba(43,18,76,0.06);
    background-image: url('product-images/hero-placeholder.jpg');
    background-size: cover;
    background-position: center;
}

/* Responsive hero */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 1.25rem; gap: 1rem; }
    .hero-image { order: -1; height: 200px; }
    .hero-inner h2 { font-size: 2.0rem; }
    .main-wrapper { padding: 0.75rem; }
    /* Stack CTAs and make them more touch-friendly */
    .hero-cta { flex-direction: column; gap: 0.6rem; align-items: stretch; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    /* Features stack vertically on narrower screens */
    .features { flex-direction: column; gap: 1rem; }
    .feature { text-align: left; }
}

@media (max-width: 480px) {
    .nav-center-links { display: none; }
    .hero-inner h2 { font-size: 1.6rem; line-height: 1.05; }
    .hero-lead { font-size: 0.9rem; }
    .hero-image { height: 140px; }
    .landing-main { padding: 0.75rem 0.5rem; }
    .hero { padding: 0.9rem; box-shadow: none; }
    .hero-cta { gap: 0.5rem; }
    .features { gap: 0.75rem; }
    .feature { padding: 1rem; }
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.size-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    padding: 0.4rem 0.5rem;
}

.checkbox:hover {
    background: var(--light-gray);
}

.checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--text-dark);
    margin-right: 0.75rem;
    flex-shrink: 0;
}

/* Product page styles */
.product-page .product-grid { gap: 2rem; }
.gallery-main { width: 100%; display:flex; align-items:center; justify-content:center; background: #fff; border:1px solid var(--border-gray); padding: 1rem; border-radius: 8px; }
.gallery-main-img { max-width:100%; max-height:560px; object-fit:contain; display:block; }
.gallery-thumbs { display:flex; gap:0.6rem; margin-top:0.8rem; flex-wrap:wrap; }
.gallery-thumb { width:74px; height:74px; object-fit:cover; border:1px solid var(--border-gray); cursor:pointer; opacity:0.9; border-radius: 6px; }
.gallery-thumb.active { outline:2px solid var(--accent-gold); opacity:1; }
.details { padding: 0.5rem 0; }
.product-price { font-size:1.25rem; font-weight:700; color:var(--text-dark); margin-top:0.5rem; }
.product-description { margin-top:0.75rem; }
.product-sizes { display:flex; gap:0.5rem; flex-wrap:wrap; margin-top:0.5rem; }
.product-sizes .checkbox { padding:0.3rem 0.4rem; border:1px solid var(--border-gray); border-radius: 6px; }

@media (max-width: 900px) {
    .product-grid { grid-template-columns: 1fr; }
    .gallery-main-img { max-height: 320px; }
}

.checkbox span {
    font-size: 0.85rem;
    color: var(--text-dark);
    transition: color 0.2s ease;
    font-weight: 400;
}

.checkbox:hover span {
    color: var(--secondary-gray);
}

.price-range {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--border-gray);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    margin-bottom: 1rem;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-dark);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-display {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* Brands styling: vertical list with category-like typography */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.brand-list .checkbox {
    padding: 0.4rem 0.5rem;
}
.brand-list .checkbox span {
    /* Exactly match category labels */
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

/* Make size labels match category labels */
.size-grid .checkbox span {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.05em;
}

/* Make filter headers clickable */
.filter-group-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Collapse button: remove native dropdown/select look and make a simple triangle */
.filter-collapse-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
}
.filter-collapse-btn:focus {
    outline: none;
}

/* Ensure collapse button aligns to the right edge and centers vertically */
.filter-group-header > .filter-collapse-btn {
    margin-left: auto;
    align-self: center;
    height: 28px;
    width: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
}

/* Make header titles occupy remaining space and align baseline */
.filter-group-header h3,
.filter-group-header h4 {
    margin: 0;
    padding: 0;
    line-height: 1.1;
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Ensure the whole checkbox row is clickable and fills width */
.checkbox {
    width: 100%;
}

.btn-reset-filters {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.btn-reset-filters:hover {
    background: var(--light-gray);
}

/* ============================================
   ОСНОВНИЙ КОНТЕНТ
   ============================================ */
.main-content {
    flex: 1;
}

/* ============================================
   ПРОДУКТИ
   ============================================ */
.products {
    margin-bottom: 4rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border: 1px solid var(--border-gray);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    /*background: linear-gradient(135deg, #ffbf1e 0%, #ffe570 100%);*/
    /* fallback */
    background-color: var(--accent-gold);
    color: var(--text-light);
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Новинка — теперь в левом верхнем углу; скидка сдвигается под неё, если обе присутствуют */
.product-new {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    /*background: linear-gradient(135deg, #00ffbf 0%, #00e1ff 100%);*/
    /* fallback */
    background-color: #ff9800; /* оранжевый */
    color: var(--text-light);
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 12;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Если есть бейдж "Новинка", смещаем бейдж скидки вниз */
.product-card .product-new ~ .product-discount {
    top: 52px;
}

/* Небольшой встроенный вариант для страницы товара */
.product-new-inline {
    display: inline-block;
    margin-left: -0.1rem;
    /*background: linear-gradient(135deg, #00ffbf 0%, #00e1ff 100%);*/
    background-color: #ff9800;
    color: var(--text-light);
    padding: 0.18rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    vertical-align: middle;
}

.product-discount {
    position: absolute;
    top: 15px;
    left: 15px;
    /*background: linear-gradient(135deg, #f9e0a1 0%, #ff0000 100%);*/
    /* fallback */
    background-color: var(--accent-red);
    color: var(--text-light);
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: inline-block;
}

.product-image {
    width: 100%;
    height: 300px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    text-align: center;
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 auto;
}

.product-info h3 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-category {
    font-size: 0.75rem;
    color: var(--secondary-gray);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 400;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-gray);
    padding-top: 1rem;
}

/* Ensure price and add-to-cart button stay aligned */
.product-footer .price,
.product-footer .price-old,
.product-footer .product-price {
    display: inline-flex;
    align-items: center;
}

.product-footer .product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.price-old {
    font-size: 0.8rem;
    color: var(--secondary-gray);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.btn-add-to-cart {
    background: var(--text-dark);
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    flex-shrink: 0;
}

.btn-add-to-cart:hover {
    background: var(--secondary-gray);
    transform: scale(1.05);
}

/* Secondary button used for continue shopping in cart modal */
.btn-secondary {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-family: Roboto, sans-serif;
    transition: background 0.2s ease, transform 0.08s ease;
}
.btn-secondary:hover {
    background: #eee;
    transform: translateY(-1px);
}

/* ============================================
   ФУТЕР
   ============================================ */
.footer {
    background: #000000; /* ensure solid black everywhere */
    color: #ffffff;
    /* include safe-area inset so footer covers device bottom */
    padding: 3rem 2rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section h3 {
    font-size: 1.25rem;
}

.footer-section p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    opacity: 0.9;
    position: relative;
}

.footer-section ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.footer-section ul li a:hover::after {
    width: 100%;
}

/* Active footer link - gold highlight */
.footer-section ul li a.gold-active,
.footer-section ul li a.gold-active:link,
.footer-section ul li a.gold-active:visited {
    color: var(--accent-gold);
    opacity: 1;
    text-shadow: 0 0 8px rgba(212,175,55,0.4);
}
.footer-section ul li a.gold-active::after {
    width: 100%;
    background: var(--accent-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Small divider before social links in footer for symmetry */
.footer-section h4 + .social-links {
    padding-left: 0;
    margin-left: 0;
    /* убрал вертикальную палочку и отступы */
    /* border-left: 1px solid rgba(255,255,255,0.06); */
}

.social-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 0;
    background: #000000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ============================================
   MOBILE RESPONSIVE - 900px and below
   ============================================ */
@media (max-width: 900px) {
    /* NAVBAR: AGGRESSIVE MOBILE RESETS */
    .navbar { padding: 0.5rem 1rem !important; }
    .nav-container {
        max-width: 100% !important;
        gap: 0.5rem !important;
        padding: 0 !important;
        justify-content: space-between !important;
    }
    .nav-brand h1 { font-size: 1.1rem !important; margin: 0 !important; }
    .nav-brand-link { display: flex !important; align-items: center !important; }
    .nav-center-links { display: none !important; }
    .search-container {
        position: static !important;
        opacity: 1 !important;
        width: 100% !important;
        transform: none !important;
        pointer-events: all !important;
        order: 10 !important;
        flex: 1 1 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .search-input { 
        width: 100% !important;
        padding: 0.4rem 0.6rem !important; 
        font-size: 0.8rem !important; 
    }
    .search-container.active {
        width: 100% !important;
    }
    .nav-right {
        display: flex !important;
        gap: 0.3rem !important;
        margin-left: 0 !important;
        align-items: center !important;
    }
    /* ICON-BTN styling */
    .icon-btn { 
        width: 32px !important; 
        height: 32px !important;
        padding: 0.3rem !important;
    }

    /* MAIN WRAPPER: stack layout */
    .main-wrapper {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
        min-height: auto !important;
    }

    /* SIDEBAR: move above products on mobile */
    .sidebar {
        width: 100% !important;
        order: -1 !important;
    }
    .sidebar-toggle { padding: 0.75rem 1rem !important; margin-bottom: 1rem !important; }
    .sidebar-content {
        position: static !important;
        max-height: none !important;
        padding: 1rem !important;
        border: 1px solid var(--border-gray) !important;
    }

    /* PRODUCT PAGE: vertical stack */
    .product-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; padding: 1.5rem 0 !important; }
    .product-detail { max-width: 100% !important; padding: 0 !important; }
    .gallery-main { padding: 0.75rem !important; }
    .gallery-main-img { max-height: 300px !important; }
    .gallery-thumbs { gap: 0.5rem !important; margin-top: 0.75rem !important; }
    .gallery-thumb { width: 60px !important; height: 60px !important; }

    /* PRODUCT CARDS */
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 1rem !important; }
    .product-image { height: 200px !important; }
    .product-info h3 { font-size: 0.9rem !important; }

    /* FOOTER: vertical stack */
    .footer-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    .footer-section { width: 100% !important; }
    .footer-section h4 + .social-links { gap: 0.5rem !important; }
}

/* ============================================
   MOBILE RESPONSIVE - 480px and below
   ============================================ */
@media (max-width: 480px) {
    /* NAVBAR: ultra-compact aggressive */
    .navbar { padding: 0.4rem 0.6rem !important; }
    .nav-container { gap: 0.3rem !important; padding: 0 !important; }
    .nav-brand h1 { font-size: 0.9rem !important; }
    /* Hide inline search on very small screens; it will open when JS adds .active and body.search-open */
    .search-container { width: 0 !important; opacity: 0 !important; pointer-events: none !important; }
    /* When activated, force it visible on small screens */
    .search-container.active {
        width: 100% !important;
        opacity: 1 !important;
        pointer-events: all !important;
        display: flex !important;
        position: fixed !important;
        top: env(safe-area-inset-top, 0px) !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(255,255,255,0.98) !important;
        padding: 0.5rem 0.75rem !important;
        z-index: 2500 !important;
    }
    .search-input { padding: 0.35rem 0.4rem !important; font-size: 0.75rem !important; }
    .icon-btn { width: 28px !important; height: 28px !important; padding: 0.2rem !important; }
    .cart-count { width: 16px !important; height: 16px !important; font-size: 0.6rem !important; }

    /* MAIN WRAPPER: minimal padding */
    .main-wrapper { padding: 1rem 0.75rem; gap: 1rem; }

    /* SIDEBAR: single-column, minimal */
    .sidebar-toggle { padding: 0.6rem 1rem; margin-bottom: 0.75rem; }
    .sidebar-toggle h2 { font-size: 0.75rem; }
    .sidebar-content { padding: 0.75rem; }
    .filter-group { margin-top: 1rem; padding-bottom: 1rem; }
    .filter-group-header h3,
    .filter-group-header h4 { font-size: 0.75rem; }

    /* PRODUCT PAGE: full-width */
    .product-detail { padding: 0; }
    .product-grid { padding: 1rem 0 !important; }
    .gallery-main { padding: 0.5rem; }
    .gallery-main-img { max-height: 250px; }
    .gallery-thumbs { gap: 0.4rem; margin-top: 0.5rem; }
    .gallery-thumb { width: 50px; height: 50px; }
    #product-details { padding: 0; }
    .product-sizes { gap: 0.4rem; margin-top: 0.75rem; }
    .product-sizes label { margin-bottom: 0.3rem; }
    #btn-add-to-cart { width: 100%; padding: 0.7rem; font-size: 0.95rem; }

    /* PRODUCT CARDS: smaller */
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
    .product-card { height: auto; }
    .product-image { height: 160px; }
    .product-info { padding: 0.75rem; }
    .product-info h3 { font-size: 0.8rem; }
    .product-category { font-size: 0.7rem; }
    .product-price { font-size: 0.85rem; }

    /* FOOTER: compact */
    .footer { padding: 1.5rem 0.75rem; }
    .footer-section { margin-bottom: 1rem; }
    .footer-section h3 { font-size: 1rem; }
    .footer-section h4 { font-size: 0.85rem; }
    .footer-section ul li a { font-size: 0.8rem; }
    .footer-bottom-content { flex-direction: column; gap: 0.5rem; }
    .footer-bottom-content p { font-size: 0.75rem; }
    .social-links { gap: 0.4rem; }
    .social-link { padding: 0.35rem 0.5rem; font-size: 0.75rem; }
}

.footer-bottom-content p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

.footer-bottom-content p:first-child {
    opacity: 1;
    font-weight: 500;
}

/* Final helpers: search-open body class and ensure footer covers safe area */
/* Apply search-open overlay behavior only on small screens */
@media (max-width: 900px) {
    body.search-open { overflow: hidden; }
    body.search-open .search-container.active { position: fixed !important; top: env(safe-area-inset-top, 0px) !important; left: 0 !important; right: 0 !important; z-index: 2500 !important; }
    body.search-open .search-container.active .search-input { width: 100% !important; }
    body.search-open .language-switcher { display: none !important; }
    body.search-open #nav-center-links { display: none !important; }
}

/* ============================================
   ПРОКРУЧУВАННЯ
   ============================================ */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: var(--light-gray);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-gray);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gray);
}

/* ============================================
   АДАПТИВНІСТЬ
   ============================================ */
@media (max-width: 1024px) {
    .nav-center-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .main-wrapper {
        flex-direction: column-reverse;
        padding: 1.5rem;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-content {
        position: static;
        max-height: none;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        gap: 1rem;
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .nav-brand h1 {
        font-size: 1.25rem;
    }

    .nav-center-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        border-bottom: 1px solid var(--border-gray);
    }

    .nav-center-links.active {
        display: flex;
    }

    .main-wrapper {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .sidebar {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.about-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about-header h1 {
    font-family: Montserrat, sans-serif;
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.about-header p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.suppliers-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 4rem 0;
}

.supplier-card {
    background: white;
    padding: 2rem;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    transition: all 0.3s ease;
}

.supplier-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.supplier-card h2 {
    font-family: Montserrat, sans-serif;
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.supplier-flag {
    font-size: 1.8rem;
}

.supplier-card h3 {
    font-family: Montserrat, sans-serif;
    font-size: 1rem;
    color: #333;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.supplier-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.supplier-card li {
    color: #666;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f5;
    padding-left: 1.5rem;
    position: relative;
}

.supplier-card li:last-child {
    border-bottom: none;
}

.supplier-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #d4af37;
    font-weight: 700;
}

.mission-section {
    background: #f5f5f5;
    padding: 3rem 2rem;
    border-radius: 0;
    margin: 4rem 0;
}

.mission-section h2 {
    font-family: Montserrat, sans-serif;
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-align: center;
}

.mission-section p {
    color: #666;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.founders-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.founders-section h3 {
    font-family: Montserrat, sans-serif;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.founders-section p {
    color: #666;
    margin: 0;
}

/* History section styling */
.history-section {
    margin: 4rem 0;
}

.history-section h2 {
    font-family: Montserrat, sans-serif;
    font-size: 1.75rem;
    color: #1a1a1a;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.history-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.history-card {
    background: white;
    padding: 2rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.history-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px);
}

.history-card h3 {
    font-family: Montserrat, sans-serif;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.history-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .suppliers-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .history-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .about-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-brand h1 {
        font-size: 1.1rem;
    }

    .nav-right {
        gap: 1rem;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
    }

    .main-wrapper {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-info {
        padding: 1rem;
    }

    .product-image {
        height: 250px;
    }

    .sidebar-content {
        padding: 1.25rem;
    }
}
