/* Cart Page Styles */

:root {
    --cart-bg: #f8fafc;
    --cart-card: #f8fafc;
    --cart-ink: #0f172a;
    --cart-muted: #64748b;
    --cart-line: #e2e8f0;
    --cart-brand: #4f46e5;
    --cart-brand-strong: #4338ca;
    --cart-danger: #ef4444;
}

body {
    background:
        radial-gradient(circle at 8% 12%, #f8fafc 0%, transparent 32%),
        radial-gradient(circle at 92% 18%, #f1f5f9 0%, transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, var(--cart-bg) 100%);
}

.header {
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--cart-line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.cart-container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 36px 20px 56px;
}

.cart-content {
    width: 100%;
}

.cart-header {
    text-align: left;
    margin-bottom: 22px;
    padding: 0 4px;
}

.cart-header h1 {
    font-size: 34px;
    line-height: 1.1;
    color: var(--cart-ink);
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.cart-header p {
    font-size: 15px;
    color: var(--cart-muted);
}

.cart-items-section {
    width: 100%;
    background: var(--cart-card);
    border: 1px solid var(--cart-line);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.cart-items {
    display: flex;
    flex-direction: column;
}

.empty-cart-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 84px 34px;
    text-align: center;
}

.empty-cart-message i {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 36px;
    color: var(--cart-brand);
    background: linear-gradient(145deg, #f8fafc, #e0e7ff);
    margin-bottom: 18px;
}

.empty-cart-message h2 {
    font-size: 30px;
    color: var(--cart-ink);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.empty-cart-message p {
    max-width: 520px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--cart-muted);
    margin-bottom: 28px;
}

.cart-item {
    display: grid;
    grid-template-columns: 118px 1fr 132px 130px 56px;
    gap: 18px;
    padding: 20px 24px;
    border-bottom: 1px solid #f8fafc;
    align-items: center;
}

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

.cart-item-image {
    width: 118px;
    height: 118px;
    object-fit: cover;
    border-radius: 14px;
    background-color: #f8fafc;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

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

.cart-item-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--cart-ink);
    text-decoration: none;
    transition: color 0.25s ease;
}

.cart-item-name:hover {
    color: var(--cart-brand);
}

.cart-item-brand {
    font-size: 13px;
    color: #64748b;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--cart-brand-strong);
}

.cart-item-stock {
    font-size: 13px;
    font-weight: 600;
    color: var(--cart-muted);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    background-color: #f8fafc;
    padding: 4px;
}

.quantity-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 9px;
    background-color: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    transition: all 0.25s ease;
}

.quantity-btn:hover {
    background-color: var(--cart-brand);
    color: #f8fafc;
}

.quantity-btn:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.5;
}

.quantity-input {
    width: 44px;
    height: 34px;
    text-align: center;
    border: none;
    background-color: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--cart-ink);
}

.quantity-input:focus {
    outline: none;
}

.item-total-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--cart-ink);
    text-align: right;
}

.remove-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #fee2e2;
    background-color: #fff3f2;
    color: var(--cart-danger);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background-color: var(--cart-danger);
    color: #fff;
    border-color: var(--cart-danger);
}

.continue-shopping-btn,
.continue-shopping-link,
.checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.continue-shopping-btn {
    padding: 12px 22px;
    background: linear-gradient(135deg, #4f46e5, #4f46e5);
    color: #fff;
    border: 1px solid transparent;
}

.continue-shopping-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(79, 70, 229, 0.25);
}

.cart-footer {
    margin-top: 24px;
    background-color: #f8fafc;
    border: 1px solid var(--cart-line);
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.06);
    padding: 24px;
}

.cart-total-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e0e7ff;
}

.total-label {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--cart-muted);
}

.total-amount {
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    color: var(--cart-brand-strong);
}

.cart-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.continue-shopping-link {
    padding: 11px 20px;
    border: 1px solid #e0e7ff;
    background-color: #f8fafc;
    color: #0f172a;
}

.continue-shopping-link:hover {
    background-color: #f8fafc;
}

.checkout-button {
    padding: 11px 24px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #4f46e5, #4f46e5);
    color: #f8fafc;
    cursor: pointer;
}

.checkout-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(79, 70, 229, 0.2);
}

@media (max-width: 900px) {
    .cart-item {
        grid-template-columns: 102px 1fr;
        gap: 14px;
        padding: 18px;
    }

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

    .cart-item-quantity,
    .cart-item-total,
    .remove-btn {
        grid-column: span 2;
        width: 100%;
    }

    .cart-item-quantity {
        justify-content: flex-start;
    }

    .cart-item-total {
        text-align: left;
    }

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

    .continue-shopping-link,
    .checkout-button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .cart-container {
        padding: 24px 12px 42px;
    }

    .cart-header h1 {
        font-size: 28px;
    }

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

    .cart-item-image {
        width: 100%;
        height: 170px;
    }

    .cart-item-quantity,
    .cart-item-total,
    .remove-btn {
        grid-column: span 1;
    }

    .cart-total-section {
        justify-content: space-between;
    }

    .total-label {
        font-size: 13px;
    }

    .total-amount {
        font-size: 24px;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.cart-item,
.cart-footer,
.empty-cart-message {
    animation: slideIn 0.28s ease-out;
}











