/* ===================================
   BMPT Premium Style v9.0
   Modern Design - Tabs, Cards, Brand Grid
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
    --bmpt-primary: #2e2485;
    --bmpt-primary-light: #4a3eb3;
    --bmpt-primary-glow: rgba(46, 36, 133, 0.18);
    --bmpt-amber: #b07a3a;
    --bmpt-amber-light: #c9944e;
    --bmpt-amber-glow: rgba(176, 122, 58, 0.18);
    --bmpt-surface: #ffffff;
    --bmpt-bg: #f5f4f8;
    --bmpt-border: #e4e4f0;
    --bmpt-text: #1a1736;
    --bmpt-muted: #6b6a80;
    --bmpt-radius: 14px;
    --bmpt-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --bmpt-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --bmpt-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --bmpt-transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Wrap ── */
.bmpt-wrap {
    max-width: 1380px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bmpt-bg);
    color: var(--bmpt-text);
}

/* ══════════════════════════════════════
   BRAND SECTION
══════════════════════════════════════ */
.bmpt-brands-section {
    background: var(--bmpt-surface);
    border-radius: var(--bmpt-radius);
    padding: 28px 24px 22px;
    box-shadow: var(--bmpt-shadow-md);
    margin-bottom: 4px;
    border: 1px solid var(--bmpt-border);
}

.bmpt-main-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--bmpt-text);
    margin: 0 0 22px;
    text-align: left;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmpt-main-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--bmpt-primary) 0%, var(--bmpt-primary-light) 100%);
    border-radius: 4px;
}

/* Brand Grid */
.bmpt-brands-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    padding: 6px 2px 12px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.bmpt-brands-grid::-webkit-scrollbar {
    height: 4px;
}

.bmpt-brands-grid::-webkit-scrollbar-track {
    background: transparent;
}

.bmpt-brands-grid::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* Brand Card */
.bmpt-brand-card {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: var(--bmpt-surface);
    border: 2px solid var(--bmpt-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--bmpt-shadow-sm);
    padding: 0;
    transition: var(--bmpt-transition);
}

.bmpt-brand-card:hover {
    border-color: var(--bmpt-primary-light);
    box-shadow: 0 0 0 4px var(--bmpt-primary-glow), var(--bmpt-shadow-md);
    transform: translateY(-3px) scale(1.04);
}

.bmpt-brand-card.active {
    border: 3px solid var(--bmpt-primary) !important;
    box-shadow: 0 0 0 4px var(--bmpt-primary-glow), 0 8px 20px rgba(46, 36, 133, 0.2) !important;
    transform: scale(1.06);
}

.bmpt-brand-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4fb;
}

.bmpt-brand-logo {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.bmpt-brand-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--bmpt-primary);
    text-align: center;
    padding: 0 8px;
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.bmpt-brand-check {
    display: none !important;
}

/* ══════════════════════════════════════
   CONTENT SECTION WRAPPER
══════════════════════════════════════ */
.bmpt-content-section {
    background: var(--bmpt-surface);
    border-radius: 0 0 var(--bmpt-radius) var(--bmpt-radius);
    box-shadow: var(--bmpt-shadow-md);
    border: 1px solid var(--bmpt-border);
    border-top: none;
    overflow: hidden;
}

/* ══════════════════════════════════════
   MODEL TABS (Year Tabs)
══════════════════════════════════════ */
.bmpt-models-tabs {
    background: var(--bmpt-surface);
    padding: 18px 0 16px;
    border-bottom: 2px solid var(--bmpt-border);
    position: relative;
}

.bmpt-tabs-scroll {
    display: flex;
    gap: 10px;
    padding: 4px 22px;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: center;
}

.bmpt-tabs-scroll::-webkit-scrollbar {
    display: none;
}

/* Model Tab pill */
.bmpt-tab {
    flex-shrink: 0;
    padding: 9px 22px;
    background: var(--bmpt-bg);
    border: 1.5px solid var(--bmpt-border);
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--bmpt-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--bmpt-transition);
    letter-spacing: 0.1px;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.bmpt-tab::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bmpt-primary) 0%, var(--bmpt-primary-light) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
    z-index: 0;
}

.bmpt-tab span,
.bmpt-tab {
    position: relative;
    z-index: 1;
}

