/* =====================================================================
 * Multi-Page E-commerce Styles — v2 (color-driven, polished, responsive)
 * Color variables are injected in the <head> by includes/theme.php
 * (build_color_css_vars).  Override defaults here if needed:
 * ===================================================================== */

:root {
    --mp-primary: #0d6efd;
    --mp-primary-dark: #0a58ca;
    --mp-secondary: #6c757d;
    --mp-accent: #ffc107;
    --mp-success: #198754;
    --mp-danger: #dc3545;
    --mp-body-bg: #ffffff;
    --mp-body-text: #212529;
    --mp-header-bg: #ffffff;
    --mp-header-text: #212529;
    --mp-topbar-bg: #212529;
    --mp-topbar-text: #ffffff;
    --mp-footer-bg: #1a1d23;
    --mp-footer-text: #adb5bd;
    --mp-card-bg: #ffffff;
    --mp-card-border: #e9ecef;
}

body {
    background: var(--mp-body-bg);
    color: var(--mp-body-text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.site-main { min-height: 60vh; }
.btn-primary { background: var(--mp-primary); border-color: var(--mp-primary); }
.btn-primary:hover { background: var(--mp-primary-dark); border-color: var(--mp-primary-dark); }
a { color: var(--mp-primary); }
a:hover { color: var(--mp-primary-dark); }

/* ===== Header ===== */
.mp-header {
    background: var(--mp-header-bg);
    color: var(--mp-header-text);
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    position: sticky; top: 0; z-index: 1020;
}
.mp-topbar { background: var(--mp-topbar-bg); color: var(--mp-topbar-text); padding: 7px 0; font-size: 13px; }
.mp-topbar a { color: var(--mp-topbar-text); text-decoration: none; }
.mp-topbar a:hover { color: var(--mp-accent); }
.mp-header-main { background: var(--mp-header-bg); color: var(--mp-header-text); }
.mp-brand-text { color: var(--mp-primary); }
.mp-logo img { display: block; }
.mp-nav-inline { gap: 1.25rem; }
.mp-nav-link { color: var(--mp-header-text); text-decoration: none; font-weight: 500; padding: 6px 4px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.mp-nav-link:hover { color: var(--mp-primary); border-bottom-color: var(--mp-primary); }
.mp-icon-btn { color: var(--mp-header-text); text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: background .15s; }
.mp-icon-btn:hover { background: rgba(0,0,0,.05); color: var(--mp-primary); }
.mp-search-form { position: relative; }
.mp-search-results {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.15); border-radius: 8px;
    max-height: 480px; overflow-y: auto; z-index: 1030; display: none; margin-top: 6px;
}
.mp-search-results.show { display: block; }
.mp-search-results .item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f1f3f5; text-decoration: none; color: #212529; align-items: center; }
.mp-search-results .item:hover { background: #f8f9fa; }
.mp-search-results .item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.mp-search-results .item .name { font-weight: 500; color: #212529; }
.mp-search-results .item .price { color: var(--mp-primary); font-weight: 600; font-size: 14px; }
.mp-search-results .item .loading, .mp-search-results .item .empty { padding: 14px; text-align: center; color: #6c757d; }
.mp-cart-btn { color: var(--mp-header-text); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.mp-cart-btn:hover { background: rgba(0,0,0,.05); color: var(--mp-primary); }
.mp-cart-count {
    position: absolute; top: -2px; right: -6px;
    background: var(--mp-primary); color: #fff;
    border-radius: 50%; min-width: 20px; height: 20px;
    font-size: 11px; line-height: 20px; text-align: center;
    padding: 0 4px; font-weight: 700;
}
.mp-nav-classic { background: #f8f9fa; border-top: 1px solid #e9ecef; border-bottom: 1px solid #e9ecef; }
.mp-nav-classic .nav-link { color: var(--mp-header-text); font-weight: 500; padding: 10px 18px; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }
.mp-nav-classic .nav-link:hover { color: var(--mp-primary); }

/* ===== Footer ===== */
.mp-footer { color: var(--mp-footer-text); }
.mp-footer-dark { background: var(--mp-footer-bg); }
.mp-footer-dark h5, .mp-footer-dark h6 { color: #fff; }
.mp-footer-dark a { color: var(--mp-footer-text); text-decoration: none; }
.mp-footer-dark a:hover { color: #fff; }
.mp-footer-dark .mp-footer-bottom { background: rgba(0,0,0,.3); }
.mp-footer-light { background: #f8f9fa; color: #495057; border-top: 1px solid #e9ecef; }
.mp-footer-light h4 { color: #212529; }
.mp-footer-light a { color: #495057; text-decoration: none; }
.mp-footer-light a:hover { color: var(--mp-primary); }
.mp-footer-light .mp-footer-bottom { border-top: 1px solid #e9ecef; background: #ffffff; }
.mp-social a { display: inline-block; margin-right: 12px; font-size: 20px; }

/* ===== Page header (category/tag/etc.) ===== */
.mp-page-header { background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%); padding: 36px 0; margin-bottom: 30px; border-bottom: 1px solid #e9ecef; }
.mp-page-header h1 { margin-bottom: 6px; font-weight: 700; }
.mp-page-header .crumbs { font-size: 13px; color: #6c757d; margin-bottom: 6px; }
.mp-page-header .crumbs a { color: #6c757d; text-decoration: none; }
.mp-page-header .crumbs a:hover { color: var(--mp-primary); }
.mp-category-banner { background-size: cover; background-position: center; min-height: 200px; border-radius: 8px; margin-bottom: 24px; display: flex; align-items: end; padding: 24px; color: #fff; text-shadow: 0px 0px 40px rgb(0 0 0); }

/* ===== Product Grid (shop/category/tag/search/brand) =====
   Layout: 2 cols mobile → 3 cols tablet → 3 cols desktop (user preference). */
.mp-product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .mp-product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 992px) { .mp-product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.mp-product-card {
    background: var(--mp-card-bg); border: 1px solid var(--mp-card-border);
    border-radius: 10px; overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow .25s, transform .25s, border-color .25s;
    position: relative;
}
.mp-product-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.10); transform: translateY(-3px); border-color: var(--mp-primary); }
.mp-product-card .img-wrap { aspect-ratio: 1/1; overflow: hidden; background: #f8f9fa; position: relative; }
.mp-product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.mp-product-card:hover .img-wrap img { transform: scale(1.08); }
.mp-product-card .badge-sale {
    position: absolute; top: 8px; left: 8px; background: var(--mp-danger);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 4px; z-index: 2;
}
.mp-product-card .body { padding: 12px 8px 14px; display: flex; flex-direction: column; flex-grow: 1; }
.mp-product-card .name {
    font-size: 14px; font-weight: 500; color: var(--mp-body-text);
    text-decoration: none; margin-bottom: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}
.mp-product-card .name:hover { color: var(--mp-primary); }
.mp-product-card .prices { margin-bottom: 10px; min-height: 22px; }
.mp-product-card .price-sale { color: var(--mp-danger); font-weight: 700; font-size: 16px; }
.mp-product-card .price-regular { color: #6c757d; text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.mp-product-card .add-btn { margin-top: auto; }
.mp-product-card .mp-card-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.mp-product-card .mp-card-actions .add-btn,
.mp-product-card .mp-card-actions .order-btn {
    margin-top: 0;
    padding: 6px 2px;        /* tiny side padding so Bengali text fits */
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;     /* allow wrap — Bengali is wider than English */
    overflow-wrap: break-word;
    min-width: 0;            /* let grid track shrink properly */
}
/* Tiny phones (<400px): card width ≈ 175px → side-by-side is too tight,
   stack buttons vertically so each one gets full width. */
@media (max-width: 400px) {
    .mp-product-card .mp-card-actions { grid-template-columns: 1fr; gap: 4px; }
    .mp-product-card .mp-card-actions .add-btn,
    .mp-product-card .mp-card-actions .order-btn { padding: 7px 6px; font-size: 12.5px; }
}

/* ===== Short Description (single-product page, above variations) ===== */
.mp-short-desc {
    background: #fff8e6;
    border-left: 4px solid var(--mp-primary, #0d6efd);
    padding: 12px 16px;
    border-radius: 6px;
    color: #495057;
    font-size: 15px;
    line-height: 1.55;
}
.mp-short-desc p { margin: 0 0 8px; }
.mp-short-desc p:last-child { margin-bottom: 0; }
.mp-short-desc ul, .mp-short-desc ol { margin: 0 0 8px 22px; padding: 0; }

/* ===== Related Products grid (single-product page) — 5×3 desktop, 2×5 mobile ===== */
.mp-related-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
@media (min-width: 992px) { .mp-related-grid { grid-template-columns: repeat(5, 1fr) !important; gap: 16px; } }

/* ===== Single Product Page ===== */
.mp-product-gallery .main-image { width: 100%; border-radius: 10px; overflow: hidden; background: #f8f9fa; border: 1px solid #e9ecef; }
.mp-product-gallery .main-image img { width: 100%; height: auto; max-height: 520px; object-fit: contain; display: block; }
.mp-product-gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-product-gallery .thumb { width: 70px; height: 70px; border: 2px solid #dee2e6; border-radius: 8px; cursor: pointer; overflow: hidden; transition: border-color .15s; }
.mp-product-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mp-product-gallery .thumb.active, .mp-product-gallery .thumb:hover { border-color: var(--mp-primary); }

.mp-product-info h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; line-height: 1.25; }
.mp-product-info .sku { color: #6c757d; font-size: 13px; }
.mp-product-info .price-block { display: flex; align-items: baseline; gap: 14px; margin: 18px 0; }
.mp-product-info .price-sale { font-size: 34px; font-weight: 700; color: var(--mp-danger); }
.mp-product-info .price-regular { font-size: 18px; color: #6c757d; text-decoration: line-through; }
.mp-product-info .price-single { font-size: 34px; font-weight: 700; color: var(--mp-primary); }
.mp-product-info .stock-badge { font-size: 13px; padding: 6px 12px; }
.mp-product-info .product-description { line-height: 1.7; color: #495057; }
.mp-variation-group { margin: 16px 0; }
.mp-variation-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; color: #495057; }
.mp-variation-group .options { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-variation-group .option {
    padding: 8px 16px; border: 2px solid #dee2e6; border-radius: 8px; cursor: pointer;
    background: #fff; font-size: 14px; transition: all .15s;
}
.mp-variation-group .option:hover { border-color: var(--mp-primary); }
.mp-variation-group .option.selected { border-color: var(--mp-primary); background: rgba(13,110,253,.08); color: var(--mp-primary); font-weight: 600; }
.mp-variation-group .option.swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.mp-qty-input { display: inline-flex; align-items: center; border: 1px solid #ced4da; border-radius: 8px; overflow: hidden; }
.mp-qty-input button { background: #f8f9fa; border: none; padding: 8px 14px; cursor: pointer; font-size: 16px; transition: background .15s; }
.mp-qty-input button:hover { background: #e9ecef; }
.mp-qty-input input { width: 60px; border: 0; text-align: center; padding: 8px; font-weight: 600; }
.mp-action-row { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.mp-action-row button { padding: 12px 24px; font-weight: 600; font-size: 15px; }

/* Mobile: pin Add-to-Cart / Buy-Now row above the bottom nav */
@media (max-width: 991px) {
    .mp-action-row {
        position: fixed;
        left: 0; right: 0;
        bottom: 71px;            /* sits directly above the mobile bottom nav */
        margin: 0;
        padding: 8px 10px;
        gap: 8px;
        background: #fff;
        border-top: 1px solid #e9ecef;
        box-shadow: 0 -2px 8px rgba(0,0,0,.06);
        z-index: 1041;            /* above the bottom nav (1040) so it stays visible */
        flex-wrap: nowrap;
    }
    .mp-action-row button {
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 6px;
        font-size: 14px;
        white-space: normal;
        overflow-wrap: break-word;
        line-height: 1.2;
    }
    /* Extra space at page bottom so content isn't covered by both bars.
       Only on pages that actually have the pinned action row. */
    body:has(.mp-action-row) { padding-bottom: 140px; }
}

/* ===== Single product description: contain wide media on mobile ===== */
#desc-tab, .mp-short-desc { word-wrap: break-word; overflow-wrap: break-word; }
#desc-tab img,
.mp-short-desc img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
#desc-tab table,
#desc-tab iframe,
#desc-tab video,
.mp-short-desc table,
.mp-short-desc iframe,
.mp-short-desc video {
    max-width: 100%;
}
#desc-tab {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== Cart Page ===== */
.mp-cart-page-wrap { padding-bottom: 60px; }
.mp-cart-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mp-cart-table { background: #fff; min-width: 640px; }
.mp-cart-table .cart-item-image { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.mp-cart-table .qty-cell { width: 150px; }
.mp-cart-summary { background: #f8f9fa; border-radius: 10px; padding: 22px; position: sticky; top: 160px; border: 1px solid #e9ecef; }
.mp-cart-summary .row-line { display: flex; justify-content: space-between; padding: 6px 0; }
.mp-cart-summary .row-line.total { border-top: 1px solid #dee2e6; padding-top: 14px; margin-top: 10px; font-weight: 700; font-size: 18px; color: var(--mp-primary); }

/* ===== Checkout ===== */
.mp-checkout-page { padding-bottom: 60px; }
.mp-checkout-step { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 22px; margin-bottom: 16px; }
.mp-checkout-step h5 { font-size: 18px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #e9ecef; }
.mp-payment-method {
    display: block; border: 2px solid #dee2e6; border-radius: 8px;
    padding: 14px; cursor: pointer; margin-bottom: 10px; transition: border-color .15s, background .15s;
}
.mp-payment-method:hover { border-color: var(--mp-primary); }
.mp-payment-method.selected { border-color: var(--mp-primary); background: rgba(13,110,253,.05); }
.mp-payment-method .meta { font-size: 13px; color: #6c757d; }
.mp-payment-method .pm-details img { display: block; }

/* Checkout order summary — mobile-friendly */
.mp-checkout-items { max-height: 360px; overflow-y: auto; padding-right: 4px; }
.mp-cko-item {
    display: flex; gap: 10px; align-items: center;
    padding: 8px 0; border-bottom: 1px solid #e9ecef;
}
.mp-cko-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.mp-cko-item .info { flex: 1; min-width: 0; }
.mp-cko-item .info .title { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-cko-item .qty-line { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; }
.mp-cko-item .qty-line button { width: 24px; height: 24px; padding: 0; border-radius: 4px; line-height: 1; font-size: 14px; }
.mp-cko-item .qty-line input.qty-input { width: 42px; padding: 2px 4px; text-align: center; font-size: 12px; }
.mp-cko-item .qty-line .x { color: #6c757d; margin-left: 4px; }
.mp-cko-item .right { text-align: right; flex-shrink: 0; }
.mp-cko-item .line-total { font-weight: 700; font-size: 13px; }
.mp-cko-item .remove-item { background: transparent; border: 0; color: var(--mp-danger); font-size: 18px; cursor: pointer; line-height: 1; }

/* ===== Filter sidebar ===== */
.mp-filter-sidebar { background: #f8f9fa; border-radius: 10px; padding: 18px; border: 1px solid #e9ecef; }
.mp-filter-sidebar h6 { font-size: 13px; text-transform: uppercase; margin-bottom: 12px; color: #495057; letter-spacing: .5px; }
.mp-filter-block { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid #e9ecef; }
.mp-filter-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.mp-filter-block .form-check { margin-bottom: 4px; }
.mp-price-range { display: flex; gap: 8px; align-items: center; }
.mp-price-range input { width: 80px; }

/* ===== My Account ===== */
.ma-avatar { padding: 12px 0; }
.ma-nav .list-group-item { border: none; padding: 12px 18px; color: #495057; }
.ma-nav .list-group-item.active { background: var(--mp-primary); color: #fff; }
.ma-nav .list-group-item:hover:not(.active) { background: #f8f9fa; color: var(--mp-primary); }

/* ===== Variation Chips (used everywhere products are shown) ===== */
.mp-var-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mp-var-chip {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f1f3f5; border: 1px solid #e9ecef;
    border-radius: 14px; padding: 2px 10px;
    font-size: 12px; color: #495057; line-height: 1.4;
}
.mp-var-chip strong { font-weight: 600; color: #212529; margin-right: 2px; }
.mp-var-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #dee2e6; }

/* Variation selector on single-product page */
.mp-variation-selector { margin-bottom: 16px; }
.mp-variation-selector .var-group { margin-bottom: 14px; }
.mp-variation-selector .var-label {
    display: block; font-weight: 600; font-size: 13px;
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: 8px; color: #495057;
}
.mp-variation-selector .var-options { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-variation-selector .var-opt {
    padding: 8px 16px; border: 2px solid #dee2e6; border-radius: 8px;
    background: #fff; font-size: 14px; cursor: pointer;
    transition: all .15s; user-select: none;
}
.mp-variation-selector .var-opt:hover { border-color: var(--mp-primary); }
.mp-variation-selector .var-opt.selected { border-color: var(--mp-primary); background: rgba(13,110,253,.08); color: var(--mp-primary); font-weight: 600; }
.mp-variation-selector .var-opt.disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.mp-variation-selector .var-opt.swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; position: relative; }
.mp-variation-selector .var-opt.swatch.selected::after { content: '\2713'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* Variation chips spacing in order-section product list (size + style of the
   .var-opt buttons themselves comes from .mp-variation-selector rules above,
   so order-section now matches single-product page exactly). */
.order-section .product-radio-box .mp-var-chips,
.order-section .product-checkbox-box .mp-var-chips { margin-top: 6px; }

/* ===== Empty state ===== */
.mp-empty-state { padding: 70px 20px; text-align: center; color: #6c757d; }
.mp-empty-state i { font-size: 64px; opacity: .5; }
.mp-empty-state h3, .mp-empty-state h4 { color: #495057; margin-bottom: 12px; }

/* ===== Topbar social icons (header-1 + header-2) — small + tight ===== */
.mp-topbar-socials a {
    color: inherit; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; font-size: 13px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.mp-topbar-socials a:hover { color: var(--mp-accent, #ffc107); background: rgba(255,255,255,.08); }
.mp-topbar-modern .mp-topbar-socials a { color: var(--mp-topbar-text, #fff); }
.mp-topbar-classic-dark .mp-topbar-socials a { color: #dee2e6; }

/* ===== Mobile bottom nav (sticky) ===== */
.mp-mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid #e9ecef;
    z-index: 1040; display: flex; justify-content: space-around;
    padding: 6px 0 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.mp-mobile-bottom-nav .mbn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #6c757d; font-size: 11px;
    padding: 4px 2px; transition: color .15s;
    position: relative;
}
.mp-mobile-bottom-nav .mbn-item i { font-size: 20px; margin-bottom: 2px; }
.mp-mobile-bottom-nav .mbn-item.active { color: var(--mp-primary); }
.mp-mobile-bottom-nav .mbn-item:hover { color: var(--mp-primary); }
.mp-mobile-bottom-nav .mbn-cart-badge {
    position: absolute; top: 0; right: 25%;
    background: var(--mp-danger); color: #fff; font-size: 10px;
    min-width: 16px; height: 16px; line-height: 16px;
    border-radius: 8px; padding: 0 4px; font-weight: 700;
}
/* Push page content above the bottom nav on mobile so it never gets covered */
@media (max-width: 991px) {
    body { padding-bottom: 70px; }
}

/* ===== Mobile 3-col header layout ===== */
.mp-header-mobile-3col > [class*="col-"] { flex: 0 0 auto; }
.mp-header-mobile-3col .col-3 { width: 25%; }
.mp-header-mobile-3col .col-6 { width: 50%; }
.mp-header-mobile-3col .mp-logo img { vertical-align: middle; }

/* Modern variant — bold primary accent on logo + nav */
.mp-header-modern { border-bottom: 3px solid var(--mp-primary); }
.mp-topbar-modern { background: var(--mp-topbar-bg); color: var(--mp-topbar-text); }
.mp-header-main-modern .mp-nav-link { font-weight: 600; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }

/* Classic variant — wide centered, traditional ecommerce look */
.mp-header-classic { background: #fff; border-bottom: 1px solid #e9ecef; }
.mp-topbar-classic { background: #f8f9fa; color: #495057; border-bottom: 1px solid #e9ecef; padding: 8px 0; font-size: 12px; }
.mp-topbar-classic a { color: #495057; }
.mp-topbar-classic a:hover { color: var(--mp-primary); }
.mp-header-main-classic .mp-logo { display: inline-block; }
.mp-nav-classic { background: #ffffff; border-top: 1px solid #e9ecef; border-bottom: 1px solid #e9ecef; }
.mp-nav-classic .nav-link { color: #212529; font-weight: 500; padding: 12px 22px; text-transform: uppercase; font-size: 12px; letter-spacing: .8px; }
.mp-nav-classic .nav-link:hover { color: var(--mp-primary); }

/* ===== Submenu (Bootstrap dropdowns — supports 2 levels: dropdown > dropdown-submenu) ===== */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu { display: none; margin-top: 0; }

/* Hover-to-open dropdowns + sub-dropdowns on mouse devices only. Touch devices
   keep Bootstrap's click-toggle behavior so a tap doesn't immediately navigate
   away. The parent <a> is a real link (no data-bs-toggle), so clicking it
   navigates to the parent's URL. */
@media (hover: hover) and (min-width: 992px) {
    .mp-nav-dropdown:hover > .dropdown-menu,
    .mp-nav .dropdown:hover > .dropdown-menu,
    .dropdown-submenu:hover > .dropdown-menu { display: block; }
    /* Zero margin so menu doesn't close while crossing the gap to the menu */
    .mp-nav-dropdown > .dropdown-menu,
    .mp-nav .dropdown > .dropdown-menu { margin-top: 0; }
}
@media (max-width: 991px) {
    /* On mobile collapse submenus inline — Bootstrap nav-mobile already stacks */
    .dropdown-submenu > .dropdown-menu { position: static !important; left: 0 !important; box-shadow: none; padding-left: 1rem; }
}

/* ===== Mini search bar (header-1 + header-2 "mini" mode) ===== */
.mp-search-mini-wrap { position: relative; }
.mp-search-mini-collapse { position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, 92vw); z-index: 1050; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.15); border-radius: 8px; padding: 10px; }
.mp-search-mini-wrap .mp-search-toggle { background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.1); }

/* Header-2 dark mini override */
.mp-header-classic-dark .mp-search-mini-wrap .mp-search-toggle { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: #fff; }
.mp-header-classic-dark .mp-search-mini-wrap .mp-search-toggle:hover { background: rgba(255,255,255,.15); }

/* ===== Header-2 nav strip sticky-on-scroll =====
   Disable the whole-header sticky (it overrides the page-level sticky from .mp-header)
   so ONLY the nav becomes sticky when user scrolls past it. */
.mp-header-classic-dark { position: relative !important; }
.mp-nav-sticky-scroll.is-stuck { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; box-shadow: 0 2px 6px rgba(0,0,0,.25); animation: mpStickyIn .25s ease-out; }
@keyframes mpStickyIn { from { transform: translateY(-100%); opacity: .5; } to { transform: translateY(0); opacity: 1; } }

/* ===== Classic Dark variant (Header-2) — same layout shape as Classic but dark theme ===== */
.mp-header-classic-dark { background: #1a1d23; color: #fff; border-bottom: 3px solid var(--mp-accent, #ffc107); }
.mp-topbar-classic-dark { background: #0f1115; color: #adb5bd; border-bottom: 1px solid #2a2d33; padding: 8px 0; font-size: 12px; }
.mp-topbar-classic-dark a { color: #dee2e6; text-decoration: none; }
.mp-topbar-classic-dark a:hover { color: var(--mp-accent, #ffc107); }
.mp-header-main-classic-dark { background: #1a1d23; color: #fff; }
.mp-logo-dark { display: inline-block; color: #fff; text-decoration: none; }
.mp-icon-btn-dark { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; transition: color .15s; }
.mp-icon-btn-dark:hover { color: var(--mp-accent, #ffc107); }
.mp-cart-btn-dark { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; position: relative; }
.mp-cart-btn-dark:hover { color: var(--mp-accent, #ffc107); }
.mp-nav-classic-dark { background: #0f1115; border-top: 1px solid #2a2d33; }
.mp-nav-classic-dark .nav-link { color: #dee2e6; font-weight: 500; padding: 12px 22px; text-transform: uppercase; font-size: 12px; letter-spacing: .8px; border-bottom: 2px solid transparent; }
.mp-nav-classic-dark .nav-link:hover { color: var(--mp-accent, #ffc107); border-bottom-color: var(--mp-accent, #ffc107); }

/* ===== Footer 2 Dark Compact (distinct from Footer-1 4col grid) ===== */
.mp-footer-dark-compact { background: #1a1d23; color: #adb5bd; border-top: 3px solid var(--mp-accent, #ffc107); }
.mp-footer-dark-compact h3 { color: #fff; }
.mp-footer-dark-compact .mp-social a { color: #dee2e6; }
.mp-footer-dark-compact .mp-social a:hover { color: var(--mp-accent, #ffc107); }
.mp-footer-dark-compact .mp-footer-links a { color: #adb5bd; text-decoration: none; }
.mp-footer-dark-compact .mp-footer-links a:hover { color: #fff; }
.mp-footer-dark-compact .mp-footer-bottom { background: #0f1115; color: #6c757d; border-top: 1px solid #2a2d33; }

/* ===== Mobile tweaks (general) ===== */
@media (max-width: 991px) {
    .mp-cart-summary { position: static; }
    .mp-search-form { max-width: 100% !important; }
    .mp-product-info h1 { font-size: 22px; }
    .mp-product-info .price-sale, .mp-product-info .price-single { font-size: 26px; }
    .mp-header { position: static; }   /* avoid sticky on mobile so bottom-nav is dominant */
    .mp-header-main { padding: 6px 0; }
}
@media (max-width: 575px) {
    .mp-page-header { padding: 24px 0; }
    .mp-page-header h1 { font-size: 22px; }
    .mp-header-main .container { padding-top: 4px; padding-bottom: 4px; }
}
