/* Checkout Styles */

/* Checkout Container */
.checkout-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #f8fafc 50%, var(--bg-secondary) 100%);
    padding: 2rem 0 4rem;
    position: relative;
}

.checkout-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KPGcgZmlsbD0iIzA4OTFiMiIgZmlsbC1vcGFjaXR5PSIwLjAzIj4KPHBhdGggZD0iTTM2IDM0djEwaDEwVjM0SDM2ek0xNCAxNHYxMGgxMFYxNEgxNHoiLz4KPC9nPgo8L2c+Cjwvc3ZnPg==') repeat;
    opacity: 0.3;
    pointer-events: none; /* не перехватывать клики поверх Stripe iFrame */
}

/* Progress Bar */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.progress-step.active .step-number {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
    transform: scale(1.1);
}

.step-label {
    font-weight: 500;
    color: #64748b;
    transition: var(--transition);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-line {
    width: 120px;
    height: 3px;
    background: #e2e8f0;
    margin: 0 1rem;
    border-radius: 2px;
    position: relative;
}

.progress-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Checkout Content */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

/* Form Section */
.checkout-form {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-section {
    padding: 2.5rem;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* Form Groups */
.form-group-wrapper {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.02) 0%, rgba(255, 251, 2, 0.02) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(8, 145, 178, 0.1);
}

.group-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid;
    border-image: linear-gradient(45deg, var(--primary-color), var(--accent-color)) 1;
}

.group-title i {
    color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin-top: 4px;
    font-style: italic;
}

.required {
    color: #ef4444;
    font-weight: 600;
}

.optional {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.85rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: var(--text-color);
}

/* Country select with flags */
#country {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

#country option {
    padding: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    background: white;
    color: var(--text-color);
}

#country option:hover {
    background: var(--bg-secondary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

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


/* Form Hints */
.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition);
}

.form-select:focus + .select-arrow {
    color: var(--primary-color);
    transform: translateY(-50%) rotate(180deg);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 180px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 120px;
}

