/* =============================================================================
   Leka TMS — Cart Drawer / Popup Styles
   popup-new.css
   ============================================================================= */


/* ── 1. Drawer Overlay ──────────────────────────────────────────────────────── */

#cart-drawer {
    background: rgba(21, 45, 76, 0.95) !important;
}

#cart-drawer.active {
    pointer-events: auto !important;
    display:        flex !important;
    justify-content: center !important;
    align-items:    center !important;
}


/* ── 2. Drawer Inner Container ──────────────────────────────────────────────── */

.cart-drawer-inner {
    border-radius: var(--Corner-radius-Surface, 4px) !important;
    background:    var(--color-surface-subtle, #F3F3F6) !important;
    width:         900px !important;
    max-height:    85vh !important;
    overflow-y:    auto;
}

@media (max-width: 768px) {
    .cart-drawer-inner {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding:    0 !important;
    }
}

.cart-drawer-inner h2 {
    font-size:     18px !important;
    line-height:   150% !important;
    margin-bottom: 0 !important;
}


/* ── 3. Drawer Header ───────────────────────────────────────────────────────── */

.drawer-header {
    position:              relative !important;
    display:               grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap:                   48px !important;
    margin-bottom:         1rem !important;
}

/* Vertical divider between the two columns (desktop only) */
@media (min-width: 768px) {
    .drawer-header::after {
        content:          "" !important;
        position:         absolute !important;
        bottom:           0 !important;
        left:             calc(50% - 0.5px) !important;
        width:            1px !important;
        height:           100% !important;
        background-color: rgba(21, 45, 76, 0.35) !important;
    }
}

@media (max-width: 768px) {
    .drawer-header {
        grid-template-columns: 1fr !important;
        gap:                   0 !important;
    }
}


/* ── 4. Drawer Section Titles ───────────────────────────────────────────────── */

.drawer-added-title,
.drawer-summary-title {
    padding-bottom: 12px !important;
    border-bottom:  1px solid rgba(21, 45, 76, 0.35) !important;
}


/* ── 5. Added Product ───────────────────────────────────────────────────────── */

.drawer-added-product {
    position: relative !important;
}


.drawer-feedback {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #43A047;
    border-radius: 4px;
    background: #E8F5E9;
    color: #1B5E20;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .drawer-added-product {
        margin-bottom: .75rem !important;
    }
}

.drawer-product-details {
    padding-top:    40px;
    padding-bottom: 40px;
}

@media (max-width: 768px) {
    .drawer-product-details {
        padding-top:    20px;
        padding-bottom: 20px;
    }
}

.drawer-product-image img {
    mix-blend-mode: multiply;
}

