/* ===== Checkout Page Professional Styles ===== */

.checkout-page {
    width: 100%;
    background: var(--bg-primary);
    min-height: 60vh;
}

/* Empty Cart */
.empty-cart-state {
    padding: 80px 0;
    text-align: center;
}

.empty-cart-content {
    max-width: 500px;
    margin: 0 auto;
}

.empty-cart-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--neutral-300);
    box-shadow: var(--shadow-sm);
}

.empty-cart-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--neutral-800);
    margin-bottom: 12px;
}

.empty-cart-content p {
    color: var(--neutral-500);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Checkout Hero */
.checkout-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--secondary));
    padding: 50px 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.checkout-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: 50%;
}

.checkout-hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 8px;
    position: relative;
}

.checkout-hero p {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    position: relative;
}

/* Checkout Section */
.checkout-section {
    padding: 40px 0 60px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-100);
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid var(--neutral-100);
    background: white;
}

.cart-header h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

/* Cart Items List */
.cart-items-list {
    padding: 0;
}

.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 28px;
    border-bottom: 1px solid var(--neutral-50);
    align-items: center;
    transition: background 0.2s ease;
}

.cart-item:hover {
    background: var(--neutral-50);
}

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

.cart-item-image {
    width: 110px;
    height: 110px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid var(--neutral-100);
}

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

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--neutral-800);
    margin-bottom: 4px;
    cursor: pointer;
}

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

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-label-small {
    font-size: 0.8rem;
    color: var(--neutral-500);
    font-weight: 500;
}

.qty-controls-small {
    display: flex;
    align-items: center;
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.qty-btn-small {
    width: 32px;
    height: 32px;
    background: var(--neutral-50);
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--neutral-600);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.qty-input-small {
    width: 45px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--neutral-200);
    border-right: 2px solid var(--neutral-200);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--neutral-800);
    background: white;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input-small::-webkit-outer-spin-button,
.qty-input-small::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input-small:focus {
    background: var(--bg-primary);
}

/* Cart Item Total */
.cart-item-total {
    text-align: right;
    min-width: 100px;
}

.item-total-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    transition: all 0.2s ease;
    display: block;
    margin-left: auto;
    margin-top: 6px;
}

.remove-item-btn:hover {
    color: var(--error);
    transform: scale(1.2);
}

/* Cart Actions */
.cart-actions-bottom {
    padding: 16px 28px;
    border-top: 1px solid var(--neutral-100);
}

/* Checkout Sidebar */
.checkout-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 30px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Order Summary Card */
.order-summary-card {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-100);
}

.order-summary-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-100);
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--neutral-600);
}

.summary-row.total-row {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--neutral-900);
    padding-top: 14px;
    border-top: 2px solid var(--neutral-100);
    margin-top: 4px;
}

.discount-text {
    color: var(--success);
    font-weight: 600;
}

.free-shipping-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--success-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--success);
    font-weight: 600;
}

.free-shipping-info i {
    font-size: 1rem;
}

/* Shipping Form Card */
.shipping-form-card {
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-100);
}

.shipping-form-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--neutral-100);
}

.checkout-form .form-group {
    margin-bottom: 16px;
}

.checkout-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--neutral-700);
}

.required {
    color: var(--error);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
    transition: color 0.3s ease;
}

.textarea-wrapper i {
    top: 14px;
    transform: none;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: var(--neutral-50);
    border: 2px solid var(--neutral-100);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    color: var(--neutral-800);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(142, 11, 65, 0.06);
}

.input-icon-wrapper:focus-within i {
    color: var(--primary);
}

.form-input::placeholder {
    color: var(--neutral-400);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    padding-top: 12px;
}

.place-order-btn {
    margin-top: 8px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.place-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(142, 11, 65, 0.35);
}

/* Checkout Features */
.checkout-features {
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-100);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.checkout-feature i {
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 380px;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .checkout-hero {
        padding: 40px 0;
    }
    
    .checkout-hero h1 {
        font-size: 2rem;
    }
    
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .checkout-sidebar {
        position: static;
        order: -1;
    }
    
    .cart-item {
        padding: 16px 20px;
        gap: 14px;
        flex-wrap: wrap;
    }
    
    .cart-item-image {
        width: 90px;
        height: 90px;
    }
    
    .cart-item-total {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        border-top: 1px solid var(--neutral-50);
    }
    
    .cart-header {
        padding: 16px 20px;
    }
    
    .cart-actions-bottom {
        padding: 12px 20px;
    }
    
    .order-summary-card,
    .shipping-form-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .checkout-hero {
        padding: 30px 0;
    }
    
    .checkout-hero h1 {
        font-size: 1.6rem;
    }
    
    .checkout-section {
        padding: 20px 0 40px;
    }
    
    .cart-item {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 75px;
        height: 75px;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 0.85rem;
    }
    
    .item-total-price {
        font-size: 1rem;
    }
    
    .cart-header {
        padding: 14px 16px;
    }
    
    .cart-header h2 {
        font-size: 1.2rem;
    }
    
    .cart-actions-bottom {
        padding: 10px 16px;
    }
    
    .order-summary-card,
    .shipping-form-card {
        padding: 16px;
    }
    
    .form-input {
        padding: 10px 14px 10px 36px;
        font-size: 0.85rem;
    }
    
    .checkout-features {
        gap: 8px;
    }
    
    .checkout-feature {
        font-size: 0.78rem;
    }
}