/* Cart page — layout and chrome aligned with salehoo.global/cart.php */

.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 15px 40px;
}

.cart-page .page-title {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
    font-weight: 700;
}

/* Empty cart */
.cart-page .empty-cart {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cart-page .empty-cart p {
    margin-bottom: 20px;
    color: #666;
}

.cart-page .empty-cart .continue-shopping {
    display: inline-block;
    background-color: #4caf50;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.cart-page .empty-cart .continue-shopping:hover {
    background-color: #45a049;
}

/* Two-column grid (items + summary) */
.cart-page .cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.cart-page .cart-items {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #eee;
}

.cart-page .cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 0 16px;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: start;
}

.cart-page .cart-item:last-child {
    border-bottom: none;
}

.cart-page .cart-item .item-image {
    width: 100px;
    height: 100px;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-page .cart-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-page .cart-item .item-details {
    padding-right: 12px;
    min-width: 0;
}

.cart-page .cart-item .item-name {
    font-size: 16px;
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.35;
}

.cart-page .cart-item .item-name a {
    color: #333;
    text-decoration: none;
}

.cart-page .cart-item .item-name a:hover {
    color: var(--sh-accent);
}

.cart-page .cart-item .item-price {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.cart-page .cart-item .item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0;
    min-width: 120px;
}

.cart-page .quantity-control {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.cart-page .quantity-btn {
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-page .quantity-btn:hover {
    background: #e9ecef;
}

.cart-page .quantity-input {
    width: 44px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

.cart-page .item-subtotal {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.cart-page .cart-remove-form {
    margin: 0;
    padding: 0;
    align-self: flex-end;
}

.cart-page .remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-page .remove-btn:hover {
    color: #bd2130;
}

/* Summary card */
.cart-page .cart-summary {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    position: sticky;
    top: 110px;
}

.cart-page .cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.cart-page .cart-summary .summary-row.total {
    font-weight: 700;
    font-size: 18px;
    border-bottom: none;
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1px solid #ddd;
}

.cart-page .cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.cart-page .cart-actions .cart-clear-form {
    width: 100%;
    margin: 0;
}

/* Stacked CTAs — primary blue, secondary outline, danger clear */
.cart-page .cart-actions .btn,
.cart-page .cart-actions button.btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
    font-family: inherit;
    line-height: 1.2;
}

.cart-page .cart-actions .checkout-btn {
    background-color: var(--sh-accent);
    color: #fff;
    border-color: var(--sh-accent);
}

.cart-page .cart-actions .checkout-btn:hover {
    background-color: #0069d9;
    border-color: #0069d9;
    color: #fff;
}

.cart-page .cart-actions .continue-shopping {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.cart-page .cart-actions .continue-shopping:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    color: #333;
}

.cart-page .cart-actions .clear-cart {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.cart-page .cart-actions .clear-cart:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
}

@media (max-width: 992px) {
    .cart-page .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-page .cart-summary {
        position: static;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding-top: 100px;
    }
}

@media (max-width: 576px) {
    .cart-page {
        padding: 80px 10px 32px;
    }

    .cart-page .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-page .cart-item .item-image {
        width: 70px;
        height: 70px;
    }

    .cart-page .cart-item .item-controls {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-width: 0;
        margin-top: 12px;
    }

    .cart-page .cart-item .item-subtotal {
        margin-bottom: 0;
    }

    .cart-page .cart-item .cart-remove-form {
        align-self: center;
    }
}
