/* BoostCart Frontend — Premium Store UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bc-accent: #6366f1;
    --bc-accent-hover: #4f46e5;
    --bc-accent-bg: #eef2ff;
    --bc-green: #059669;
    --bc-text: #111827;
    --bc-text-2: #374151;
    --bc-text-3: #6b7280;
    --bc-border: #e5e7eb;
    --bc-bg: #f9fafb;
    --bc-surface: #ffffff;
    --bc-radius: 10px;
}

/* ── Section Title ── */
.boostcart-section-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--bc-text);
    margin: 40px 0 16px;
    letter-spacing: -0.02em;
}

.boostcart-section-title::after {
    display: none;
}

/* ── FBT Section ── */
.boostcart-fbt-section {
    margin: 36px 0;
    padding: 28px;
    background: var(--bc-surface);
    border-radius: var(--bc-radius);
    border: 1px solid var(--bc-border);
    font-family: 'Inter', system-ui, sans-serif;
}

.boostcart-fbt-grid {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.boostcart-fbt-grid::-webkit-scrollbar {
    display: none;
}

.boostcart-fbt-item {
    flex: 0 0 170px;
    text-align: center;
    padding: 14px;
    background: var(--bc-bg);
    border-radius: 8px;
    transition: box-shadow 0.2s;
    border: 1px solid transparent;
}

.boostcart-fbt-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--bc-border);
}

.boostcart-fbt-current {
    border-color: var(--bc-accent);
    background: var(--bc-accent-bg);
}

.boostcart-fbt-image img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

.boostcart-fbt-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bc-text);
    margin: 10px 0 4px;
    line-height: 1.3;
}

.boostcart-fbt-name a {
    color: inherit;
    text-decoration: none;
}

.boostcart-fbt-name a:hover {
    color: var(--bc-accent);
}

.boostcart-fbt-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--bc-accent);
}

.boostcart-fbt-plus {
    font-size: 20px;
    font-weight: 300;
    color: #d1d5db;
    flex-shrink: 0;
}

.boostcart-fbt-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bc-text-3);
    cursor: pointer;
}

.boostcart-fbt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bc-border);
    flex-wrap: wrap;
    gap: 12px;
}

.boostcart-fbt-total {
    font-size: 16px;
    color: var(--bc-text-3);
    font-weight: 500;
}

.boostcart-fbt-total strong {
    color: var(--bc-text);
    font-weight: 700;
    font-size: 20px;
}

.boostcart-fbt-add-all {
    background: var(--bc-accent) !important;
    color: #fff !important;
    border: none !important;
    padding: 11px 24px !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    transition: background 0.15s !important;
}

.boostcart-fbt-add-all:hover {
    background: var(--bc-accent-hover) !important;
}

/* ── Product Grid ── */
.boostcart-related-section,
.boostcart-upsell-section {
    margin: 36px 0;
    font-family: 'Inter', system-ui, sans-serif;
}

.boostcart-product-grid,
.boostcart-upsell-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.boostcart-product-card,
.boostcart-upsell-card {
    background: var(--bc-surface);
    border-radius: var(--bc-radius);
    overflow: hidden;
    border: 1px solid var(--bc-border);
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.boostcart-product-card:hover,
.boostcart-upsell-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.boostcart-product-image img,
.boostcart-upsell-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.boostcart-product-info,
.boostcart-upsell-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.boostcart-product-name,
.boostcart-upsell-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bc-text);
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.35;
}

.boostcart-product-name:hover,
.boostcart-upsell-name:hover {
    color: var(--bc-accent);
}

.boostcart-product-price,
.boostcart-upsell-price {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--bc-accent);
    margin-bottom: 12px;
}

.boostcart-ajax-add {
    width: 100%;
    margin-top: auto;
    background: var(--bc-accent) !important;
    color: #fff !important;
    border: none !important;
    padding: 9px 14px !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: background 0.15s !important;
}

.boostcart-ajax-add:hover {
    background: var(--bc-accent-hover) !important;
}

.boostcart-ajax-add.added {
    background: var(--bc-green) !important;
}

/* ── Upsell Popup ── */
.boostcart-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.boostcart-popup-overlay.active {
    opacity: 1;
}

.boostcart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    background: var(--bc-surface);
    border-radius: 14px;
    padding: 28px;
    max-width: 560px;
    width: 92%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

.boostcart-popup.active {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.boostcart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.boostcart-popup-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--bc-text);
    margin: 0;
}

.boostcart-popup-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--bc-border);
    background: #fff;
    color: var(--bc-text-3);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.boostcart-popup-close:hover {
    background: var(--bc-bg);
}

.boostcart-popup-success {
    text-align: center;
    padding: 12px;
    background: #ecfdf5;
    border-radius: 8px;
    margin-bottom: 16px;
    color: var(--bc-green);
    font-weight: 600;
    font-size: 14px;
}

.boostcart-popup-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.boostcart-popup-item {
    text-align: center;
    padding: 12px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    transition: border-color 0.15s;
    background: #fff;
}

.boostcart-popup-item:hover {
    border-color: var(--bc-accent);
}

.boostcart-popup-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    margin: 0 auto 8px;
    display: block;
}

.boostcart-popup-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bc-text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.boostcart-popup-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--bc-accent);
}

.boostcart-popup-footer {
    margin-top: 20px;
    text-align: center;
}

.boostcart-popup-footer a {
    color: var(--bc-text-3);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.boostcart-popup-footer a:hover {
    color: var(--bc-accent);
}

/* ── Toast ── */
.boostcart-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    z-index: 99999;
    animation: bcFadeUp 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.boostcart-toast.success {
    background: var(--bc-green);
}

.boostcart-toast.error {
    background: #dc2626;
}

@keyframes bcFadeUp {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .boostcart-fbt-grid {
        flex-direction: column;
    }

    .boostcart-fbt-item {
        flex: none;
        width: 100%;
    }

    .boostcart-fbt-plus {
        display: none;
    }

    .boostcart-product-grid,
    .boostcart-upsell-slider {
        grid-template-columns: repeat(2, 1fr);
    }

    .boostcart-popup {
        padding: 20px;
    }

    .boostcart-popup-products {
        grid-template-columns: 1fr 1fr;
    }
}