html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip !important;
    overflow-y: visible;
    position: relative;
    width: 100%;
}

html, body {
    max-width: 100% !important;
    overflow-x: clip !important;
    position: relative;
    margin: 0;
    padding: 0;
}

.nav-container, .container, .container-fluid {
    max-width: 100vw !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

section,
footer,
.footer,
.site-footer,
main > * {
    overflow-y: visible !important;
    max-height: none !important;
}

.hero-section {
    overflow: hidden !important;
}


html::-webkit-scrollbar {
    width: 14px;
}

html::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0;
}

html::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 3px solid #f1f1f1;
}

html::-webkit-scrollbar-thumb:hover {
    filter: brightness(0.8);
}

html::-webkit-scrollbar-button:single-button {
    background-color: #f1f1f1;
    display: block;
    background-size: 10px;
    background-repeat: no-repeat;
    height: 16px;
    width: 14px;
}

html::-webkit-scrollbar-button:active {
    background-color: var(--primary-color);
    filter: invert(1);
}

html {
    scrollbar-width: auto;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

*:not(html)::-webkit-scrollbar {
    display: none;
}

section, footer, .footer, .container, .container-fluid,
.mobile-menu-links, .nav-container, main, .row {
    scrollbar-width: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg-light);
    margin: 0;
}

/* ───────── Navbar Styling ───────── */
.custom-navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 0.9rem 0;
    z-index: 2000;
    transition: var(--transition);
    background: transparent;
}

.custom-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    padding: 0.65rem 0;
    border-bottom: 1.5px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.nav-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0;
}

.nav-logo:focus-visible {
    outline: 2px solid var(--primary-color, #2E4220);
    outline-offset: 3px;
}

.nav-logo img {
    height: 60px;
    width: auto;
    max-width: 170px;
    transition: var(--transition);
    object-fit: contain;
    background-color: transparent !important;
}
.custom-navbar.scrolled .nav-logo img { height: 48px; }

@media (max-width: 768px) {
    .nav-logo img { height: 44px; max-width: 130px; }
    .custom-navbar.scrolled .nav-logo img { height: 40px; }
}

/* ───────── Links & Buttons ───────── */
.nav-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.nav-link-btn {
    text-decoration: none;
    color: #334155;
    font-weight: 700;
    padding: 7px 15px;
    border-radius: 50px;
    border: 1.5px solid #e2e8f0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    font-size: 0.85rem;
}

.nav-link-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.login-btn-special {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}
.login-btn-special:hover {
    filter: brightness(0.92);
    color: #fff !important;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.cart-wrapper { 
    position: relative; 
    padding: 7px 12px;
}

#cart-icon-img {
    width: 19px;
    transition: var(--transition);
}

.cart-badge {
    position: absolute; top: -6px;
    left: var(--cart-badge-left); right: var(--cart-badge-right);
    background: #dc2626; color: white;
    min-width: 19px; height: 19px; padding: 0 4px;
    font-size: 10px; border-radius: 50px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; font-weight: 800;
}

/* ───────── Navbar Search ───────── */
.nav-center-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 16px;
}
.nav-links-group { flex: 0 0 auto; gap: 6px; }

