/* ============================================================
   PREMAM SILKS — Cart Sidebar & Toast Styles
   ============================================================ */

/* ===== Toast Notifications ===== */
.cart-toast {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 10000;
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    padding: 14px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 360px;
}

.cart-toast.show {
    transform: translateX(0);
}

.cart-toast-success {
    border-left: 4px solid #25D366;
}

.cart-toast-error {
    border-left: 4px solid #e53e3e;
}

.cart-toast-info {
    border-left: 4px solid #8B1A2B;
}

.cart-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-family: var(--font-body, 'Montserrat', sans-serif);
}

.cart-toast-success .cart-toast-content svg {
    color: #25D366;
}

.cart-toast-error .cart-toast-content svg {
    color: #e53e3e;
}

.cart-toast-info .cart-toast-content svg {
    color: #8B1A2B;
}

/* ===== Cart Overlay ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ===== Cart Sidebar ===== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 90vw);
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.open {
    transform: translateX(0);
}

/* --- Header --- */
.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.cart-sidebar-header h3 {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.cart-header-count {
    font-size: 0.9rem;
    color: #888;
    font-weight: 400;
}

.cart-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #555;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cart-sidebar-close:hover {
    background: #f5f5f5;
    color: #1a1a2e;
}

/* --- Body --- */
.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* --- Empty State --- */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    flex: 1;
    color: #888;
}

.cart-empty svg {
    color: #ccc;
    margin-bottom: 20px;
}

.cart-empty h3 {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.5rem;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.cart-empty p {
    margin: 0 0 24px;
    font-size: 0.9rem;
}

/* --- Cart Items --- */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    animation: cartItemIn 0.3s ease;
}

@keyframes cartItemIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.cart-item-image {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f9f6f0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8B1A2B;
    font-weight: 600;
}

.cart-item-name {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #f5f5f5;
    border-color: #8B1A2B;
    color: #8B1A2B;
}

.qty-btn.minus {
    border-radius: 6px 0 0 6px;
}

.qty-btn.plus {
    border-radius: 0 6px 6px 0;
}

.qty-value {
    width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a2e;
}

.cart-item-remove {
    position: absolute;
    top: 16px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 4px;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #e53e3e;
}

/* --- Cart Summary --- */
.cart-summary {
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
    color: #555;
}

.cart-summary-row.cart-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    border-top: 1px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
}

.free-shipping {
    color: #25D366;
    font-weight: 600;
}

.cart-free-shipping-msg {
    font-size: 0.8rem;
    color: #8B1A2B;
    text-align: center;
    background: #fdf1f3;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.cart-checkout-btn {
    margin-top: 16px;
    padding: 14px 24px;
    font-size: 1rem;
}

.cart-continue-btn {
    margin-top: 8px;
    padding: 10px 24px;
    font-size: 0.85rem;
    background: none;
    border: 1px solid #ddd;
    color: #555;
}

.cart-continue-btn:hover {
    border-color: #8B1A2B;
    color: #8B1A2B;
}

.btn-outline {
    background: transparent;
    color: var(--color-text, #333);
    border: 1px solid #ddd;
}

.btn-outline:hover {
    border-color: var(--color-primary, #8B1A2B);
    color: var(--color-primary, #8B1A2B);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100vw;
        max-width: 100vw;
    }

    .cart-toast {
        left: 16px;
        right: 16px;
        bottom: 90px;
        max-width: none;
    }

    .cart-item-image {
        width: 64px;
        height: 80px;
    }
}