/**
 * BlackVille Side Cart - Prada/Balenciaga Aesthetic
 * Premium sliding drawer cart
 */

/* =========================
   1. OVERLAY
   ========================= */
.bv-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

body.bv-cart-open .bv-cart-overlay {
    opacity: 1;
    visibility: visible;
}

/* =========================
   2. DRAWER CONTAINER
   ========================= */
.bv-side-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 100%;
    height: 100%;
    background: #fff;
    border-left: 1px solid #e5e5e5;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.bv-cart-open .bv-side-cart {
    transform: translateX(0);
}

.bv-side-cart-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bv-side-cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* =========================
   3. HEADER
   ========================= */
.bv-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.bv-cart-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    color: #000;
}

.bv-cart-close {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.bv-cart-close:hover {
    opacity: 0.6;
}

.bv-cart-close svg {
    width: 20px;
    height: 20px;
}

/* =========================
   4. FREE SHIPPING BAR
   ========================= */
.bv-shipping-bar {
    padding: 15px 25px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.bv-shipping-progress {
    width: 100%;
    height: 2px;
    background: #e5e5e5;
    margin-bottom: 8px;
}

.bv-shipping-progress-fill {
    height: 100%;
    background: #000;
    transition: width 0.4s ease;
}

.bv-shipping-text {
    font-size: 12px;
    color: #666;
    margin: 0;
    text-align: center;
}

.bv-shipping-success {
    color: #000;
    font-weight: 500;
}

/* Kit Incentive Message */
.bv-kit-incentive {
    background-color: #f9f9f9;
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #333;
}

.bv-kit-incentive strong {
    color: #000;
    font-weight: 700;
}

.bv-kit-incentive.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-bottom-color: #c8e6c9;
}

/* =========================
   5. CART ITEMS (SCROLLABLE)
   ========================= */
.bv-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.bv-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 25px;
    text-align: center;
}

.bv-cart-empty p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.bv-continue-shopping {
    font-size: 12px;
    color: #000;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Item Row */
.bv-cart-item {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: opacity 0.3s ease;
}

.bv-cart-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Item Image (3:4 aspect ratio) */
.bv-item-image {
    flex-shrink: 0;
    width: 80px;
}

.bv-item-image a {
    display: block;
}

.bv-item-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0;
}

/* Item Details */
.bv-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bv-item-name {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}

.bv-item-name:hover {
    text-decoration: underline;
}

.bv-item-variation {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
}

.bv-item-qty-label {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
}

.bv-item-price {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    margin: 0 0 8px 0;
}

.bv-item-remove {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    align-self: flex-start;
    transition: color 0.2s ease;
}

.bv-item-remove:hover {
    color: #000;
}

/* =========================
   6. FOOTER (STICKY)
   ========================= */
.bv-cart-footer {
    flex-shrink: 0;
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.bv-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bv-subtotal-label {
    font-size: 13px;
    color: #000;
}

.bv-subtotal-value {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

/* View Cart Button (outline) */
.bv-btn-view-cart {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #000;
    color: #000;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.bv-btn-view-cart:hover {
    background: #000;
    color: #fff;
}

/* Checkout Button (filled) */
.bv-btn-checkout {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #000;
    border: none;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

.bv-btn-checkout:hover {
    opacity: 0.85;
    color: #fff;
}

/* =========================
   7. MOBILE RESPONSIVE
   ========================= */
@media (max-width: 500px) {
    .bv-side-cart {
        width: 100%;
        border-left: none;
    }

    .bv-cart-header {
        padding: 15px 20px;
    }

    .bv-shipping-bar {
        padding: 12px 20px;
    }

    .bv-cart-item {
        padding: 15px 20px;
    }

    .bv-item-image {
        width: 70px;
    }

    .bv-cart-footer {
        padding: 15px 20px;
    }
}

/* =========================
   8. PREVENT BODY SCROLL
   ========================= */
body.bv-cart-open {
    overflow: hidden;
}

/* =========================
   9. CROSS-SELL SECTION (Inside scrollable)
   ========================= */
.bv-cross-sell {
    padding: 25px 20px;
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.bv-cross-sell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bv-cross-sell-title {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    margin: 0;
}

.bv-cross-sell-nav {
    display: flex;
    gap: 8px;
}

.bv-cross-sell-prev,
.bv-cross-sell-next {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bv-cross-sell-prev:hover,
.bv-cross-sell-next:hover {
    border-color: #000;
    background: #000;
}

.bv-cross-sell-prev:hover svg,
.bv-cross-sell-next:hover svg {
    stroke: #fff;
}

.bv-cross-sell-carousel {
    overflow: hidden;
}

.bv-cross-sell-items {
    display: flex;
    gap: 12px;
    transition: transform 0.3s ease;
}

.bv-cross-sell-item {
    flex: 0 0 calc(100% - 50px);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
    position: relative;
    transition: opacity 0.2s ease;
}

.bv-cross-sell-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

.bv-cross-sell-image {
    flex: 0 0 70px;
    width: 70px;
}

.bv-cross-sell-image a {
    display: block;
}

.bv-cross-sell-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.bv-cross-sell-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bv-cross-sell-name {
    font-size: 13px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bv-cross-sell-name:hover {
    text-decoration: underline;
}

.bv-cross-sell-price {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

/* Variation Selectors */
.bv-cross-sell-variations {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.bv-variation-select {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 11px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

.bv-variation-select:focus {
    outline: none;
    border-color: #000;
}

/* Add Button */
.bv-cross-sell-add {
    flex-shrink: 0;
    align-self: center;
    width: 36px;
    height: 36px;
    background: #000;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bv-cross-sell-add svg {
    stroke: #fff;
}

.bv-cross-sell-add:hover {
    background: #333;
}

/* =========================
   10. CONTINUE SHOPPING BUTTON
   ========================= */
.bv-btn-continue {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: underline;
    color: #000;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bv-btn-continue:hover {
    color: #666;
}

/* Hide old view cart button if still present */
.bv-btn-view-cart {
    display: none;
}

/* =========================
   11. MOBILE ADJUSTMENTS
   ========================= */
@media (max-width: 500px) {
    .bv-cross-sell {
        padding: 20px 15px;
    }

    .bv-cross-sell-item {
        flex: 0 0 100%;
        padding: 10px;
    }

    .bv-cross-sell-image {
        flex: 0 0 60px;
        width: 60px;
    }

    .bv-variation-select {
        font-size: 10px;
        padding: 5px 6px;
    }

    .bv-cross-sell-add {
        width: 32px;
        height: 32px;
    }
}