.bmpt-tab:hover {
    border-color: var(--bmpt-primary-light);
    color: var(--bmpt-primary);
    background: var(--bmpt-surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--bmpt-primary-glow);
}

.bmpt-tab.active {
    background: linear-gradient(135deg, var(--bmpt-primary) 0%, var(--bmpt-primary-light) 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px var(--bmpt-primary-glow) !important;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════
   CATEGORY TABS
══════════════════════════════════════ */
.bmpt-categories-tabs {
    background: #fdfcfa;
    padding: 14px 0 18px;
    border-bottom: 2px solid var(--bmpt-border);
}

.bmpt-categories-tabs-scroll {
    display: flex;
    gap: 10px;
    padding: 2px 22px;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: center;
}

.bmpt-categories-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.bmpt-category-tab {
    flex-shrink: 0;
    padding: 8px 20px;
    background: var(--bmpt-surface);
    border: 1.5px solid #e2ddd8;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #7c7166;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--bmpt-transition);
    letter-spacing: 0.1px;
    line-height: 1;
}

.bmpt-category-tab:hover {
    border-color: var(--bmpt-amber);
    color: var(--bmpt-amber);
    background: #fff9f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--bmpt-amber-glow);
}

.bmpt-category-tab.active {
    background: linear-gradient(135deg, var(--bmpt-amber) 0%, var(--bmpt-amber-light) 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px var(--bmpt-amber-glow) !important;
    transform: translateY(-1px);
}

/* ══════════════════════════════════════
   PRODUCTS GRID & CARDS
══════════════════════════════════════ */
.bmpt-products-display {
    padding: 28px 22px 30px;
    background: var(--bmpt-surface);
}

.bmpt-products-grid-shopify {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}

/* Product Card */
.bmpt-product-card {
    background: var(--bmpt-surface);
    border: 1px solid var(--bmpt-border);
    border-radius: var(--bmpt-radius);
    overflow: hidden;
    box-shadow: var(--bmpt-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--bmpt-transition);
}

.bmpt-product-card:hover {
    box-shadow: var(--bmpt-shadow-lg);
    transform: translateY(-4px);
    border-color: #d0cff0;
}

/* Product Image */
.bmpt-product-image {
    background: #f4f4fb;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.bmpt-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bmpt-product-card:hover .bmpt-product-image img {
    transform: scale(1.05);
}

/* Product Info */
.bmpt-product-info {
    padding: 14px 14px 8px;
    flex: 1;
}

.bmpt-product-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bmpt-text);
    margin: 0 0 6px;
    line-height: 1.4;
}

.bmpt-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.bmpt-product-title a:hover {
    color: var(--bmpt-primary);
}

/* Rating */
.bmpt-product-rating {
    display: flex;
    gap: 1px;
    margin-bottom: 6px;
}

.bmpt-product-rating .star {
    font-size: 13px;
    color: #d0ccc4;
    transition: color 0.2s;
}

.bmpt-product-rating .star.filled {
    color: #f59e0b;
}

/* Price */
.bmpt-product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--bmpt-text);
    margin: 4px 0 6px;
    letter-spacing: -0.3px;
}

/* Variant description */
.bmpt-variant-description {
    font-size: 12px;
    color: #3b5fb5;
    padding: 7px 11px;
    background: #eff4ff;
    border-left: 3px solid #4a6cf7;
    border-radius: 0 6px 6px 0;
    margin: 8px 0;
    font-style: italic;
    line-height: 1.5;
}

/* Variant Swatches */
.bmpt-variant-swatches {
    display: flex;
    gap: 7px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}

.bmpt-variant-swatch {
    width: 38px;
    height: 38px;
    border: 2px solid var(--bmpt-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 2px;
    transition: var(--bmpt-transition);
    background: var(--bmpt-surface);
}

.bmpt-variant-swatch:hover {
    border-color: var(--bmpt-primary-light);
    transform: scale(1.08);
}

.bmpt-variant-swatch.active {
    border-color: var(--bmpt-primary);
    box-shadow: 0 0 0 2px var(--bmpt-primary-glow);
}

.bmpt-variant-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* More variants badge */
.bmpt-more-variants {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    background: var(--bmpt-bg);
    border: 1.5px dashed var(--bmpt-border);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bmpt-muted);
    padding: 0 6px;
}

/* Product Actions */
.bmpt-product-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
}

