/* 
 * Moda - Cart Styles
 */

.cart-section {
    padding: 100px 0 80px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 280px 40px;
    align-items: center;
    gap: 30px;
    padding: 25px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.cart-item__image {
    width: 100px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__name {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 1.1rem;
}

.cart-item__variants {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 5px;
}

.cart-item__variant {
    margin-right: 15px;
}

.cart-item__price {
    font-weight: 600;
}

.cart-item__quantity {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 40px;
}

.cart-item__quantity-controls {
    display: flex;
    align-items: center;
    background: var(--color-bg-gray);
    border-radius: 12px;
    padding: 5px;
    flex-shrink: 0;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--color-primary);
    color: white;
}

.qty-value {
    margin: 0 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item__total {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-primary);
    text-align: right;
    min-width: 100px;
}

.cart-item__remove {
    border: none;
    background: none;
    color: #ff4d4d;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

.cart-item__remove:hover {
    background: #fff0f0;
}

.cart-item__remove svg {
    pointer-events: none;
}

.qty-btn svg,
.qty-btn * {
    pointer-events: none;
}

/* Summary Card */
.cart-summary__card {
    background: white;
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.cart-summary__title {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.cart-summary__row--muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.cart-summary__row--total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 20px 0;
}

.cart-summary__divider {
    height: 1px;
    background: #f0f0f0;
    margin: 20px 0;
}

.cart-summary__btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.cart-summary__btns .btn {
    width: 100%;
    padding: 12px 15px;
    font-size: 0.9rem;
    white-space: normal;
    text-align: center;
}

.empty-state--large {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    gap: 15px;
}

/* Badge Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.cart-badge.pulse {
    animation: pulse 0.3s ease;
}

/* Notification Toast */
#notification-container {
    position: fixed;
    /* top: 100px; */
    bottom: 100px;
    /* right: 20px; */
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 10px 20px; 
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--color-primary);
    font-weight: 600;
    transform: translateX(120%);
    animation: toast-in 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid var(--color-accent);
}

.toast--error {
    border-left-color: #ff4d4d;
}

@keyframes toast-in {
    to {
        transform: translateX(0);
    }
}

.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto auto;
        gap: 12px;
        padding: 15px;
        position: relative;
        align-items: start;
    }

    .cart-item__image {
        grid-row: span 3;
        width: 100px;
        height: 120px;
        border-radius: 12px;
    }

    .cart-item__details {
        grid-column: 2;
        padding-right: 25px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .cart-item__name {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    /* Row 1: Price, Color, Size */
    .cart-item__variants {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        margin: 0;
        font-size: 0.8rem;
    }

    .cart-item__price {
        font-weight: 600;
        color: var(--color-primary);
    }

    /* Wrap Quantity and Total in a row */
    .cart-item__quantity {
        grid-column: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-top: 5px;
        gap: 15px;
        background: none;
        padding: 0;
    }

    /* Grouping Quantity Controls and Total */
    .cart-item__quantity-controls {
        display: flex;
        align-items: center;
        background: #f8f8f8;
        padding: 3px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    /* We need to adjust the HTML slightly or use CSS tricks for the Total */
    .cart-item__total {
        display: block;
        flex: 1;
        text-align: right;
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
    }

    .cart-item__remove {
        position: absolute;
        top: 15px;
        right: 15px;
        padding: 5px;
        z-index: 5;
    }
}