/* ==========================================
   orders/static/orders/css/cart.css
   ========================================== */

.cart-section {
    padding: 60px 20px 100px;
    background: var(--light-gray);
    min-height: 70vh;
}

.page-title {
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--accent);
    text-align: center;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 25px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cart-item:hover {
    box-shadow: var(--shadow-lg);
}

.cart-item.unavailable {
    opacity: 0.6;
    border: 2px solid #ef4444;
}

.item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--light-gray);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 50px;
    opacity: 0.3;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--dark);
}

.item-variant {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 8px;
}

.item-variant span {
    display: inline-block;
}

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

.stock-warning {
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    margin-top: 5px;
}

/* Quantity Controls */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--light-gray);
    padding: 8px 15px;
    border-radius: 50px;
}

.quantity-form {
    display: inline;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    color: var(--dark);
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover:not(:disabled) {
    background: var(--accent);
    color: var(--white);
}

.qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-value {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.item-total {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent);
    min-width: 100px;
    text-align: right;
}

.remove-btn {
    padding: 10px;
    border-radius: 8px;
    color: #ef4444;
    transition: var(--transition);
}

.remove-btn:hover {
    background: #fee2e2;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 120px;
    background: var(--white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.cart-summary h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--dark);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
}

.summary-line.total {
    font-size: 20px;
    padding-top: 15px;
}

.summary-divider {
    height: 2px;
    background: var(--light-gray);
    margin: 20px 0;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--accent);
    color: var(--white);
    text-align: center;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin: 25px 0;
    transition: var(--transition);
}

.checkout-btn:hover:not([disabled]) {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 115, 85, 0.3);
}

.checkout-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.continue-shopping {
    display: block;
    text-align: center;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 25px;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid var(--light-gray);
}

.badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--gray);
}

.badge svg {
    color: var(--accent);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 30px;
}

.empty-cart h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--dark);
}

.empty-cart p {
    font-size: 16px;
    color: var(--gray);
    margin-bottom: 40px;
}

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

    .cart-summary {
        position: static;
    }
}

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

    .item-image {
        width: 80px;
        height: 80px;
        grid-row: 1 / 3;
    }

    .item-details {
        grid-column: 2;
    }

    .item-quantity {
        grid-column: 1 / 3;
        justify-content: center;
    }

    .item-total {
        grid-column: 1 / 3;
        text-align: center;
    }

    .remove-btn {
        grid-column: 1 / 3;
    }
}

.free-shipping-notice {
    background: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
}

.login-notice {
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    margin-top: 15px;
}

.login-notice a {
    color: var(--accent);
    font-weight: 600;
}

.login-notice a:hover {
    text-decoration: underline;
}

.alert-info a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}
