/* ══════════════════════════════════════════════════════════════
   AutoLogic Bangladesh — Luxury Slide-Out Cart Drawer & Social Proof
   Benchmarked against GetRSA & Luxury Automotive Standards
   ══════════════════════════════════════════════════════════════ */

/* ─── Slide-Out Cart Drawer Overlay ───────────────────────── */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── Drawer Container ────────────────────────────────────── */
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 440px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    box-shadow: -8px 0 36px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── Drawer Header ───────────────────────────────────────── */
.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.cart-drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.cart-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* ─── Free Delivery Progress Meter ────────────────────────── */
.cart-shipping-meter {
    padding: 0.85rem 1.4rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.meter-text {
    font-size: 0.78rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-weight: 500;
}

.meter-text strong {
    color: #1e293b;
    font-weight: 700;
}

.meter-text.unlocked {
    color: #047857;
    font-weight: 700;
}

.meter-track {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
    border-radius: 9999px;
    transition: width 0.45s ease-out, background 0.3s ease;
}

.meter-fill.unlocked {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* ─── Cart Items Container ────────────────────────────────── */
.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.4rem;
    -webkit-overflow-scrolling: touch;
}

/* Empty State */
.cart-drawer-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    border: 1.5px solid #dbeafe;
}

.cart-drawer-empty h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.cart-drawer-empty p {
    font-size: 0.85rem;
    color: #64748b;
    max-width: 280px;
    line-height: 1.45;
    margin-bottom: 1.5rem;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-shop-now:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Item Card in Drawer */
.cart-drawer-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cart-drawer-item:last-child {
    border-bottom: none;
}

.drawer-item-img {
    width: 62px;
    height: 62px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    object-fit: contain;
    padding: 4px;
    flex-shrink: 0;
}

.drawer-item-details {
    flex: 1;
    min-width: 0;
}

.drawer-item-brand {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2563eb;
    margin-bottom: 2px;
}

.drawer-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.drawer-item-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
}

/* Stepper & Remove */
.drawer-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.drawer-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.drawer-stepper-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.drawer-stepper-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.drawer-stepper-val {
    width: 26px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
}

.drawer-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 4px;
    transition: color 0.2s ease;
}

.drawer-item-remove:hover {
    color: #ef4444;
}

/* ─── Drawer Footer & Checkout Actions ────────────────────── */
.cart-drawer-footer {
    padding: 1.15rem 1.4rem 1.35rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
}

.cart-drawer-summary {
    margin-bottom: 1rem;
}

.summary-subtotal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.shipping-policy-note {
    font-size: 0.72rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.btn-drawer-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transition: all 0.25s ease;
}

.btn-drawer-checkout:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.5);
}

.btn-drawer-view-cart {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    padding: 0.35rem 0;
    transition: color 0.15s ease;
}

.btn-drawer-view-cart:hover {
    color: #2563eb;
}

/* ══════════════════════════════════════════════════════════════
   Verified Buyer Social Proof Toast (Luxury Minimalist)
   ══════════════════════════════════════════════════════════════ */
.social-proof-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9990;
    pointer-events: auto;
    animation: spSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sp-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.75rem 0.85rem;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    max-width: 350px;
    position: relative;
}

.sp-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sp-body {
    flex: 1;
    min-width: 0;
}

.sp-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2px;
}

.sp-buyer {
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.sp-item {
    font-size: 0.74rem;
    color: #475569;
    line-height: 1.25;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-time {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 500;
}

.sp-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 3px;
    transition: color 0.15s ease;
}

.sp-close:hover {
    color: #0f172a;
}

@media (max-width: 640px) {
    .social-proof-toast {
        bottom: 84px !important;
        left: 14px !important;
        right: 14px !important;
    }
    .sp-card {
        max-width: none !important;
        width: 100% !important;
    }
}
