/*!
 * Modern Theme for Modesy - v2.6.6
 * Mobile-first. Loaded AFTER style-2.6.css only when the "modern" theme is active.
 * Everything is scoped under body.theme-modern, so the Classic theme is untouched.
 * Base rules = phones. Larger screens are layered on with min-width queries.
 * Brand colour comes from the admin "site colour" (--mds-color-main).
 */

/* ---------- 1. Design tokens ---------- */
body.theme-modern {
    --mt-accent: var(--mds-color-main, #4f46e5);
    --mt-accent-soft: #eef2ff;
    --mt-bg: #f5f6fa;
    --mt-surface: #ffffff;
    --mt-ink: #0f172a;
    --mt-muted: #64748b;
    --mt-line: #e6e9f0;
    --mt-danger: #ef4444;
    --mt-success: #10b981;
    --mt-r: 16px;
    --mt-r-sm: 12px;
    --mt-pill: 999px;
    --mt-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --mt-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .07);
    --mt-tab-h: 64px;
    --mt-safe-t: env(safe-area-inset-top, 0px);
    --mt-safe-b: env(safe-area-inset-bottom, 0px);

    background: var(--mt-bg);
    color: var(--mt-ink) !important;
    font-size: 0.9375rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    padding-bottom: calc(var(--mt-tab-h) + var(--mt-safe-b));
}

@supports (background: color-mix(in srgb, red 10%, white)) {
    body.theme-modern {
        --mt-accent-soft: color-mix(in srgb, var(--mt-accent) 10%, #fff);
    }
}

.theme-modern a {
    color: var(--mt-ink);
}

.theme-modern a:hover {
    color: var(--mt-accent);
}

.theme-modern h1, .theme-modern h2, .theme-modern h3, .theme-modern h4, .theme-modern h5 {
    color: var(--mt-ink);
    letter-spacing: -0.01em;
}

.theme-modern ::selection {
    background: var(--mt-accent);
    color: #fff;
}

.theme-modern :focus-visible {
    outline: 2px solid var(--mt-accent) !important;
    outline-offset: 2px;
}

/* ---------- 2. Buttons & forms (44px touch targets) ---------- */
.theme-modern .btn {
    border-radius: var(--mt-pill);
    font-weight: 600;
    min-height: 44px;
    padding: .6rem 1.25rem;
    border-width: 1px;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.theme-modern .btn:active {
    transform: scale(.98);
}

.theme-modern .btn-sm {
    min-height: 36px;
    padding: .35rem .9rem;
}

.theme-modern .btn-custom {
    background: var(--mt-accent);
    border-color: var(--mt-accent);
    color: #fff !important;
    box-shadow: 0 6px 16px -6px var(--mt-accent);
}

.theme-modern .btn-md, .theme-modern .btn-lg {
    min-height: 46px;
}

.theme-modern .form-control, .theme-modern .custom-select, .theme-modern select.form-control {
    min-height: 46px;
    border-radius: var(--mt-r-sm);
    border: 1px solid var(--mt-line);
    background-color: var(--mt-surface);
    font-size: 16px; /* prevents iOS zoom on focus */
    box-shadow: none;
}

.theme-modern textarea.form-control {
    min-height: 96px;
}

.theme-modern .form-control:focus {
    border-color: var(--mt-accent);
    box-shadow: 0 0 0 4px var(--mt-accent-soft);
}

.theme-modern .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--mt-accent);
    border-color: var(--mt-accent);
}

/* ---------- 3. Mobile header (frosted, sticky) ---------- */
.theme-modern .nav-mobile-header {
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    box-shadow: none;
    border-bottom: 1px solid var(--mt-line);
    padding: calc(4px + var(--mt-safe-t)) 8px 4px;
}

.theme-modern .mobile-nav-container {
    min-height: calc(66px + var(--mt-safe-t));
}

.theme-modern .nav-mobile-header-container {
    min-height: 56px;
    overflow: visible;
}

.theme-modern .nav-mobile-header-container .mobile-logo {
    height: 44px;
}

.theme-modern .nav-mobile-header-container .item-menu-icon button,
.theme-modern .nav-mobile-header-container .a-search-icon,
.theme-modern .nav-mobile-header-container .a-mobile-cart {
    width: 44px;
    height: 44px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0;
}

.theme-modern .nav-mobile-header-container .a-search-icon:active,
.theme-modern .nav-mobile-header-container .item-menu-icon button:active {
    background: var(--mt-accent-soft);
}

.theme-modern .nav-mobile-header-container .a-mobile-cart .notification {
    top: 2px;
    right: 0;
    min-width: 18px;
    width: auto;
    padding: 0 5px;
    border-radius: var(--mt-pill);
    background: var(--mt-accent);
}

.theme-modern .mobile-search-form {
    padding: 4px 4px 8px;
}

.theme-modern .top-search-bar .form-control.input-search {
    border-radius: var(--mt-pill);
    background: var(--mt-bg);
    border: 1px solid transparent;
    padding-left: 18px;
    padding-right: 52px;
}

