/* Checkout Page Styles */
.checkout-section {
    padding: 40px 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.checkout-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.page-title {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: bold;
}

.checkout-container {
    display: flex;
    justify-content: center;
    align-items: start;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

/* Checkout Form Styles */
.checkout-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

.checkout-form h3 {
    color: #b5639f;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    direction: rtl;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #b5639f;
    box-shadow: 0 0 0 3px rgba(181, 99, 159, 0.1);
}

.form-group input:invalid {
    border-color: #e74c3c;
}

.form-group input:valid {
    border-color: #27ae60;
}

/* Payment Methods */
.payment-methods {
    margin: 25px 0;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-method:hover {
    border-color: #b5639f;
    background-color: #f8f9fa;
}

.payment-method input[type="radio"] {
    margin-left: 10px;
    width: auto;
    accent-color: #b5639f;
}

.payment-method label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-method label i {
    color: #b5639f;
    font-size: 1.1rem;
}

.payment-method input[type="radio"]:checked + label {
    color: #b5639f;
    font-weight: 600;
}

/* Place Order Button */
.place-order-btn {
    width: 100%;
    background: linear-gradient(135deg, #b5639f, #a0548c);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.place-order-btn i {
    font-size: 1.2rem;
}

.place-order-btn:hover {
    background: linear-gradient(135deg, #a0548c, #8b4a7a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181, 99, 159, 0.3);
}

.place-order-btn:active {
    transform: translateY(0);
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    height: fit-content;
    width: 350px;
    flex-shrink: 0;
}

.order-summary h3 {
    color: #b5639f;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

#checkout-items {
    margin-bottom: 20px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.item-details {
    font-size: 0.9rem;
    color: #666;
}

.item-price {
    font-weight: 600;
    color: #b5639f;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: bold;
    color: #b5639f;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
    padding-top: 15px;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .checkout-section {
        padding: 20px 0;
    }
    
    .checkout-container {
        flex-direction: column;
        gap: 20px;
        padding: 0;
        max-width: 100%;
    }
    
    .order-summary {
        position: static;
        order: -1; /* Show summary first on mobile */
        margin-bottom: 20px;
        width: 100%;
    }
    
    .checkout-form {
        width: 100%;
        max-width: 100%;
    }
    
    .checkout-form,
    .order-summary {
        padding: 20px;
        margin: 0 10px;
        border-radius: 12px;
    }
    
    .page-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .checkout-form h3,
    .order-summary h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .checkout-section {
        padding: 15px 0;
        background-color: #f8f9fa;
    }
    
    .checkout-section .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    .checkout-container {
        gap: 15px;
    }
    
    .checkout-form,
    .order-summary {
        padding: 15px;
        margin: 0 5px;
        border-radius: 10px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .page-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
        padding: 0 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .place-order-btn {
        padding: 14px 25px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .payment-method {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .checkout-form h3,
    .order-summary h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .checkout-section {
        padding: 10px 0;
    }
    
    .checkout-section .container {
        padding: 0 5px;
    }
    
    .checkout-form,
    .order-summary {
        padding: 12px;
        margin: 0 2px;
        border-radius: 8px;
    }
    
    .page-title {
        font-size: 1.4rem;
        margin-bottom: 12px;
        padding: 0 10px;
    }
    
    .checkout-form h3,
    .order-summary h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .payment-method {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .payment-method label {
        font-size: 0.9rem;
    }
    
    .place-order-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 0;
    }
    
    .item-name {
        font-size: 0.9rem;
    }
    
    .item-details {
        font-size: 0.8rem;
    }
    
    .item-price {
        align-self: flex-end;
        font-size: 0.9rem;
    }
    
    .summary-row {
        padding: 8px 0;
        font-size: 0.9rem;
    }
    
    .summary-row.total {
        font-size: 1.1rem;
        padding-top: 12px;
        margin-top: 12px;
    }
}

/* Loading and Success States */
.place-order-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.place-order-btn.loading {
    position: relative;
    color: transparent;
}

.place-order-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Form Validation Styles */
.form-group.error input,
.form-group.error select {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-group.success input,
.form-group.success select {
    border-color: #27ae60;
    background-color: #f2fdf2;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Enhanced Visual Elements */
.checkout-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b5639f, #a0548c);
    border-radius: 12px 12px 0 0;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b5639f, #a0548c);
    border-radius: 12px 12px 0 0;
}

.checkout-form,
.order-summary {
    position: relative;
    overflow: hidden;
}

/* Mobile-specific improvements */
@media (max-width: 991px) {
    body {
        padding-top: 60px; /* Account for mobile header */
    }
    
    .checkout-form::before,
    .order-summary::before {
        height: 3px;
    }
}

/* Ensure proper mobile viewport */
@media (max-width: 768px) {
    * {
        box-sizing: border-box;
    }
    
    .checkout-container {
        width: 100%;
        overflow-x: hidden;
    }
    
    .form-row {
        width: 100%;
    }
    
    .form-group {
        width: 100%;
    }
} 