.drawer-product-info h3 {
    color:         var(--color-text-heading, #0F1932) !important;
    font-family:   'area-normal' !important;
    font-size:     var(--Font-Size-M, 16px) !important;
    font-style:    normal !important;
    font-weight:   500 !important;
    line-height:   150% !important;
    margin-bottom: 0 !important;
}

.drawer-product-price {
    margin-top: 11px !important;
}

/* ── Discount Rules bulk-price table inside drawer ──────────────────────────── */

.drawer-discount-table {
    margin-top: 16px;
}

.drawer-discount-table .wdr_bulk_table_msg {
    width:           100%;
    border-collapse: collapse;
    font-size:       13px;
}

.drawer-discount-table .wdr_bulk_table_thead th {
    padding:         6px 10px;
    text-align:      left;
    font-weight:     600;
    border-bottom:   2px solid #e0e0e0;
    background:      transparent;
}

.drawer-discount-table .wdr_bulk_table_tr td {
    padding:         6px 10px;
    border-bottom:   1px solid #f0f0f0;
    vertical-align:  middle;
}

.drawer-discount-table .wdr_bulk_table_tr:last-child td {
    border-bottom: none;
}


/* ── 6. Cart Summary ────────────────────────────────────────────────────────── */

.drawer-cart-summary {
    display:         flex !important;
    justify-content: space-between !important;
    margin-top:      20px !important;
    margin-bottom:   20px !important;
}

.drawer-cart-subtotal > strong {
    display: none !important;
}

.drawer-summary .edit-cart {
    display:     flex !important;
    align-items: center !important;
    gap:         4px !important;
    margin-top:  8px !important;
    color:       var(--color-text-link, #264999) !important;
    font-family: 'area-normal' !important;
    font-size:   var(--Font-Size-S, 14px) !important;
    font-style:  normal !important;
    font-weight: 700 !important;
    line-height: 150% !important;
}

.drawer-order-more {
    width: 100% !important;
}


/* ── 7. Stackable Notice ────────────────────────────────────────────────────── */

@media (min-width: 768px) {
    .drawer-stackable-placeholder {
        position: absolute !important;
        bottom:   0 !important;
    }
}

@media (min-width: 768px) {
    .drawer-product-details.has-discount-table ~ .drawer-stackable-placeholder {
        position:   static !important;
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .drawer-stackable-placeholder {
        margin-bottom: 0.75rem;
    }
}

.drawer-stackable-placeholder .drawer-stackable-notice {
    border-radius: var(--Corner-radius-Surface, 4px) !important;
    border:        1px solid var(--Green-600, #43A047) !important;
    background:    var(--Green-50, #E8F5E9) !important;
    display:       flex !important;
    padding:       8px 12px !important;
    align-items:   center !important;
    gap:           8px !important;
    align-self:    stretch !important;
}

.drawer-stackable-placeholder .drawer-stackable-notice .drawer-stackable-check {
    width:           40px !important;
    height:          40px !important;
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
}

.drawer-stackable-placeholder .drawer-stackable-notice .drawer-stackable-check svg {
    fill:   var(--Green-600, #388E3C) !important;
    width:  27px !important;
    height: 27px !important;
}

.drawer-stackable-title {
    color:       var(--color-feedback-succes, #388E3C) !important;
    font-family: 'area-normal' !important;
    font-size:   var(--Font-Size-S, 14px) !important;
    font-style:  normal !important;
    font-weight: 700 !important;
    line-height: 150% !important;
    display:     block !important;
}

.drawer-stackable-text {
    color:       var(--color-text-heading, #0F1932) !important;
    font-family: 'area-normal' !important;
    font-size:   var(--Font-Size-XS, 12px) !important;
    font-style:  normal !important;
    font-weight: 500 !important;
    line-height: 150% !important;
    display:     block !important;
}


/* ── 8. Stack Progress Bar ──────────────────────────────────────────────────── */

.drawer-stack-bar {
    width:          100% !important;
    height:         11px !important;
    display:        flex !important;
    flex-direction: column !important;
    align-items:    flex-start !important;
    align-self:     stretch !important;
    border-radius:  100px !important;
    overflow:       hidden !important;
    background:     var(--color-text-heading-inverse, #FFF) !important;
}

.drawer-stack-bar-fill {
    background: var(--color-background-Inverse, #152D4C) !important;
    height:     100%;
    transition: width 0.4s ease !important;
}

.drawer-stack-progress.is-completing .drawer-stack-label,
.drawer-stack-progress.is-complete .drawer-stack-label {
    color: var(--Green-600, #388E3C) !important;
}

.drawer-stack-progress.is-complete .drawer-stack-bar-fill {
    background: var(--Green-600, #388E3C) !important;
}

.drawer-stack-progress-label {
    color:         var(--color-text-heading, #0F1932) !important;
    font-size:     var(--Font-Size-XS, 12px) !important;
    font-style:    normal !important;
    font-weight:   500 !important;
    line-height:   150% !important;
    margin-bottom: 4px !important;
    margin-top:    12px !important;
}

.drawer-stack-label {
    font-family:   'area-normal' !important;
    margin-bottom: 0 !important;
}

.drawer-stack-shipping-note {
    margin-top:     12px !important;
    margin-bottom:  12px !important;
    display:        flex !important;
    align-content:  center !important;
    align-items:    center !important;
    gap:            4px !important;
}

.drawer-stack-shipping-text {
    color:       var(--color-text-heading, #0F1932) !important;
    font-family: 'area-normal' !important;
    font-size:   var(--Font-Size-XS, 12px) !important;
    font-style:  normal !important;
    font-weight: 500 !important;
    line-height: 150% !important;
}


/* ── 9. Mobile Carousel Override ────────────────────────────────────────────── */

@media (max-width: 768px) {
    #cart-drawer-content .us_product_carousel .owl-carousel {
        flex-wrap: wrap !important;
    }
}

.drawer-cross-sells-content {
    min-height: 320px;
    transition: opacity 0.22s ease;
}

.drawer-cross-sells-content.is-loading {
    opacity: 1 !important;
}

.w-grid.type_carousel .drawer-skeleton-list {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.drawer-skeleton-item {
    width: 100%;
    margin: 0 !important;
}

.drawer-skeleton-item .w-grid-item-h {
    border-radius: 0 !important;
}

.drawer-skeleton-shell {
    border-radius: var(--site-border-radius, 6px) !important;
    padding: 1rem !important;
    background: #ffffff !important;
    min-height: 100%;
}

.drawer-skeleton-meta {
    display: grid;
    gap: 8px;
}

.drawer-skeleton-image,
.drawer-skeleton-line,
.drawer-skeleton-button {
    position: relative;
    overflow: hidden;
    background: #e6ebf2;
    border-radius: 4px;
}

.drawer-skeleton-image::after,
.drawer-skeleton-line::after,
.drawer-skeleton-button::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(230, 235, 242, 0) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(230, 235, 242, 0) 100%);
    animation: drawerSkeletonShimmer 1.1s infinite;
}

.drawer-skeleton-image {
    aspect-ratio: 4 / 3;
    margin-bottom: 0.75rem;
}

.drawer-skeleton-line {
    height: 12px;
}

.drawer-skeleton-line-title {
    width: 88%;
}

.drawer-skeleton-line-meta {
    width: 62%;
}

.drawer-skeleton-line-price {
    width: 48%;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.drawer-skeleton-button {
    width: 100%;
    height: 44px;
    margin-top: auto;
}

@keyframes drawerSkeletonShimmer {
    to {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .drawer-cross-sells-content {
        min-height: 510px;
    }

    .drawer-skeleton-list {
        grid-template-columns: 1fr;
    }

    .drawer-skeleton-image {
        height: 95px;
        aspect-ratio: 10 / 8;
        margin-bottom: 0;
    }
    .w-grid.type_carousel .drawer-skeleton-list {
        display: grid !important;
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }
}