.theme-modern .top-search-bar .form-control.input-search:focus {
    background: #fff;
    border-color: var(--mt-accent);
}

.theme-modern .top-search-bar .btn-search {
    border-radius: 50%;
    min-height: 0;
    width: 38px;
    height: 38px;
    padding: 0;
    top: 4px;
    right: 4px;
    background: var(--mt-accent) !important;
    color: #fff !important;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-modern .nav-mobile {
    top: calc(66px + var(--mt-safe-t));
    border-top-right-radius: var(--mt-r);
}

.theme-modern .nav-tabs-mobile-menu .nav-link {
    font-weight: 600;
}

.theme-modern .nav-tabs-mobile-menu .nav-link.active {
    color: var(--mt-accent);
    border-bottom-color: var(--mt-accent);
}

/* ---------- 4. Bottom tab bar (phones/tablets) ---------- */
.theme-modern .mt-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(var(--mt-tab-h) + var(--mt-safe-b));
    padding: 0 4px var(--mt-safe-b);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--mt-line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .05);
}

.theme-modern .mt-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    min-height: 0;
    line-height: 1.1;
    font-size: 11px;
    font-weight: 600;
    color: var(--mt-muted) !important;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease;
}

.theme-modern .mt-tab span:not(.mt-ico-wrap):not(.mt-badge):not(.mt-sell-fab) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-modern .mt-tab:active {
    transform: none;
}

.theme-modern .mt-tab.active, .theme-modern .mt-tab:hover {
    color: var(--mt-accent) !important;
}

.theme-modern .mt-tab.active .mt-ico {
    stroke-width: 2.2;
}

.theme-modern .mt-ico-wrap {
    position: relative;
    display: inline-flex;
}

.theme-modern .mt-badge {
    position: absolute;
    top: -5px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--mt-pill);
    background: var(--mt-danger);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
    font-weight: 700;
}

.theme-modern .mt-tab-sell {
    color: var(--mt-ink) !important;
}

.theme-modern .mt-sell-fab {
    width: 48px;
    height: 48px;
    margin-top: -22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mt-accent);
    color: #fff;
    border: 4px solid var(--mt-bg);
    box-shadow: 0 8px 18px -4px var(--mt-accent);
}

/* lift floating UI above the tab bar */
.theme-modern .scrollup {
    bottom: calc(var(--mt-tab-h) + var(--mt-safe-b) + 14px);
    right: 12px;
}

.theme-modern .cookies-warning {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: calc(var(--mt-tab-h) + var(--mt-safe-b) + 10px);
    padding: 18px;
    border-radius: var(--mt-r);
    box-shadow: var(--mt-shadow);
}

/* ---------- 5. Layout, sections ---------- */
.theme-modern #wrapper {
    background: transparent;
}

.theme-modern .container, .theme-modern .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
}

.theme-modern .section {
    margin-bottom: 26px;
}

.theme-modern .section-header {
    align-items: center;
    margin-bottom: 12px;
}

