/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.payment-modal.show {
    opacity: 1;
    visibility: visible;
}

.payment-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.payment-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    z-index: 1;
}

.payment-close:hover { 
    color: #1a365d; 
}

.payment-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.payment-header h2 {
    color: #1a365d;
    margin: 0 0 10px;
    font-size: 24px;
}

.payment-header p {
    color: #64748b;
    margin: 0;
}

.payment-summary {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #1a365d;
}

.payment-item:last-child { 
    margin-bottom: 0; 
}

.payment-total {
    font-weight: bold;
    font-size: 18px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 12px;
}

.payment-form { 
    padding: 30px; 
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #1a365d;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #1a365d;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #d4af37;
}

.stripe-element {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.stripe-element:focus-within { 
    border-color: #d4af37; 
}

.payment-error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 8px;
}

.payment-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #1a365d;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.payment-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.payment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.payment-success {
    padding: 40px 30px;
    text-align: center;
}

.payment-success i {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 20px;
}

.payment-success h2 {
    color: #1a365d;
    margin-bottom: 15px;
}

.payment-success p {
    color: #64748b;
    margin-bottom: 15px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Quantity Selector Improvements */
.quantity-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.quantity-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #d4af37;
    background: transparent;
    color: #d4af37;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover:not(:disabled) {
    background: #d4af37;
    color: #1a365d;
    transform: scale(1.05);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 80px;
    height: 45px;
    text-align: center;
    border: 2px solid #d4af37;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #1a365d;
    background: white;
}

.quantity-input:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.quantity-savings {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-display {
    text-align: center;
    margin: 1.5rem 0;
}

.unit-price {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.discount-info {
    margin-top: 0.5rem;
}

.discount-amount {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}