/* ==========================================================================
   🛍️ ULTRA-PREMIUM SIDE CART DRAWER & TOASTER STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- FLOATING TOASTER NOTIFICATION (Top Right) --- */
.toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast-card {
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15);
    animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-success .toast-icon { background: #dcfce7; color: #16a34a; }
.toast-error .toast-icon { background: #fee2e2; color: #dc2626; }
.toast-info .toast-icon { background: #e0f2fe; color: #0284c7; }

.toast-content {
    flex: 1;
}

.toast-msg {
    font-size: 0.8438rem;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.35;
}

.toast-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
}

/* --- SIDE CART BACKDROP & DRAWER --- */
.side-cart-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-cart-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.side-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(15, 23, 42, 0.15);
    z-index: 100000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-cart-backdrop.show .side-cart-drawer {
    transform: translateX(0);
}

.side-cart-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.side-cart-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.side-cart-title i {
    color: var(--primary-color, #2563eb);
}

.side-cart-badge {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
    font-size: 0.7188rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.side-cart-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.side-cart-close-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background-color: #fef2f2;
}

/* --- GAMIFIED SIDE CART OFFER PROGRESS BOX --- */
.side-cart-offer-box {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.875rem 1.25rem;
}

.offer-progress-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.offer-box-icon {
    color: #7c3aed;
    font-size: 0.9375rem;
}

.offer-progress-track {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.offer-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed 0%, #10b981 100%);
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.free-gift-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.side-cart-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- SIDE ITEM CARD STYLING --- */
.side-item-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.side-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.side-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-item-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.side-item-img i {
    font-size: 1.5rem;
    color: #94a3b8;
}

.side-item-details {
    flex: 1;
}

.side-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.side-item-price {
    font-size: 0.875rem;
    font-weight: 500 !important;
    color: var(--primary-color, #2563eb);
}

.side-item-qty-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

/* --- PREMIUM QUANTITY COUNTER IN SIDE CART --- */
.side-item-qty-row .premium-qty-counter {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 1px;
    gap: 1px;
    user-select: none;
}

.side-item-qty-row .qty-btn-minus, 
.side-item-qty-row .qty-btn-plus {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: none;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.65rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.15s ease;
}

.side-item-qty-row .qty-btn-minus:hover, 
.side-item-qty-row .qty-btn-plus:hover {
    background: var(--primary-color, #2563eb);
    color: #ffffff;
}

.side-item-qty-row .qty-btn-plus.is-phone-locked {
    background: #f1f5f9;
    color: #94a3b8;
    box-shadow: none;
    cursor: pointer;
}

.side-item-qty-row .qty-btn-plus.is-phone-locked:hover {
    background: #e2e8f0;
    color: #475569;
}

.side-item-qty-row .qty-val-display {
    min-width: 18px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
}

.side-item-qty-row .qty-type-label {
    font-size: 0.625rem;
    color: #64748b;
    font-weight: 400;
    padding-right: 2px;
}

.side-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.side-item-remove:hover { color: #ef4444; }

/* --- EMPTY STATE & LOADING SPINNER --- */
.side-cart-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.side-cart-empty i { font-size: 2.75rem; color: #cbd5e1; }
.side-cart-empty p { font-size: 0.875rem; font-weight: 400; }

.side-cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    gap: 0.75rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
}

.side-cart-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary-color, #2563eb);
    border-radius: 50%;
    animation: sideSpinner 0.8s linear infinite;
}

@keyframes sideSpinner {
    to { transform: rotate(360deg); }
}

/* --- FOOTER & ACTIONS --- */
.side-cart-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.side-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.side-cart-subtotal-val {
    font-weight: 600 !important;
    color: #0f172a;
}

.side-cart-note {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 400;
    margin-bottom: 1rem;
}

.side-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-side-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 46px;
    background: #16a34a;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
    transition: background 0.2s ease;
}

.btn-side-checkout:hover {
    background: #15803d;
}

.btn-side-view-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 42px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-side-view-cart:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* --- CLEAR CART BUTTON IN SIDE CART --- */
.btn-side-clear-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    height: 38px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.7813rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-top: 0.25rem;
}

.btn-side-clear-cart:hover {
    color: #ef4444;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .side-cart-drawer {
        max-width: 100%;
    }
}