/* Credit Card Details Styles */
.credit-card-details {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Stripe Elements Styles */
.stripe-card-element {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.stripe-card-element:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.stripe-card-errors {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 8px;
    min-height: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.security-notice {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.security-icon {
    font-size: 1.2rem;
    margin-right: 10px;
}

.security-notice p {
    margin: 0;
    color: #155724;
    font-size: 0.9rem;
}

.terms-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.terms-checkbox label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

.terms-checkbox a {
    color: #007bff;
    text-decoration: underline;
}

.terms-checkbox a:hover {
    color: #0056b3;
}

/* Additional styles for dynamic cart loading */
.cart-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.empty-cart-message, .cart-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-cart-icon, .error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.btn-continue-shopping {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.btn-continue-shopping:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.item-image {
    position: relative;
    margin-right: 15px;
    flex-shrink: 0;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.quantity-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.item-details {
    flex: 1;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.item-quantity {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.item-price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .payment-page-wrapper {
        padding: 10px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .payment-layout {
        display: block;
        gap: 0;
    }
    
    .payment-form-section {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .order-summary-section {
        width: 100%;
        margin-top: 20px;
    }
    
    .payment-page-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .form-section {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .form-row {
        display: block;
    }
    
    .form-group {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .form-control {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .payment-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .payment-option {
        margin-bottom: 10px;
    }
    
    .payment-label {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .btn-submit-payment {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
        margin-top: 20px;
    }
    
    /* Cart items mobile */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .item-image {
        margin-right: 0;
        margin-bottom: 10px;
        align-self: center;
    }
    
    .product-image {
        width: 80px;
        height: 80px;
    }
    
    .item-details {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .item-name {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .item-quantity {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .item-price {
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
    }
    
    /* Cost summary mobile */
    .cost-summary {
        margin-top: 20px;
    }
    
    .summary-row {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    
    .total-row {
        font-size: 1.1rem;
        font-weight: bold;
        border-top: 2px solid #e9ecef;
        margin-top: 10px;
        padding-top: 15px;
    }
    
    /* Coupon section mobile */
    .coupon-section {
        margin: 20px 0;
    }
    
    .coupon-input-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .coupon-input {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .coupon-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .payment-page-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .form-control {
        padding: 10px 12px;
    }
    
    .payment-label {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .btn-submit-payment {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
    }
    
    .item-name {
        font-size: 0.8rem;
    }
    
    .item-quantity {
        font-size: 0.75rem;
    }
    
    .item-price {
        font-size: 1rem;
    }
}