.summary-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.summary-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-items-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.summary-items {
    padding: 1.5rem;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.item-options {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.item-quantity {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.item-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 0.5rem;
    align-self: flex-start;
}

.item-price .price-usd {
    font-size: 0.7em;
    opacity: 0.6;
    font-weight: 400;
}

/* Summary Totals */
.summary-totals {
    padding: 1.5rem;
    background: var(--bg-secondary);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

.total-value {
    font-weight: 600;
    color: var(--text-color);
}

.total-value .price-usd {
    font-size: 0.7em;
    opacity: 0.6;
    font-weight: 400;
}

.total-final {
    padding-top: 0.75rem;
    border-top: 2px solid;
    border-image: linear-gradient(45deg, var(--primary-color), var(--accent-color)) 1;
    margin-top: 0.75rem;
}

.total-final .total-label,
.total-final .total-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.total-final .total-value {
    color: var(--primary-color);
}

.tax-notice {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* ===== PAYMENT SECTION ===== */
.payment-section {
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stripe Elements Styling */
.stripe-element {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    transition: all 0.3s ease;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

.stripe-element:hover {
    border-color: var(--primary-color);
}

.stripe-element.StripeElement--focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.stripe-element.StripeElement--invalid {
    border-color: #ef4444;
}

.stripe-element.StripeElement--complete {
    border-color: #10b981;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 1rem;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Spinner for payment button */
.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

.spinner.hidden {
    display: none;
}

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

/* Payment button states */
#submit-payment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#submit-payment:disabled:hover {
    background: var(--primary-color);
    transform: none;
}

/* Form error styling for Stripe */
.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

/* Trust indicators for payment */
.payment-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.payment-trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.payment-trust-item i {
    color: #10b981;
}

/* Summary Features */
.summary-features {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #f1f5f9;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

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

.feature-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Trust Section */
.trust-section {
    margin-top: 3rem;
    padding: 2rem 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    position: relative;
    z-index: 2;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trust-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.trust-text {
    text-align: left;
}

.trust-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 0.125rem;
}

.trust-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .order-summary {
        position: static;
        order: -1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-group-wrapper {
        padding: 1rem;
    }
    
    .checkout-progress {
        margin-bottom: 2rem;
    }
    
    .progress-line {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        min-width: 100%;
        padding: 1rem;
    }
    
    .trust-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .summary-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .item-details {
        text-align: center;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group-wrapper {
    animation: slideIn 0.6s ease forwards;
}

.form-group-wrapper:nth-child(2) {
    animation-delay: 0.1s;
}

.form-group-wrapper:nth-child(3) {
    animation-delay: 0.2s;
}

.form-group-wrapper:nth-child(4) {
    animation-delay: 0.3s;
}

/* Focus states for accessibility */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Error states */
.form-input.error,
.form-select.error {
    border-color: #ef4444;
}

.form-input.error:focus,
.form-select.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message i {
    font-size: 0.75rem;
} 

/* Empty Cart Message */
.empty-cart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    grid-column: 1 / -1;
}

.empty-cart-content {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    animation: slideIn 0.6s ease;
}

.empty-cart-icon {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-cart-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.empty-cart-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.6;
}

.empty-cart-actions {
    display: flex;
    justify-content: center;
}

.empty-cart-message {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    font-style: italic;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 1rem 0;
}

/* Promo Code Section */
.promo-code-input {
    position: relative;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.input-with-button .form-input {
    flex: 1;
    margin-bottom: 0;
}

/* Make promo code section more compact */
.form-group-wrapper:has(.promo-code-input),
.form-group-wrapper .promo-code-input {
    margin-bottom: 1.5rem;
}

.form-group-wrapper:has(.promo-code-input) {
    padding: 1rem;
}

.form-group-wrapper:has(.promo-code-input) .group-title,
.promo-code-input ~ .group-title,
.promo-code-input + .group-title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Direct class targeting for promo section */
.form-group-wrapper.promo-section {
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
}

.form-group-wrapper.promo-section .group-title {
    margin-bottom: 1rem !important;
    font-size: 1.1rem !important;
}

/* Fallback for browsers without :has() support */
.form-group-wrapper:nth-last-child(3) {
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.form-group-wrapper:nth-last-child(3) .group-title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.promo-group {
    margin-bottom: 0;
}

.promo-group .form-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.promo-apply-btn {
    white-space: nowrap;
    height: 3rem;
    padding: 0 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.promo-apply-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.promo-apply-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form message for promo codes and info */
.form-message, .info-message {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Make promo messages more compact */
.promo-section .form-message {
    margin-top: 0.3rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.info-message {
    opacity: 1;
    transform: translateY(0);
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.form-message.info {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Save Card Option */
.form-group input[type="checkbox"] + .checkmark {
    position: relative;
}

.form-group input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Stripe Element Custom Styles */
.stripe-element {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: all 0.3s ease;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.stripe-element:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.stripe-element.error {
    border-color: #ef4444;
}

/* Card brand icons in Stripe element */
.card-brand-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.6;
}

/* Security badges */
.security-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: var(--border-radius);
    border: 1px solid #e0f2fe;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.security-badge i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Form validation states */
.form-input.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3e%3cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ef4444'%3e%3cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Validation errors styling */
.validation-errors {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-top: 0.5rem;
    color: #dc2626;
    font-size: 0.9rem;
}

.error-item {
    margin-bottom: 0.25rem;
}

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

/* Enhanced form hints */
.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-style: italic;
}

/* Loading states */
.form-input.loading {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3e%3cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm0-2a6 6 0 100-12 6 6 0 000 12z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        background-position: right 0.75rem center;
        transform: rotate(0deg);
    }
    to {
        background-position: right 0.75rem center;
        transform: rotate(360deg);
    }
}

/* Responsive for payment fields */
@media (max-width: 768px) {
    .input-with-button {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .input-with-button .form-input {
        margin-bottom: 0;
    }
    
    .promo-apply-btn {
        width: 100%;
        height: 3rem;
    }
    
    /* payment-icons removed */
    
    /* payment-icons removed */
    
    .security-badges {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Payment Terms */
.payment-terms {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
}

.terms-text {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.terms-text a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Form Actions Enhanced */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
    justify-content: space-between;
}

.form-actions .btn {
    flex: 1;
    min-height: 3.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.form-actions .btn:active {
    transform: translateY(0);
}

.btn-primary.btn-large {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    position: relative;
}

.btn-primary.btn-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary.btn-large:hover::before {
    left: 100%;
}

.btn-primary.btn-large:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-color));
}

/* Spinner for loading state */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

#submit-payment[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

#submit-payment[disabled]:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Button text states */
#button-text {
    transition: opacity 0.3s ease;
}

#submit-payment.loading #button-text {
    opacity: 0.7;
}

#submit-payment.loading .spinner {
    display: inline-block;
    margin-left: 0.5rem;
}

/* Responsive for payment fields */
@media (max-width: 768px) {
    .input-with-button {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .input-with-button .form-input {
        margin-bottom: 0;
    }
    
    .promo-apply-btn {
        width: 100%;
        height: 3rem;
    }
    
    /* payment-icons removed */
    
    /* payment-icons removed */
    
    .security-badges {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions .btn {
        width: 100%;
        min-height: 3.5rem;
    }
    
    .payment-terms {
        margin-top: 1rem;
        padding: 0.75rem;
    }
    
    .terms-text {
        font-size: 0.8rem;
    }
}

/* Responsive for empty cart */
@media (max-width: 768px) {
    .empty-cart-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .empty-cart-icon {
        font-size: 3rem;
    }
    
    .empty-cart-title {
        font-size: 1.5rem;
    }
}

/* Newsletter Subscription Styles */
.newsletter-subscription {

    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.checkbox-input:checked + .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.checkbox-custom:hover {
    border-color: #3b82f6;
}

.checkbox-text {
    color: #374151;
    font-weight: 500;
}

.checkbox-hint {
    display: block;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 4px;
    font-style: italic;
}

/* Security Info Section */
.security-info {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f9fc 100%);
    border: 1px solid #b3e5d1;
    border-radius: 8px;
}

.security-text {
    font-size: 0.9rem;
    color: #2d5b47;
    line-height: 1.5;
    margin: 0;
    text-align: center;
} 

/* ---- Stripe Elements click/focus fixes (Safari/iOS transform issues) ---- */
/* Avoid transform-based animations on ancestors of Stripe iframes */
.payment-section {
    animation: fadeInOpacity 0.4s ease-out !important;
}

@keyframes fadeInOpacity {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Disable transform animations on groups inside payment section */
.payment-section .form-group-wrapper {
    animation: none !important;
}

/* Ensure the Stripe container is interactable and above decorative layers */
.stripe-element {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

/* In Safari/iOS specifically, neutralize transforms that can offset clicks */
@supports (-webkit-touch-callout: none) {
    .payment-section { animation: none !important; }
    .payment-section .form-group-wrapper { animation: none !important; }
}