@charset "UTF-8";

/* ================================================
   RESET & ROOT
================================================ */
:root {
    --primary: #0A3C6B;
    --primary-dark: #072d50;
    --accent: #ff3b30;
    --gold: #f59e0b;
    --green: #22c55e;
    --green-dark: #16a34a;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 4px 16px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.10);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.13);
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }

.container {
    max-width: 1300px;
    margin: auto;
    padding: 0 20px;
}

h1,h2,h3,h4 {
    color: #fff;
}

/* --- Badge on Main Header Button --- */
.cart-badge-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e63946;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* --- Backdrop overlay --- */
.premium-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.premium-cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- Side Drawer Panel --- */
.premium-cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateX(0);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.premium-cart-sidebar.active {
    transform: translateX(-420px);
}

/* --- Header Section --- */
.cart-sidebar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}
.header-left h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}
.items-count-indicator {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.close-sidebar-btn {
    background: #f8fafc;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.close-sidebar-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* --- Body Section --- */
.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* --- Empty Cart State --- */
.empty-cart-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 16px;
}
.empty-cart-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}
.empty-cart-state h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.empty-cart-state p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 28px;
    line-height: 1.5;
}
.continue-exploring-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.continue-exploring-btn:hover {
    background: #334155;
    transform: translateY(-1px);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- Cart Items Rows --- */
.premium-cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cart-item-row {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}
.cart-item-img-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cart-item-model {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 2px;
}
.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-spec {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}
.cart-item-spec span {
    font-weight: 600;
    color: #334155;
}
.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.cart-item-qty {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}
.cart-item-pricing {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cart-item-pricing .old-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #94a3b8;
}
.cart-item-pricing .current-price {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.cart-item-pricing .special-active {
    color: #e63946;
}

/* --- Sticky Footer Section --- */
.cart-sidebar-footer {
    padding: 24px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}
.subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.subtotal-row span:first-child {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}
.subtotal-amount {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}
.shipping-notice {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 16px 0;
}
.checkout-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0f172a;
    color: #ffffff !important;
    text-decoration: none !important;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.checkout-btn-primary:hover {
    background: #1e293b;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}
.view-cart-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-top: 12px;
    transition: color 0.2s ease;
}
.view-cart-link:hover {
    color: #0f172a;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .premium-cart-sidebar {
        right: -100%;
        max-width: 100%;
    }
    .premium-cart-sidebar.active {
        transform: translateX(-100%);
    }
}