/* Cart Page */
.cart-page {
    padding: 40px 0 60px;
    background: #fafafa;
    min-height: 60vh;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
}

.empty-cart svg {
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-cart p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

/* Cart Items */
.cart-items {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 60px;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    text-transform: uppercase;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1fr 60px;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

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

.item-product {
    display: flex;
    gap: 15px;
}

.item-product .product-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-product .placeholder-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-color);
    line-height: 1.4;
}

.product-sku {
    font-size: 13px;
    color: var(--text-light);
}

.item-price .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* Quantity Selector */
.item-quantity .quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.item-quantity .qty-btn {
    width: 40px;
    height: 45px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s;
}

.item-quantity .qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.item-quantity .qty-input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    outline: none;
}

.item-total .total-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.btn-remove {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fee;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: var(--accent-color);
}

.btn-remove:hover svg {
    color: white;
}

.btn-remove svg {
    color: var(--accent-color);
    transition: color 0.3s;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-color);
}

.summary-row span:last-child {
    font-weight: 600;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    margin-top: 20px;
}

.summary-row.total .total-amount {
    color: var(--accent-color);
    font-size: 24px;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* Coupon Section */
.coupon-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.coupon-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.coupon-input {
    display: flex;
    gap: 10px;
}

.coupon-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.coupon-input input:focus {
    border-color: var(--primary-color);
}

.btn-apply {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-apply:hover {
    background: var(--secondary-color);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Trust Badges */
.trust-badges {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.badge-item:last-child {
    margin-bottom: 0;
}

.badge-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr 350px;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .item-product {
        flex-direction: column;
    }

    .item-product .product-image {
        width: 100%;
        height: 200px;
    }

    .item-price,
    .item-quantity,
    .item-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .item-price::before,
    .item-quantity::before,
    .item-total::before {
        font-weight: 600;
        font-size: 14px;
        color: var(--text-color);
        text-transform: uppercase;
    }

    .item-price::before {
        content: 'Đơn giá:';
    }

    .item-quantity::before {
        content: 'Số lượng:';
    }

    .item-total::before {
        content: 'Thành tiền:';
    }

    .item-remove {
        text-align: center;
    }

    .cart-actions {
        flex-direction: column;
    }

    .cart-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }

    .cart-items,
    .cart-summary {
        padding: 20px;
    }

    .item-product .product-image {
        height: 150px;
    }
}