.theme-modern .section-header .title, .theme-modern .section-header .title a {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.theme-modern .section-header > a {
    font-size: .8125rem;
    font-weight: 700;
    color: var(--mt-accent);
    background: var(--mt-accent-soft);
    border-radius: var(--mt-pill);
    padding: 6px 12px;
    white-space: nowrap;
}

.theme-modern .page-title, .theme-modern .page-title h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* hero slider */
.theme-modern .section-main-slider {
    padding-top: 10px;
}

.theme-modern .main-slider, .theme-modern .main-slider .swiper-slide {
    border-radius: var(--mt-r);
    overflow: hidden;
}

.theme-modern .main-slider {
    box-shadow: var(--mt-shadow);
}

.theme-modern .main-slider .swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* featured categories: swipeable chips on phones */
.theme-modern .featured-categories .row-fa-cat-round {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 2px 14px 8px;
}

.theme-modern .featured-categories .row-fa-cat-round::-webkit-scrollbar {
    display: none;
}

.theme-modern .featured-categories .row-fa-cat-round > [class*="col"] {
    flex: 0 0 auto;
    width: 84px;
    max-width: none;
    padding: 0 6px;
    scroll-snap-align: start;
}

.theme-modern .featured-categories .card {
    border: 0;
    border-radius: var(--mt-r);
    overflow: hidden;
    box-shadow: var(--mt-shadow-sm);
}

.theme-modern .featured-categories .card .caption {
    border-radius: 0 0 var(--mt-r) var(--mt-r);
}

/* ---------- 6. Product cards ---------- */
.theme-modern .row-product {
    margin-left: -4px;
    margin-right: -4px;
}

.theme-modern .col-product {
    padding-left: 4px;
    padding-right: 4px;
    margin-bottom: 8px;
}

.theme-modern .product-card {
    background: var(--mt-surface);
    border: 0;
    border-radius: var(--mt-r);
    overflow: hidden;
    box-shadow: var(--mt-shadow-sm);
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.theme-modern .product-card .product-image-container {
    border-radius: 0;
    background: #f1f3f8;
}

.theme-modern .product-card .card-body {
    padding: 10px 12px 12px;
}

.theme-modern .product-card .product-title {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.theme-modern .product-card .product-seller, .theme-modern .product-card .product-seller a {
    font-size: .75rem;
    color: var(--mt-muted);
}

.theme-modern .product-card .price {
    font-size: 1rem !important;
    font-weight: 800;
    color: var(--mt-ink);
}

.theme-modern .product-card .discount-original-price {
    font-size: .75rem !important;
}

.theme-modern .product-card .product-card-badge {
    border-radius: var(--mt-pill);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    top: 8px;
    left: 8px;
}

/* touch: always show quick actions as round glass buttons */
.theme-modern .product-card .product-actions-overlay {
    opacity: 1;
    visibility: visible;
    top: 8px;
    right: 8px;
    left: auto;
    transform: none;
    gap: 6px;
}

.theme-modern .product-card .action-btn {
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: var(--mt-shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: none;
}

.theme-modern .product-card .action-btn i {
    font-size: 16px;
}

/* ---------- 7. Generic surfaces ---------- */
.theme-modern .card, .theme-modern .box, .theme-modern .profile-tab-content,
.theme-modern .shopping-cart, .theme-modern .order-summary, .theme-modern .sidebar-box {
    border-radius: var(--mt-r);
}

.theme-modern .modal-content {
    border: 0;
    border-radius: var(--mt-r);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}

.theme-modern .dropdown-menu {
    border: 1px solid var(--mt-line);
    border-radius: var(--mt-r-sm);
    box-shadow: var(--mt-shadow);
}

.theme-modern .nav-tabs .nav-link.active, .theme-modern .nav-pills .nav-link.active {
    color: var(--mt-accent);
}

.theme-modern .pagination .page-link {
    border-radius: 10px;
    margin: 0 2px;
    border: 1px solid var(--mt-line);
    min-width: 40px;
    text-align: center;
}

.theme-modern .pagination .active .page-link {
    background: var(--mt-accent);
    border-color: var(--mt-accent);
    color: #fff;
}

.theme-modern .alert {
    border: 0;
    border-radius: var(--mt-r-sm);
}

/* phones: modals slide up as bottom sheets */
@media (max-width: 575.98px) {
    .theme-modern .modal.fade .modal-dialog {
        transform: translateY(40px);
    }

    .theme-modern .modal.show .modal-dialog {
        transform: none;
    }

    .theme-modern .modal-dialog:not(.modal-dialog-centered) {
        margin: 0;
        min-height: 100%;
        display: flex;
        align-items: flex-end;
    }

    .theme-modern .modal-dialog:not(.modal-dialog-centered) .modal-content {
        width: 100%;
        border-radius: 22px 22px 0 0;
        padding-bottom: var(--mt-safe-b);
    }
}

/* ---------- 8. Footer (WCAG AA on dark navy) ----------
 * Classic sets #footer .nav-footer ul li a { color:#333 } (ID-level specificity),
 * so every footer colour below repeats the full selector chain to win the cascade.
 * Contrast on #0f172a:  #fff 17.8:1 | #e2e8f0 15:1 | #cbd5e1 12.6:1 | #a8b5c8 8.6:1 */
.theme-modern #footer {
    --mt-f-bg: #0f172a;
    --mt-f-text: #cbd5e1;
    --mt-f-muted: #a8b5c8;
    --mt-f-head: #ffffff;
    background: var(--mt-f-bg);
    color: var(--mt-f-text);
    margin-top: 30px;
    border-radius: 24px 24px 0 0;
}

.theme-modern #footer .footer-about,
.theme-modern #footer .footer-about p,
.theme-modern #footer .footer-about li,
.theme-modern #footer .footer-about span,
.theme-modern #footer .title-desc {
    color: var(--mt-f-text) !important;
    line-height: 1.7;
}

.theme-modern #footer .footer-about strong,
.theme-modern #footer .footer-about b {
    color: #fff;
}

.theme-modern #footer .footer-about a,
.theme-modern #footer a {
    color: #e2e8f0;
}

.theme-modern #footer .footer-title,
.theme-modern #footer .form-newsletter-footer .title {
    color: var(--mt-f-head);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin-bottom: 14px;
}

.theme-modern #footer .nav-footer ul li {
    margin-bottom: 4px;
}

.theme-modern #footer .nav-footer ul li a,
.theme-modern #footer .nav-footer-bottom li a {
    display: inline-block;
    padding: 5px 0;
    color: var(--mt-f-text);
    line-height: 1.5;
    border-bottom: 1px solid transparent;
}

.theme-modern #footer .nav-footer ul li a:hover,
.theme-modern #footer .nav-footer ul li a:focus-visible,
.theme-modern #footer .nav-footer-bottom li a:hover,
.theme-modern #footer .about-footer a:hover,
.theme-modern #footer .footer-about a:hover {
    color: #fff;
    border-color: var(--mt-accent);
}

.theme-modern #footer .footer-top {
    padding-top: 36px;
    padding-bottom: 28px;
}