.nav-search-wrap {
    position: relative;
    flex: 1 1 240px;
    min-width: 120px;
    max-width: 400px;
}
.nav-search-form {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 14px;
    transition: var(--transition);
}
.nav-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}
.nav-search-icon { color: #64748b; font-size: 0.85rem; flex-shrink: 0; }
.nav-search-input {
    border: none; outline: none; background: transparent;
    width: 100%; font-size: 0.88rem; color: #0f172a;
}
.nav-search-input::placeholder { color: #64748b; }

.nav-suggest-dropdown, .mobile-suggest-dropdown {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 48px -12px rgba(15, 23, 42, 0.25);
}
.nav-suggest-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    z-index: 20;
    border-radius: 16px;
    max-height: 70vh;
    max-height: 70dvh;
    overflow-y: auto;
    padding: 6px;
}
.nav-suggest-dropdown[hidden], .mobile-suggest-dropdown:empty { display: none; }

.nav-suggest-status {
    padding: 14px 16px; font-size: 0.86rem; color: #64748b; text-align: center;
}
.nav-suggest-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 12px;
    text-decoration: none !important; color: #1e1915;
    cursor: pointer; outline: none;
}
.nav-suggest-item:hover, .nav-suggest-item.is-active {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
}
.nav-suggest-thumb {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: #f1f5f9 center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color); font-size: 1rem;
}
.nav-suggest-text { flex: 1; min-width: 0; }
.nav-suggest-name {
    font-weight: 700; font-size: 0.88rem; color: #1e1915;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-suggest-meta {
    display: flex; align-items: center; gap: 8px; margin-top: 2px;
    font-size: 0.78rem; color: #64748b; overflow: hidden;
}
.nav-suggest-price { font-weight: 800; color: var(--primary-color); white-space: nowrap; }
.nav-suggest-cat {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color); padding: 1px 8px; border-radius: 50px;
    font-weight: 700; font-size: 0.72rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-suggest-oos {
    color: #b91c1c; font-weight: 700; font-size: 0.72rem; white-space: nowrap;
}
.nav-suggest-footer {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 12px; font-size: 0.82rem; font-weight: 700;
    color: var(--primary-color); text-decoration: none !important;
    border-top: 1px solid rgba(15,23,42,0.06); margin-top: 4px;
    border-radius: 10px; cursor: pointer;
}

.nav-search-toggle {
    display: none;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: var(--primary-color);
    width: 36px; height: 36px;
    border-radius: 50%;
    align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition);
}
.nav-search-toggle:hover { border-color: var(--primary-color); background: #f8fafc; }

.nav-lang-toggle { padding: 6px 12px; font-size: 0.8rem; gap: 5px; }

/* ───────── Account dropdown ───────── */
.nav-account-wrap { position: relative; }
.nav-account-btn { cursor: pointer; padding: 6px 14px; font-size: 0.85rem; }
.nav-account-caret { font-size: 0.65rem; margin-inline-start: -2px; transition: transform 0.2s ease; }
.nav-account-btn[aria-expanded="true"] .nav-account-caret { transform: rotate(180deg); }
.nav-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 190px;
    z-index: 20;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.18);
    border-radius: 14px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-account-dropdown[hidden] { display: none; }
