/* ==========================================================================
   TSS LUXURY SUITE - CART SIDEBAR DRAWER CSS
   Exact match to designer reference (media_1789583255370.png)
   Strictly Scoped: Outfit Typography, Luxury #0f0d1a palette
   ========================================================================== */

/* 1. Backdrop Blur & Overlay */
.tss-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 13, 26, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s cubic-bezier(0.25, 1, 0.5, 1);
}

.tss-cart-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 2. Main Slide-Out Drawer Panel */
.tss-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 430px;
    max-width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 999999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 36px rgba(0, 0, 0, 0.14);
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0f0d1a;
}

.tss-cart-drawer.active {
    transform: translateX(0);
}

/* 3. Header */
.tss-cart-drawer-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    flex-shrink: 0;
    box-sizing: border-box;
}

.tss-cart-drawer-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.tss-cart-drawer-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 21px !important;
    font-weight: 500 !important;
    color: #0f0d1a !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.01em;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tss-cart-items-count {
    font-family: 'Outfit', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #222222 !important;
    margin-left: 4px;
}

.tss-cart-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #111111;
    padding: 0;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
    outline: none;
}

.tss-cart-drawer-close:hover {
    background-color: #f5f5f5;
    color: #000000;
    transform: rotate(90deg);
}

/* 4. Drawer Body & Scrollable Items */
.tss-cart-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 22px 16px 22px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d1d1 transparent;
    box-sizing: border-box;
}

.tss-cart-drawer-body::-webkit-scrollbar {
    width: 5px;
}
.tss-cart-drawer-body::-webkit-scrollbar-thumb {
    background: #dcdcdc;
    border-radius: 4px;
}

/* Empty State */
.tss-cart-empty-state {
    text-align: center;
    padding: 60px 16px;
    box-sizing: border-box;
}

.tss-cart-empty-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border-radius: 50%;
    border: 1px solid #eeeeee;
}

.tss-cart-empty-state h3 {
    font-family: 'Outfit', sans-serif !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: #0f0d1a !important;
    margin: 0 0 8px 0 !important;
}

.tss-cart-empty-state p {
    font-size: 14px;
    color: #777777;
    margin: 0 0 22px 0;
    line-height: 1.45;
}

.tss-cart-empty-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #000000;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tss-cart-empty-btn:hover {
    background: #222222;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Cart Items List */
.tss-cart-items-list {
    display: flex;
    flex-direction: column;
}

.tss-cart-item {
    display: flex;
    gap: 15px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f2;
    position: relative;
    align-items: flex-start;
    box-sizing: border-box;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.tss-cart-item.tss-removing {
    opacity: 0;
    transform: translateX(16px);
    pointer-events: none;
}

/* Thumbnail (1:1.35 aspect ratio - Portrait fill) */
.tss-cart-item-thumb {
    width: 78px;
    min-width: 78px;
    height: 105px;
    border-radius: 6px;
    overflow: hidden;
    background: #f7f7f8;
    flex-shrink: 0;
    position: relative;
    border: 1px solid #f0f0f2;
}

.tss-cart-item-thumb a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.tss-cart-item-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    border-radius: 5px;
}

/* Details Column */
.tss-cart-item-details {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 4px;
}

.tss-cart-item-title-wrap {
    margin-bottom: 6px;
}

.tss-cart-item-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #0f0d1a !important;
    line-height: 1.55 !important; /* Elegant, readable luxury line-height */
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

a.tss-cart-item-title:hover {
    color: #444444 !important;
}

.tss-cart-item-price {
    font-family: 'Outfit', sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: #0f0d1a !important;
    margin: 0 0 10px 0 !important;
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1.2 !important;
}

.tss-price-mrp {
    font-size: 12.5px;
    font-weight: 500;
    color: #666666;
    letter-spacing: 0.3px;
}

.tss-cart-item-price .woocommerce-Price-amount {
    font-weight: 600;
    color: #0f0d1a;
}

/* Meta Row: Size Pill + Quantity Box + View Details */
.tss-cart-item-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Variation Badge (Size Pill) */
.tss-cart-item-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    background: #f4f4f6;
    color: #111111;
    font-size: 11.5px;
    font-weight: 500;
    padding: 0 9px;
    border-radius: 4px;
    border: 1px solid #e5e5e8;
    line-height: 1;
    box-sizing: border-box;
    margin: 0;
}

/* Quantity Box: [-] 1 [+] */
.tss-cart-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d4d4d8;
    border-radius: 4px;
    height: 28px;
    background: #ffffff;
    box-sizing: border-box;
    margin: 0;
}

.tss-qty-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    cursor: pointer;
    user-select: none;
    padding: 0;
    outline: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tss-qty-btn:hover {
    background-color: #f5f5f5;
    color: #000000;
}

.tss-qty-number {
    min-width: 22px;
    padding: 0 2px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0f0d1a;
    user-select: none;
}

/* View Details Toggle Link */
.tss-cart-item-toggle {
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 28px;
    gap: 3px;
    text-decoration: none;
    user-select: none;
    margin: 0;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.tss-cart-item-toggle:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

.tss-toggle-icon {
    transition: transform 0.2s ease;
}

.tss-cart-item-toggle.open .tss-toggle-icon {
    transform: rotate(180deg);
}

.tss-cart-item-more {
    display: none;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 8px;
    font-size: 11.5px;
    color: #555555;
    line-height: 1.5;
}

.tss-cart-item-more.open {
    display: block;
}

.tss-more-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.tss-more-row:last-child {
    margin-bottom: 0;
}

/* Right Actions Column (Wishlist Heart & Trash) */
.tss-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding-top: 2px;
    flex-shrink: 0;
}