.theme-modern #footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.theme-modern #footer .footer-bottom .copyright {
    color: var(--mt-f-muted);
}

.theme-modern #footer .footer-social-links ul li a {
    color: #fff;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    border: 0;
}

.theme-modern #footer .footer-social-links ul li a:hover {
    background: var(--mt-accent);
    color: #fff;
}

.theme-modern #footer .form-newsletter-footer input,
.theme-modern #footer .newsletter-footer input[type="text"],
.theme-modern #footer .newsletter-footer input[type="email"] {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    border-radius: var(--mt-pill);
    padding-left: 18px;
}

.theme-modern #footer .form-newsletter-footer input::placeholder {
    color: #a8b5c8;
}

.theme-modern #footer .form-newsletter-footer input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .12);
}

.theme-modern #footer .footer-payment-icons img {
    background: #fff;
    border-radius: 6px;
    padding: 3px 5px;
    height: 28px;
    width: auto;
    margin-right: 6px;
}

/* ---------- 8b. Contrast fixes for the header / buttons ---------- */
/* white text on the raw brand colour can fall under 4.5:1: darken the fill a touch */
.theme-modern .btn-custom,
.theme-modern .btn-custom:hover,
.theme-modern .btn-custom:focus {
    background-color: var(--mt-accent);
    border-color: var(--mt-accent);
}

@supports (background: color-mix(in srgb, red 10%, white)) {
    .theme-modern .btn-custom,
    .theme-modern .btn-custom:focus {
        background-color: color-mix(in srgb, var(--mt-accent) 78%, #000);
        border-color: color-mix(in srgb, var(--mt-accent) 78%, #000);
    }

    .theme-modern .btn-custom:hover {
        background-color: color-mix(in srgb, var(--mt-accent) 66%, #000);
        border-color: color-mix(in srgb, var(--mt-accent) 66%, #000);
    }

    .theme-modern .top-search-bar .btn-search {
        background: color-mix(in srgb, var(--mt-accent) 78%, #000) !important;
    }
}

.theme-modern .top-search-bar .btn-search i,
.theme-modern .top-search-bar .btn-search i:before {
    color: #fff !important;
}

.theme-modern .top-bar,
.theme-modern .top-bar a,
.theme-modern .top-bar button,
.theme-modern .top-bar .nav-link,
.theme-modern .top-bar .dropdown-toggle {
    color: #475569 !important;
}

.theme-modern .top-bar a:hover,
.theme-modern .top-bar button:hover {
    color: var(--mt-ink) !important;
}

.theme-modern .top-search-bar .form-control.input-search::placeholder {
    color: #64748b;
    opacity: 1;
}

.theme-modern .product-card .product-seller,
.theme-modern .product-card .product-seller a {
    color: #5b6b82;
}

/* ---------- 9. Tablet (>= 768px) ---------- */
@media (min-width: 768px) {
    .theme-modern .container, .theme-modern .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .theme-modern .row-product {
        margin-left: -6px;
        margin-right: -6px;
    }

    .theme-modern .col-product {
        padding-left: 6px;
        padding-right: 6px;
        margin-bottom: 12px;
    }

    .theme-modern .featured-categories .row-fa-cat-round > [class*="col"] {
        width: 108px;
    }

    .theme-modern .section-header .title, .theme-modern .section-header .title a {
        font-size: 1.4rem;
    }
}

/* ---------- 10. Desktop (>= 993px): classic header returns, tab bar hides ---------- */
@media (min-width: 993px) {
    .theme-modern {
        padding-bottom: 0;
    }

    .theme-modern .mt-tabbar {
        display: none;
    }

    .theme-modern .scrollup {
        bottom: 24px;
        right: 24px;
    }

    .theme-modern .cookies-warning {
        left: 20px;
        right: auto;
        width: 375px;
        bottom: 20px;
    }

    .theme-modern #header {
        background: rgba(255, 255, 255, .9);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        backdrop-filter: saturate(180%) blur(16px);
        border-bottom: 1px solid var(--mt-line);
        box-shadow: none;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .theme-modern #header .nav-top, .theme-modern #header .main-menu {
        background: transparent;
    }

    .theme-modern .nav-top-right .label-nav-icon {
        font-weight: 600;
    }

    .theme-modern .btn-sell-now {
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }

    .theme-modern .product-card {
        box-shadow: var(--mt-shadow-sm);
    }

    .theme-modern .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--mt-shadow);
    }

    /* hover-reveal quick actions on pointer devices */
    .theme-modern .product-card .product-actions-overlay {
        opacity: 0;
        transition: opacity .2s ease;
    }

    .theme-modern .product-card:hover .product-actions-overlay {
        opacity: 1;
    }

    .theme-modern .featured-categories .row-fa-cat-round {
        flex-wrap: wrap;
        overflow: visible;
        margin: 0 -8px;
        padding: 0;
    }

    .theme-modern .featured-categories .row-fa-cat-round > [class*="col"] {
        width: auto;
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }

    .theme-modern #footer {
        margin-top: 50px;
        border-radius: 32px 32px 0 0;
    }

    /* ---- Primary category bar ---- */
    .theme-modern .nav-main .navbar ul .nav-item .nav-link {
        color: var(--mt-ink);
        font-weight: 600;
        padding: 14px 12px;
        border-radius: 10px 10px 0 0;
        transition: color .15s ease, background-color .15s ease;
    }

    .theme-modern .nav-main .navbar > .navbar-nav > .nav-item:hover > .nav-link,
    .theme-modern .nav-main .navbar > .navbar-nav > .nav-item > .nav-link.show,
    .theme-modern .nav-main .navbar > .navbar-nav > .nav-item > .nav-link[aria-expanded="true"] {
        color: var(--mt-accent);
        background: var(--mt-accent-soft);
    }

    .theme-modern .nav-main .navbar > .navbar-nav > .nav-item:hover .nav-link:before {
        height: 3px;
        border-radius: 3px 3px 0 0;
        background: var(--mt-accent);
    }

    .theme-modern .nav-main {
        background: transparent;
        border-bottom: 0;
    }

    .theme-modern .nav-main .navbar {
        background: transparent;
    }

    /* ---- Mega menu panel: compact, rounded, readable ---- */
    .theme-modern .mega-menu .dropdown .dropdown-menu {
        height: auto !important;
        min-height: 0 !important;
        max-height: min(70vh, 560px);
        padding: 28px 32px 24px;
        background: var(--mt-surface);
        border: 1px solid var(--mt-line);
        border-top: 0;
        border-radius: 0 0 20px 20px !important;
        box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .22) !important;
        transition: opacity .18s ease, transform .18s ease, visibility .18s;
        transform: translateY(-6px);
    }

    .theme-modern .mega-menu .dropdown .dropdown-menu.show,
    .theme-modern .mega-menu .dropdown:hover .dropdown-menu {
        transform: none;
    }

    .theme-modern .mega-menu .menu-subcategories {
        min-height: 0;
    }

    .theme-modern .mega-menu .subcategory-item {
        padding-right: 20px;
    }

    .theme-modern .mega-menu .col-level-two {
        margin-bottom: 18px;
    }

    .theme-modern .mega-menu .menu-subcategories .second-category {
        display: inline-block;
        font-size: .9375rem;
        font-weight: 700;
        color: var(--mt-ink);
        border-bottom: 2px solid transparent;
    }

    .theme-modern .mega-menu .menu-subcategories .second-category:hover {
        color: var(--mt-accent);
        border-color: var(--mt-accent);
    }

    .theme-modern .mega-menu .menu-subcategories ul {
        margin-top: 8px;
    }

    .theme-modern .mega-menu .menu-subcategories ul li {
        margin-bottom: 2px;
    }

    .theme-modern .mega-menu .menu-subcategories ul li a {
        display: inline-block;
        padding: 4px 0;
        font-size: .875rem;
        color: #475569; /* 7.6:1 on white */
        border-bottom: 1px solid transparent;
    }

    .theme-modern .mega-menu .menu-subcategories ul li a:hover {
        color: var(--mt-accent);
        border-color: currentColor;
    }

    .theme-modern .mega-menu .nav-category-image {
        border-radius: var(--mt-r);
        overflow: hidden;
    }

    .theme-modern .mega-menu .link-view-all {
        color: var(--mt-accent);
    }

    .theme-modern #menu-overlay {
        background: #0f172a;
        opacity: .35;
    }
}


