/* ================================================
   AllWayShalom - Cart Page Styles
   ================================================ */

.cart-page {
    padding: 40px 0 80px;
    min-height: calc(100vh - var(--header-height));
}

.cart-page .page-title {
    font-size: 2rem;
    margin-bottom: 32px;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Cart Items */
.cart-items {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-lightbeige);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--brand-dark);
}

.cart-item-title a {
    color: inherit;
}

.cart-item-title a:hover {
    color: var(--accent-green);
}

.cart-item-price {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-lightbeige);
    color: var(--brand-dark);
    font-size: 1.25rem;
    font-weight: 500;
    transition: all var(--transition);
}

.quantity-btn:hover {
    background: var(--brand-dark);
    color: var(--bg-white);
}

.quantity-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-dark);
}

.quantity-input:focus {
    outline: none;
}

.remove-btn {
    color: var(--text-muted);
    padding: 8px;
    transition: color var(--transition);
}

.remove-btn:hover {
    color: var(--error);
}

/* Item Total */
.cart-item-total {
    text-align: right;
}

.cart-item-total .total-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.cart-item-total .total-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.summary-row.total {
    border-top: 2px solid var(--border-light);
    margin-top: 12px;
    padding-top: 20px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
}

.cart-summary .btn {
    margin-top: 16px;
}

.cart-summary .btn-outline {
    margin-top: 12px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart svg {
    color: var(--text-light);
    margin-bottom: 24px;
}

.empty-cart h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--brand-dark);
}

.empty-cart p {
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 16px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-total {
        grid-column: 1 / -1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px dashed var(--border-light);
    }

    .cart-item-total .total-label {
        display: inline;
        margin-bottom: 0;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .cart-page .page-title {
        font-size: 1.5rem;
    }

    .cart-item {
        padding: 16px;
    }

    .cart-item-actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
    }

    .quantity-input {
        width: 40px;
        height: 32px;
    }
}