.nav-account-dropdown a,
.nav-account-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e1915;
    text-decoration: none !important;
    text-align: start;
    cursor: pointer;
}
.nav-account-dropdown a:hover,
.nav-account-dropdown a:focus-visible,
.nav-account-logout:hover,
.nav-account-logout:focus-visible {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    color: var(--primary-color);
    outline: none;
}
.nav-account-divider { height: 1px; background: rgba(15, 23, 42, 0.08); margin: 4px 2px; }
.nav-account-logout { color: #dc2626; }
.nav-account-logout:hover, .nav-account-logout:focus-visible {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
}

/* ───────── Currency switcher ───────── */
.nav-currency-wrap { position: relative; }
.nav-currency-pill {
    cursor: pointer;
    min-height: 40px;
    padding: 0 12px 0 6px;
    font-size: 0.84rem;
    gap: 8px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    display: inline-flex;
    align-items: center;
}
.nav-currency-pill:hover,
.nav-currency-pill[aria-expanded="true"] {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 4%, #ffffff);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-color) 14%, transparent);
}
.nav-currency-pill:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.currency-flag-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 12%, #ffffff);
    color: var(--primary-color);
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-currency-label {
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
    color: #1e293b;
}
.currency-arrow {
    font-size: 0.6rem;
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
}
.nav-currency-pill[aria-expanded="true"] .currency-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.nav-currency-dropdown-deluxe {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 220px;
    max-width: calc(100vw - 24px);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1060;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 44px -12px rgba(15, 23, 42, 0.24);
    border-radius: 16px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: currencyPop 0.16s cubic-bezier(0, 0, 0.2, 1);
}
@keyframes currencyPop {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.nav-currency-dropdown-deluxe[hidden] { display: none; }
.currency-dropdown-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 6px 10px 4px;
}
.currency-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.currency-item-btn:hover,
.currency-item-btn:focus-visible {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    color: var(--primary-color);
    outline: none;
}
.currency-item-btn:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary-color);
}
.currency-item-btn.is-selected {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
}
.currency-item-symbol {
    flex: 0 0 auto;
    min-width: 34px;
    height: 28px;
    padding: 0 6px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-color) 10%, #f1f5f9);
    color: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.currency-item-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.currency-item-code {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.currency-item-name {
    font-size: 0.74rem;
    font-weight: 500;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.currency-item-check {
    flex: 0 0 auto;
    font-size: 0.74rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.currency-item-btn.is-selected .currency-item-check {
    opacity: 1;
}

.mobile-currency-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.mobile-currency-option {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "symbol code" "symbol name";
    align-items: center;
    column-gap: 10px;
    min-height: 52px;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    color: #1e293b;
    text-decoration: none !important;
    text-align: start;
}
.mobile-currency-option.is-selected {
    border-color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 10%, #ffffff);
    color: var(--primary-color);
}
.mobile-currency-option:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
.mobile-currency-symbol {
    grid-area: symbol;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary-color) 12%, #f1f5f9);
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mobile-currency-code {
    grid-area: code;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.mobile-currency-name {
    grid-area: name;
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 359px) {
    .mobile-currency-list { grid-template-columns: 1fr; }
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed; inset: 0;
    background: #ffffff;
    z-index: 2050;
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.mobile-search-overlay.active { opacity: 1; visibility: visible; }
.mobile-search-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top));
    border-bottom: 1px solid rgba(15,23,42,0.08);
}
.mobile-search-form {
    flex: 1; display: flex; align-items: center; gap: 10px;
    background: #f8f9fa;
    border: 1.5px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
    border-radius: 50px;
    padding: 10px 16px;
}
.mobile-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}
.mobile-search-input {
    border: none; outline: none; background: transparent;
    width: 100%; font-size: 0.95rem; color: #1e1915;
}
.mobile-search-close {
    flex-shrink: 0; width: 40px; height: 40px;
    border-radius: 50%; border: none; background: #f1f5f9;
    color: #1e1915; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.mobile-suggest-dropdown {
    flex: 1; overflow-y: auto;
    border: none; box-shadow: none;
    padding: 8px 12px;
}

.mobile-menu-overlay {
    position: fixed; inset: 0;
    background: #ffffff;
    z-index: 1900; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-menu-links {
    list-style: none;
    padding: 0;
    text-align: center;
    width: min(85%, 400px);
    max-height: 100vh;
    overflow-y: auto;
}
.mobile-menu-links li { width: 100%; }

.mobile-menu-header {
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--primary-color, #2E4220);
}
.mobile-menu-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--primary-color, #2E4220);
    text-transform: uppercase;
}

.mobile-menu-links a, .logout-btn-mobile {
    font-size: 1.05rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.logout-btn-mobile {
    background: none; border: none; width: 100%; font-family: inherit;
}

.menu-toggle { background: none; border: none; cursor: pointer; width: 32px; z-index: 2100; }
.bar { width: 100%; height: 2.5px; background: var(--primary-color); border-radius: 3px; display: block; margin: 5px 0; transition: 0.3s; }
.menu-open .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-open .bar:nth-child(2) { opacity: 0; }
.menu-open .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

main, [data-page-root] { padding-top: 105px; }
.home-page main, .home-page [data-page-root] { padding-top: 0; }

#main-content {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-width: 0;
}
#main-content > *:not(.footer-modern) {
    flex: 1 0 auto;
}

@media (min-width: 992px) { .menu-toggle { display: none; } }
@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: inline-flex !important; }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .nav-link-text { display: none; }
    .nav-links-group .nav-link-btn { padding: 7px 11px; }
    .nav-center-group { gap: 10px; margin: 0 10px; }
    .nav-search-wrap { min-width: 110px; }
}

@media (max-width: 768px) {
    main, [data-page-root] { padding-top: 90px; }
    .nav-container { padding: 0 14px; }
    .nav-group { gap: 6px; }
    .cart-wrapper span:not(.cart-badge) { display: none; }
}

body:not(.home-page) .custom-navbar {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(15px);
    padding: 0.65rem 0;
    border-bottom: 1.5px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.skip-to-content {
    position: absolute;
    inset-inline-start: 10px;
    top: 10px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    z-index: 9999;
}
.skip-to-content:focus {
    clip-path: none;
    white-space: normal;
    width: auto;
    height: auto;
    padding: 10px 18px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

main {
    padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
}