/* ---------- 11. Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    .theme-modern * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- 12. v2.6.5: system dark mode, native system colors and scroll performance ---------- */
html.theme-modern-root {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

.theme-modern .featured-categories .row-fa-cat-round {
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
}

body.theme-modern {
    overflow-x: clip;
    overscroll-behavior-x: none;
}

/* Keep buttons on the storefront's configured system/brand color. Do not apply
   the Modern skin's previous extra-dark color mix or decorative shadow. */
.theme-modern .btn-custom,
.theme-modern .btn-custom:hover,
.theme-modern .btn-custom:focus,
.theme-modern .btn-custom:active {
    background-color: var(--mds-color-main) !important;
    border-color: var(--mds-color-main) !important;
    color: #fff !important;
    box-shadow: none !important;
    filter: none;
}

.theme-modern .top-search-bar .btn-search,
.theme-modern .top-search-bar .btn-search:hover,
.theme-modern .top-search-bar .btn-search:focus,
.theme-modern .top-search-bar .btn-search:active {
    background-color: var(--mds-color-main) !important;
    border-color: var(--mds-color-main) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.theme-modern .top-search-bar .btn-search i,
.theme-modern .top-search-bar .btn-search i:before {
    color: #fff !important;
}

/* Blurred fixed/sticky layers repeatedly repaint while scrolling on mobile.
   Opaque surfaces keep the same visual hierarchy with much less compositing. */
.theme-modern .nav-mobile-header,
.theme-modern .mt-tabbar,
.theme-modern #header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.theme-modern .nav-mobile-header {
    background: var(--mt-surface);
}

.theme-modern .mt-tabbar {
    background: var(--mt-surface);
}

.theme-modern .product-card .action-btn {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, .97);
}