.bmpt-quick-view-btn,
.bmpt-add-cart-btn {
    flex: 1;
    padding: 9px 10px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: var(--bmpt-transition);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    line-height: 1;
    font-family: inherit;
}

.bmpt-quick-view-btn {
    background: var(--bmpt-surface);
    color: var(--bmpt-text);
    border: 1.5px solid var(--bmpt-border);
}

.bmpt-quick-view-btn:hover {
    background: var(--bmpt-bg);
    border-color: #bbb;
}

.bmpt-add-cart-btn {
    background: linear-gradient(135deg, var(--bmpt-primary) 0%, var(--bmpt-primary-light) 100%) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 3px 10px var(--bmpt-primary-glow);
}

.bmpt-add-cart-btn:hover {
    box-shadow: 0 6px 18px var(--bmpt-primary-glow) !important;
    transform: translateY(-1px);
    opacity: 0.93;
}

/* Empty State */
.bmpt-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--bmpt-muted);
}

.bmpt-empty-state p {
    font-size: 15px;
    font-weight: 500;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
    .bmpt-brands-section {
        padding: 20px 16px 16px;
    }

    .bmpt-brand-card {
        width: 88px;
        height: 88px;
    }

    .bmpt-brand-logo {
        width: 78%;
        height: 78%;
    }

    .bmpt-products-grid-shopify {
        grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
        gap: 14px;
    }

    .bmpt-products-display {
        padding: 20px 14px 24px;
    }

    .bmpt-tabs-scroll,
    .bmpt-categories-tabs-scroll {
        padding: 4px 14px;
    }
}

@media (max-width: 480px) {
    .bmpt-brand-card {
        width: 78px;
        height: 78px;
    }

    .bmpt-brand-logo {
        width: 75%;
        height: 75%;
    }

    .bmpt-products-grid-shopify {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bmpt-tab {
        padding: 7px 14px;
        font-size: 12px;
    }

    .bmpt-category-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .bmpt-main-title {
        font-size: 18px;
    }
}

/* ══════════════════════════════════════
   QUICK VIEW MODAL
══════════════════════════════════════ */
.bmpt-qv-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 8, 30, 0.70);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmpt-qv-modal.active {
    opacity: 1;
    visibility: visible;
}

.bmpt-qv-container {
    position: relative;
    background: white;
    border-radius: 18px;
    width: 92%;
    max-width: 920px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
}

.bmpt-qv-modal.active .bmpt-qv-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.bmpt-qv-container::-webkit-scrollbar {
    width: 6px;
}

.bmpt-qv-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* QV Content Layout */
.bmpt-quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

@media (max-width: 640px) {
    .bmpt-quick-view-content {
        grid-template-columns: 1fr;
    }
}

.bmpt-qv-image-section {
    background: #f4f4fb;
    border-radius: 18px 0 0 18px;
    overflow: hidden;
}

.bmpt-qv-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 380px;
}

.bmpt-qv-gallery {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    background: #eeecf8;
}

.bmpt-qv-thumb {
    width: 56px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: var(--bmpt-transition);
}

.bmpt-qv-thumb.active,
.bmpt-qv-thumb:hover {
    border-color: var(--bmpt-primary);
}

.bmpt-qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bmpt-qv-details {
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bmpt-qv-details h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--bmpt-text);
    margin: 0;
    line-height: 1.3;
}

.bmpt-qv-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--bmpt-primary);
    letter-spacing: -0.4px;
}

.bmpt-qv-description {
    font-size: 14px;
    color: var(--bmpt-muted);
    line-height: 1.7;
}

.bmpt-qv-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.bmpt-qv-add-cart,
.bmpt-qv-view-full {
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: var(--bmpt-transition);
    font-family: inherit;
}

.bmpt-qv-add-cart {
    background: linear-gradient(135deg, var(--bmpt-primary) 0%, var(--bmpt-primary-light) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--bmpt-primary-glow);
}

.bmpt-qv-add-cart:hover {
    box-shadow: 0 8px 24px var(--bmpt-primary-glow);
    transform: translateY(-2px);
    color: #fff;
}

.bmpt-qv-view-full {
    background: var(--bmpt-bg);
    color: var(--bmpt-text);
    border: 1.5px solid var(--bmpt-border);
}

.bmpt-qv-view-full:hover {
    background: var(--bmpt-border);
    color: var(--bmpt-text);
}