/* Cart Page Specific Styles */

.page-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 60px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.cart-section {
    padding: 60px 0;
    min-height: 60vh;
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 3rem;
}

.cart-items {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    width: 100px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.item-details {
    flex: 1;
    margin-right: 1rem;
}

.item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.item-category {
    font-size: 0.875rem;
    color: #6366f1;
    background: #f0f9ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.item-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #059669;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 50px;
    height: 35px;
    border: none;
    text-align: center;
    font-weight: 600;
    outline: none;
    background: white;
}

.remove-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #ef4444;
    background: white;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* Cart Summary */
.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.summary-row.total {
    border-top: 2px solid #e2e8f0;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.summary-label {
    color: #64748b;
}

.summary-value {
    font-weight: 600;
    color: #1e293b;
}

.discount-amount {
    color: #059669;
}

.checkout-btn {
    width: 100%;
    margin-top: 2rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.checkout-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.continue-shopping {
    width: 100%;
    margin-top: 1rem;
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.continue-shopping:hover {
    background: #6366f1;
    color: white;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-cart-icon {
    font-size: 5rem;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
}

.empty-cart h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1e293b;
}

.empty-cart p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Loading State */
.loading-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    flex-direction: column;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Coupon Section */
.coupon-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.coupon-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.coupon-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.coupon-input input:focus {
    border-color: #6366f1;
}

.apply-coupon-btn {
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    color: #6366f1;
    border: 2px solid #6366f1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.apply-coupon-btn:hover {
    background: #6366f1;
    color: white;
}

.applied-coupon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.coupon-code {
    font-weight: 600;
    color: #059669;
}

.remove-coupon {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Security Features */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.security-badge i {
    color: #059669;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr 350px;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 60px 0 40px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-summary {
        order: -1;
        position: static;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .item-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .item-controls {
        width: 100%;
        justify-content: space-between;
    }

    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .cart-items,
    .cart-summary {
        padding: 1.5rem;
    }

    .item-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .quantity-control {
        justify-content: center;
    }

    .coupon-input {
        flex-direction: column;
    }

    .empty-cart {
        padding: 3rem 1.5rem;
    }

    .empty-cart-icon {
        font-size: 4rem;
    }

    .empty-cart h2 {
        font-size: 1.5rem;
    }
}