.tss-cart-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8fa;
    border: 1px solid #eeeeef;
    border-radius: 50%;
    cursor: pointer;
    color: #222222;
    padding: 0;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    outline: none;
    box-sizing: border-box;
}

.tss-cart-icon-btn:hover {
    background: #eeeeee;
    border-color: #dcdce0;
    transform: scale(1.08);
}

/* Wishlist Heart States */
.tss-cart-wishlist-heart-btn {
    color: #333333;
}

.tss-cart-wishlist-heart-btn .tss-heart-filled {
    display: none;
}
.tss-cart-wishlist-heart-btn .tss-heart-outline {
    display: block;
}

.tss-cart-wishlist-heart-btn.active {
    color: #e02424;
    border-color: #ffd6d6;
    background: #fff5f5;
}
.tss-cart-wishlist-heart-btn.active .tss-heart-filled {
    display: block;
}
.tss-cart-wishlist-heart-btn.active .tss-heart-outline {
    display: none;
}

.tss-cart-wishlist-heart-btn:hover {
    color: #e02424;
    border-color: #ffd6d6;
    background: #fff5f5;
}

.tss-cart-wishlist-heart-btn.tss-animating {
    animation: tssHeartPop 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tssHeartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.tss-cart-trash-btn:hover {
    color: #e02424;
    border-color: #ffd6d6;
    background: #fff5f5;
}

/* 5. Sticky Footer */
.tss-cart-drawer-footer {
    padding: 18px 22px 24px 22px;
    border-top: 1px solid #eeeeee;
    background: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

/* Subtotal Row */
.tss-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tss-subtotal-text {
    font-family: 'Outfit', sans-serif !important;
    font-size: 16.5px !important;
    font-weight: 500 !important;
    color: #0f0d1a !important;
}

.tss-subtotal-amount {
    font-family: 'Outfit', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #0f0d1a !important;
}

/* Buttons */
.tss-cart-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px; /* Generous spacing below the two buttons */
}

.tss-cart-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: #000000;
    color: #ffffff;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.tss-cart-btn-checkout:hover {
    background: #222222;
    color: #ffffff;
    transform: translateY(-1px);
}

.tss-cart-btn-viewcart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: #ffffff;
    color: #000000;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    border-radius: 4px;
    border: 1.5px solid #000000;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.tss-cart-btn-viewcart:hover {
    background: #f7f7f7;
    color: #000000;
}

/* Policy Agreement Checkbox */
.tss-cart-policy-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #333333;
    margin-bottom: 18px; /* Generous breathing room before We Accept */
    cursor: pointer;
    user-select: none;
    text-align: center;
    line-height: 1.4;
}

.tss-cart-policy-checkbox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #000000;
    cursor: pointer;
}

/* Payment Badges "We Accept" Section */
.tss-cart-we-accept-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.tss-we-accept-label {
    font-size: 12.5px;
    font-weight: 500;
    color: #111111;
    margin-bottom: 10px;
    text-align: left;
}

.tss-payment-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.tss-payment-badges-row::-webkit-scrollbar {
    display: none;
}

/* Clean, Premium White Payment Badges */
.tss-pay-card {
    height: 30px;
    padding: 0 9px;
    border: 1px solid #e2e2e5;
    border-radius: 4px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    user-select: none;
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.tss-pay-card:hover {
    border-color: #bbbbbf;
    transform: translateY(-1px);
}

.tss-pay-upi-clean-text {
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    gap: 3px;
}

.tss-bhim-txt {
    color: #003366;
}

.tss-upi-txt {
    color: #008837;
}

/* 6. Header Cart Badge Styling */
.tss-header-cart-badge {
    position: absolute;
    top: -6px;
    right: -7px;
    background: #0f0d1a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tss-header-cart-badge.tss-bump {
    transform: scale(1.3);
}

/* 7. Header Cart Icon & Text Hover Pointer (Hand Cursor) */
[data-id="dac2a46"],
[data-id="dac2a46"] *,
[data-id="c47062e"],
[data-id="c47062e"] *,
[data-id="1f9e0de"],
[data-id="1f9e0de"] *,
[data-id="7c53872"],
[data-id="7c53872"] *,
.ast-header-woo-cart,
.ast-header-woo-cart *,
.ast-site-header-cart,
.ast-site-header-cart *,
.tss-header-cart-icon-wrap,
.tss-header-cart-icon-wrap *,
a.cart-contents,
a.cart-contents *,
a[href*="/cart"],
a[href*="/cart"] *,
a[href*="/cart/"],
a[href*="/cart/"] * {
    cursor: pointer !important;
}

[data-id="dac2a46"]:hover,
[data-id="1f9e0de"]:hover,
[data-id="7c53872"]:hover,
[data-id="c47062e"]:hover {
    opacity: 0.82;
    transition: opacity 0.15s ease;
}

/* 8. Mobile Adaptations */
@media (max-width: 480px) {
    .tss-cart-drawer {
        width: 100vw;
    }
    .tss-cart-drawer-header {
        padding: 14px 16px;
    }
    .tss-cart-drawer-body {
        padding: 4px 16px 14px 16px;
    }
    .tss-cart-drawer-footer {
        padding: 14px 16px 16px 16px;
    }
    .tss-cart-item-thumb {
        width: 68px;
        min-width: 68px;
        height: 92px;
    }
    .tss-cart-btn-checkout,
    .tss-cart-btn-viewcart {
        height: 44px;
        font-size: 13px;
    }
}