.theme-modern .btn,
.theme-modern .product-card {
    transition-property: color, background-color, border-color, box-shadow;
}

@media (hover: none), (pointer: coarse) {
    .theme-modern .product-card,
    .theme-modern .product-card:hover,
    .theme-modern .btn:active {
        transform: none;
    }

    .theme-modern .product-card:hover {
        box-shadow: var(--mt-shadow-sm);
    }
}

@supports (content-visibility: auto) {
    /* Skip off-screen product-card layout/paint work on long listing pages. */
    .theme-modern .col-product {
        content-visibility: auto;
        contain-intrinsic-size: auto 360px;
    }
}

/* Dark palette is activated by SITE_COLOR_MODE=dark or the OS preference in system mode. */
    html.theme-color-dark body.theme-modern {
        color-scheme: dark;
        --mt-bg: #0b1220;
        --mt-surface: #121c2d;
        --mt-ink: #e7edf6;
        --mt-muted: #a6b3c5;
        --mt-line: #29384c;
        --mt-accent-soft: rgba(99, 102, 241, .18);
        --mt-shadow-sm: 0 1px 2px rgba(0, 0, 0, .24);
        --mt-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 8px 24px rgba(0, 0, 0, .24);
        background-color: var(--mt-bg);
        color: var(--mt-ink) !important;
    }

    html.theme-color-dark .theme-modern #header,
    html.theme-color-dark .theme-modern .nav-mobile-header,
    html.theme-color-dark .theme-modern .mt-tabbar {
        background: rgba(18, 28, 45, .98);
        border-color: var(--mt-line);
        box-shadow: none;
    }

    /* The base Modesy stylesheet hard-codes these desktop header surfaces to
       white/light grey. Override the surfaces as well as their text in dark mode. */
    html.theme-color-dark .theme-modern .top-bar {
        background-color: var(--mt-surface) !important;
        border-bottom-color: var(--mt-line) !important;
        color: var(--mt-muted);
    }

    html.theme-color-dark .theme-modern .nav-top {
        background-color: transparent !important;
        border-color: var(--mt-line) !important;
    }

    html.theme-color-dark .theme-modern .top-search-bar {
        background-color: #0e1726 !important;
        border-color: var(--mt-line) !important;
        box-shadow: none !important;
    }

    html.theme-color-dark .theme-modern .top-bar,
    html.theme-color-dark .theme-modern .top-bar a,
    html.theme-color-dark .theme-modern .top-bar button,
    html.theme-color-dark .theme-modern .top-bar .nav-link,
    html.theme-color-dark .theme-modern .top-bar .dropdown-toggle {
        color: var(--mt-muted) !important;
    }

    html.theme-color-dark .theme-modern .top-bar a:hover,
    html.theme-color-dark .theme-modern .top-bar button:hover {
        color: var(--mt-ink) !important;
    }

    html.theme-color-dark .theme-modern .top-search-bar .form-control.input-search,
    html.theme-color-dark .theme-modern .top-search-bar .form-control.input-search:focus,
    html.theme-color-dark .theme-modern .top-search-bar .form-control.input-search:active {
        background: #0e1726 !important;
        color: var(--mt-ink) !important;
        border-color: var(--mt-line) !important;
        box-shadow: none !important;
    }

    html.theme-color-dark .theme-modern .top-search-bar .form-control.input-search::placeholder {
        color: #93a1b5;
        opacity: 1;
    }

    html.theme-color-dark .theme-modern .search-results-ajax {
        background: var(--mt-surface);
        border: 1px solid var(--mt-line);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .38) !important;
    }

    html.theme-color-dark .theme-modern .search-results-ajax ul li a {
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .search-results-ajax ul li a:hover,
    html.theme-color-dark .theme-modern .search-results-ajax ul li a:focus-visible {
        background: #1c2a3f;
        color: #fff;
    }

    html.theme-color-dark .theme-modern .search-results-ajax ul li a i,
    html.theme-color-dark .theme-modern .search-results-ajax ul li .search-item-right span {
        color: var(--mt-muted);
    }

    html.theme-color-dark .theme-modern .form-control,
    html.theme-color-dark .theme-modern .custom-select,
    html.theme-color-dark .theme-modern select.form-control,
    html.theme-color-dark .theme-modern textarea.form-control,
    html.theme-color-dark .theme-modern .select2-container--default .select2-selection--single,
    html.theme-color-dark .theme-modern .select2-container--default .select2-selection--multiple {
        background-color: #0e1726;
        color: var(--mt-ink);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .form-control::placeholder,
    html.theme-color-dark .theme-modern textarea.form-control::placeholder {
        color: #93a1b5;
        opacity: 1;
    }

    html.theme-color-dark .theme-modern .form-control:focus,
    html.theme-color-dark .theme-modern .custom-select:focus {
        background-color: #101c2d;
        color: var(--mt-ink);
        border-color: var(--mt-accent);
    }

    html.theme-color-dark .theme-modern .card,
    html.theme-color-dark .theme-modern .box,
    html.theme-color-dark .theme-modern .profile-tab-content,
    html.theme-color-dark .theme-modern .shopping-cart,
    html.theme-color-dark .theme-modern .order-summary,
    html.theme-color-dark .theme-modern .sidebar-box,
    html.theme-color-dark .theme-modern .product-card,
    html.theme-color-dark .theme-modern .modal-content,
    html.theme-color-dark .theme-modern .dropdown-menu,
    html.theme-color-dark .theme-modern .mega-menu .dropdown .dropdown-menu,
    html.theme-color-dark .theme-modern .nav-mobile,
    html.theme-color-dark .theme-modern .filter-list-container,
    html.theme-color-dark .theme-modern .product-filters,
    html.theme-color-dark .theme-modern .cookies-warning,
    html.theme-color-dark .theme-modern .featured-categories .card {
        background-color: var(--mt-surface);
        color: var(--mt-ink);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .product-card .product-image-container {
        background: #172437;
    }

    html.theme-color-dark .theme-modern .product-card .product-title a,
    html.theme-color-dark .theme-modern .product-card .price,
    html.theme-color-dark .theme-modern .section-header .title,
    html.theme-color-dark .theme-modern .section-header .title a,
    html.theme-color-dark .theme-modern .page-title,
    html.theme-color-dark .theme-modern .page-title h1,
    html.theme-color-dark .theme-modern .h1-title-nvs,
    html.theme-color-dark .theme-modern .filter-item .title {
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .product-card .product-seller,
    html.theme-color-dark .theme-modern .product-card .product-seller a,
    html.theme-color-dark .theme-modern .text-muted,
    html.theme-color-dark .theme-modern .category-description {
        color: var(--mt-muted) !important;
    }

    html.theme-color-dark .theme-modern .nav-main .navbar ul .nav-item .nav-link,
    html.theme-color-dark .theme-modern .mega-menu .menu-subcategories .second-category {
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .mega-menu .menu-subcategories ul li a {
        color: #c0cada;
    }

    html.theme-color-dark .theme-modern .dropdown-menu .dropdown-item,
    html.theme-color-dark .theme-modern .dropdown-menu a,
    html.theme-color-dark .theme-modern .dropdown-menu button {
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .dropdown-menu .dropdown-item:hover,
    html.theme-color-dark .theme-modern .dropdown-menu a:hover,
    html.theme-color-dark .theme-modern .dropdown-menu button:hover {
        background-color: #1c2a3f;
        color: #fff;
    }

    html.theme-color-dark .theme-modern .breadcrumb,
    html.theme-color-dark .theme-modern .breadcrumb-item,
    html.theme-color-dark .theme-modern .breadcrumb-item a,
    html.theme-color-dark .theme-modern .pagination .page-link,
    html.theme-color-dark .theme-modern .nav-tabs .nav-link,
    html.theme-color-dark .theme-modern .nav-pills .nav-link {
        color: var(--mt-muted);
    }

    html.theme-color-dark .theme-modern .pagination .page-link {
        background: var(--mt-surface);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .pagination .active .page-link {
        color: #fff;
        background: var(--mds-color-main);
        border-color: var(--mds-color-main);
    }

    html.theme-color-dark .theme-modern .alert {
        background-color: #172437;
        color: var(--mt-ink);
        border: 1px solid var(--mt-line);
    }

    html.theme-color-dark .theme-modern .table,
    html.theme-color-dark .theme-modern .table td,
    html.theme-color-dark .theme-modern .table th {
        color: var(--mt-ink);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .nav-tabs,
    html.theme-color-dark .theme-modern .nav-tabs .nav-link,
    html.theme-color-dark .theme-modern .filter-item,
    html.theme-color-dark .theme-modern .filter-list li,
    html.theme-color-dark .theme-modern .product-filters {
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .nav-tabs .nav-link.active,
    html.theme-color-dark .theme-modern .nav-pills .nav-link.active {
        color: var(--mt-accent);
        background: rgba(99, 102, 241, .12);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .product-card .action-btn {
        background: rgba(245, 248, 252, .96);
        color: #182334;
    }

    html.theme-color-dark .theme-modern .nav-mobile .nav-link,
    html.theme-color-dark .theme-modern .nav-mobile .button-link,
    html.theme-color-dark .theme-modern .navbar-mobile-categories .nav-link {
        color: var(--mt-ink);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .nav-mobile .nav-link:hover,
    html.theme-color-dark .theme-modern .nav-mobile .nav-link:focus,
    html.theme-color-dark .theme-modern .navbar-mobile-categories .nav-link:hover {
        background: #1c2a3f;
        color: #fff;
    }

    html.theme-color-dark .theme-modern .modal-header,
    html.theme-color-dark .theme-modern .modal-footer,
    html.theme-color-dark .theme-modern .dropdown-divider {
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .input-group-text {
        background: #172437;
        color: var(--mt-ink);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .select2-dropdown {
        background: var(--mt-surface);
        border-color: var(--mt-line);
    }

    html.theme-color-dark .theme-modern .select2-container--default .select2-results__option {
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .select2-container--default .select2-results__option--selected {
        background: #26364c;
    }

    html.theme-color-dark .theme-modern .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
        background: var(--mds-color-main);
        color: #fff;
    }

    html.theme-color-dark .theme-modern .featured-categories .card .caption {
        background: #172437;
        color: var(--mt-ink);
    }

    html.theme-color-dark .theme-modern .cookies-warning {
        color: var(--mt-ink);
        border: 1px solid var(--mt-line);
    }

    html.theme-color-dark .theme-modern .mt-tab {
        color: #a6b3c5 !important;
    }

    html.theme-color-dark .theme-modern .mt-tab.active,
    html.theme-color-dark .theme-modern .mt-tab:hover {
        color: var(--mt-accent) !important;
    }

    html.theme-color-dark .theme-modern .mt-sell-fab {
        border-color: var(--mt-bg);
    }

/* Respect native control appearance when the site is explicitly forced to light. */
html[data-color-mode="light"] body.theme-modern { color-scheme: light; }

@media (prefers-reduced-motion: reduce) {
    html.theme-modern-root {
        scroll-behavior: auto;
    }
}

/* Sanalist v2.7.5: Modern header scrolls with the document.
   The utility bar and header must not remain sticky/fixed while scrolling.
   Keep the mobile navigation drawer fixed while it is open. */
html.theme-modern-root body.theme-modern #header,
html.theme-modern-root body.theme-modern #header .top-bar,
html.theme-modern-root body.theme-modern #header .main-menu,
html.theme-modern-root body.theme-modern #header .nav-main,
html.theme-modern-root body.theme-modern .top-bar,
html.theme-modern-root body.theme-modern .main-menu,
html.theme-modern-root body.theme-modern .nav-main,
html.theme-modern-root body.theme-modern .mobile-nav-container,
html.theme-modern-root body.theme-modern .nav-mobile-header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

html.theme-modern-root body.theme-modern .mobile-nav-container {
    min-height: 0;
    z-index: 10010;
}

html.theme-modern-root body.theme-modern .nav-mobile-header {
    z-index: 10010;
    background: var(--mt-surface);
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* The drawer remains fixed so it stays usable after opening. */
html.theme-modern-root body.theme-modern .nav-mobile {
    position: fixed !important;
    top: calc(66px + var(--mt-safe-t, 0px)) !important;
    left: auto;
    right: auto;
    bottom: 0;
    z-index: 10020;
}

html.theme-modern-root {
    scroll-padding-top: 0 !important;
}


/* SanaList v2.7.19: complete dark-surface treatment for login modal and auth pages. */
html.theme-color-dark body.theme-modern .auth-box,
html.theme-color-dark body.theme-modern .login-modal .auth-box,
html.theme-color-dark body.theme-modern #loginModal .modal-content,
html.theme-color-dark body.theme-modern #locationModal .auth-box {
    background: var(--mt-surface) !important;
    color: var(--mt-ink) !important;
    border: 1px solid var(--mt-line) !important;
}
html.theme-color-dark body.theme-modern .auth-box .title,
html.theme-color-dark body.theme-modern .auth-box label,
html.theme-color-dark body.theme-modern .auth-box p,
html.theme-color-dark body.theme-modern .auth-box .login-with-mail,
html.theme-color-dark body.theme-modern .auth-box .p-social-media,
html.theme-color-dark body.theme-modern .auth-box .location-modal-description {
    color: var(--mt-ink) !important;
}
html.theme-color-dark body.theme-modern .auth-box .auth-form-input,
html.theme-color-dark body.theme-modern .auth-box input.form-control,
html.theme-color-dark body.theme-modern .auth-box select.form-control {
    background: #0e1726 !important;
    color: var(--mt-ink) !important;
    border: 1px solid var(--mt-line) !important;
}
html.theme-color-dark body.theme-modern .auth-box .auth-form-input::placeholder,
html.theme-color-dark body.theme-modern .auth-box input.form-control::placeholder {
    color: #93a1b5 !important;
    opacity: 1;
}
html.theme-color-dark body.theme-modern .auth-box a:not(.btn),
html.theme-color-dark body.theme-modern .auth-box .link-forgot-password,
html.theme-color-dark body.theme-modern .auth-box .p-social-media a {
    color: #a5b4fc !important;
}
html.theme-color-dark body.theme-modern .auth-box .btn-social-google {
    background: #172437 !important;
    color: var(--mt-ink) !important;
    border-color: var(--mt-line) !important;
}
html.theme-color-dark body.theme-modern .auth-box .close {
    color: var(--mt-ink) !important;
    opacity: .8;
    text-shadow: none;
}
html.theme-color-dark body.theme-modern #loginModal .modal-content,
html.theme-color-dark body.theme-modern #locationModal .modal-content {
    background: var(--mt-surface) !important;
}
