/* Checkout Page Specific Styles */

.checkout-section {
    padding: var(--space-20) 0;
    min-height: calc(100vh - var(--header-height-desktop) - 120px);
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-200) 50%, var(--primary-100) 100%);
    position: relative;
    overflow: hidden;
}

.checkout-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(235, 206, 178, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.page-title {
    text-align: center;
    margin-bottom: var(--space-16);
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    border-radius: var(--radius-full);
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: var(--space-10);
    align-items: start;
    position: relative;
    z-index: 1;
}

.checkout-form-section {
    background: white;
    border-radius: var(--radius-3xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    position: relative;
    overflow: hidden;
}

.checkout-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
}

.checkout-form {
    width: 100%;
}

.form-section {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 3px solid var(--neutral-100);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-8);
}

.form-section-title {
    color: var(--neutral-900);
    margin-bottom: var(--space-8);
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    display: flex;
    align-items: center;
    gap: var(--space-4);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.form-section-title::before {
    content: '';
    width: 6px;
    height: 32px;
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-700));
    border-radius: var(--radius-base);
    box-shadow: var(--shadow-sm);
}

/* Payment Notice */
.payment-notice {
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    border: 2px solid var(--secondary-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
}

.payment-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-700));
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.notice-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    color: var(--secondary-700);
    font-weight: 700;
    font-size: var(--text-lg);
}

.notice-header svg {
    color: var(--secondary-600);
    width: 28px;
    height: 28px;
}

.payment-notice p {
    color: var(--secondary-800);
    margin-bottom: var(--space-6);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

.bank-details {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    border: 2px solid var(--secondary-200);
    box-shadow: var(--shadow-sm);
}

.bank-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 2px solid var(--neutral-100);
    transition: var(--transition-fast);
}

.bank-detail-item:hover {
    background: linear-gradient(135deg, var(--secondary-50), transparent);
    border-radius: var(--radius-lg);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

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

.bank-detail-item .label {
    color: var(--neutral-600);
    font-weight: 600;
    font-size: var(--text-sm);
}

.bank-detail-item .value {
    color: var(--neutral-900);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    border: 1px solid var(--neutral-200);
}

/* File Upload */
.file-upload-container {
    position: relative;
    border: 3px dashed var(--neutral-300);
    border-radius: var(--radius-2xl);
    transition: var(--transition-base);
    overflow: hidden;
    background: linear-gradient(135deg, var(--neutral-50), white);
}

.file-upload-container:hover {
    border-color: var(--secondary-500);
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.file-upload-container input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: var(--z-10);
}

.file-upload-placeholder {
    padding: var(--space-10);
    text-align: center;
    color: var(--neutral-600);
    transition: var(--transition-base);
}

.file-upload-placeholder svg {
    color: var(--neutral-400);
    margin-bottom: var(--space-6);
    width: 64px;
    height: 64px;
}

.file-upload-placeholder p {
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--neutral-700);
    font-size: var(--text-lg);
}

.file-upload-placeholder span {
    font-size: var(--text-sm);
    color: var(--neutral-500);
    font-weight: 500;
}

.file-preview {
    position: relative;
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--neutral-50), var(--neutral-100));
}

.file-preview img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--neutral-200);
}

.remove-file-btn {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: linear-gradient(135deg, var(--burgundy-600), var(--burgundy-700));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-lg);
    border: 2px solid white;
}

.remove-file-btn:hover {
    background: linear-gradient(135deg, var(--burgundy-700), var(--burgundy-800));
    transform: scale(1.15);
    box-shadow: var(--shadow-xl);
}

/* Checkout Notice */
.checkout-notice {
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border: 2px solid var(--primary-200);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    margin-bottom: var(--space-10);
    display: flex;
    gap: var(--space-6);
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.checkout-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.notice-icon {
    color: var(--primary-600);
    flex-shrink: 0;
    margin-top: var(--space-2);
}

.notice-icon svg {
    width: 28px;
    height: 28px;
}

.notice-content p {
    color: var(--primary-800);
    margin: 0;
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    font-weight: 500;
}

/* Checkout Submit Button */
.checkout-submit-btn {
    padding: var(--space-5) var(--space-8);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    position: relative;
    overflow: hidden;
    min-height: 64px;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
}

.checkout-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: var(--transition-fast);
}

.checkout-submit-btn:hover::before {
    opacity: 1;
}

.checkout-submit-btn .btn-icon {
    transition: var(--transition-fast);
}

.checkout-submit-btn:hover .btn-icon {
    transform: translateX(6px);
}

.checkout-submit-btn.loading .btn-text {
    opacity: 0;
}

.checkout-submit-btn.loading .btn-icon {
    display: none;
}

.checkout-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 3px solid transparent;
    border-top: 3px solid white;
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

/* Order Summary */
.order-summary-section {
    position: sticky;
    top: calc(var(--header-height-desktop) + var(--space-6));
}

.order-summary {
    background: white;
    border-radius: var(--radius-3xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    position: relative;
    overflow: hidden;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--secondary-600), var(--primary-600));
    border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
}

.order-summary h3 {
    margin-bottom: var(--space-8);
    color: var(--neutral-900);
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    text-align: center;
    padding-bottom: var(--space-6);
    border-bottom: 3px solid var(--neutral-100);
    font-weight: 700;
}

.order-items {
    margin-bottom: var(--space-8);
}

.order-item {
    display: flex;
    gap: var(--space-5);
    padding: var(--space-5) 0;
    border-bottom: 2px solid var(--neutral-100);
    transition: var(--transition-fast);
}

.order-item:hover {
    background: linear-gradient(135deg, var(--neutral-50), transparent);
    border-radius: var(--radius-lg);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

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

.order-item-image {
    width: 80px;
    height: 64px;
    border-radius: var(--radius-xl);
    object-fit: cover;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    border: 2px solid var(--neutral-200);
    transition: var(--transition-fast);
}

.order-item:hover .order-item-image {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

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

.order-item-name {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-2);
    font-size: var(--text-base);
    line-height: var(--leading-tight);
}

.order-item-quantity {
    color: var(--neutral-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.order-item-price {
    color: var(--secondary-600);
    font-weight: 700;
    font-size: var(--text-base);
    font-family: var(--font-display);
}

.summary-calculations {
    border-top: 3px solid var(--neutral-100);
    padding-top: var(--space-6);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    transition: var(--transition-fast);
}

.summary-row:hover {
    background: linear-gradient(135deg, var(--neutral-50), transparent);
    border-radius: var(--radius-lg);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.summary-label {
    color: var(--neutral-700);
    font-size: var(--text-base);
    font-weight: 500;
}

.summary-value {
    color: var(--neutral-900);
    font-weight: 700;
    font-size: var(--text-base);
    font-family: var(--font-display);
}

.delivery-tbd {
    color: var(--neutral-500);
    font-style: italic;
    font-weight: 600;
}

.summary-divider {
    height: 2px;
    background: var(--neutral-200);
    margin: var(--space-4) 0;
    border-radius: var(--radius-full);
}

.total-row {
    padding: var(--space-5);
    margin-top: var(--space-4);
    border-top: 3px solid var(--neutral-200);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    border-radius: var(--radius-xl);
    border: 2px solid var(--secondary-200);
}

.total-row .summary-label,
.total-row .summary-value {
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    font-weight: 800;
    color: var(--neutral-900);
}

.total-row .summary-value {
    color: var(--secondary-600);
    font-family: var(--font-display);
}

.secure-checkout-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--secondary-50), var(--secondary-100));
    border-radius: var(--radius-xl);
    color: var(--secondary-700);
    font-size: var(--text-sm);
    font-weight: 600;
    border: 2px solid var(--secondary-200);
    box-shadow: var(--shadow-sm);
}

.secure-checkout-badge svg {
    color: var(--secondary-600);
    width: 20px;
    height: 20px;
}

/* Empty Checkout */
.empty-checkout {
    text-align: center;
    padding: var(--space-24) var(--space-8);
    background: white;
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(235, 206, 178, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.empty-checkout::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-3xl);
    background: linear-gradient(135deg, var(--secondary-50), var(--primary-100));
    opacity: 0.3;
    z-index: -1;
}

.empty-checkout-icon {
    margin-bottom: var(--space-8);
    color: var(--neutral-300);
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-checkout-icon svg {
    width: 96px;
    height: 96px;
}

.empty-checkout h2 {
    margin-bottom: var(--space-6);
    color: var(--neutral-800);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 700;
}

.empty-checkout p {
    color: var(--neutral-600);
    margin-bottom: var(--space-10);
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
    line-height: var(--leading-relaxed);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-checkout .btn {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-content {
        grid-template-columns: 1fr 400px;
        gap: var(--space-8);
    }
    
    .order-summary-section {
        top: calc(var(--header-height-tablet) + var(--space-4));
    }
}

@media (max-width: 768px) {
    .checkout-section {
        padding: var(--space-16) 0;
        min-height: calc(100vh - var(--header-height-mobile) - 80px);
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .order-summary-section {
        position: static;
        order: -1;
    }
    
    .checkout-form-section {
        padding: var(--space-8);
    }
    
    .form-section {
        margin-bottom: var(--space-8);
        padding-bottom: var(--space-6);
    }
    
    .payment-notice,
    .checkout-notice {
        padding: var(--space-6);
    }
    
    .bank-details {
        padding: var(--space-5);
    }
    
    .bank-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
        padding: var(--space-4) 0;
    }
    
    .file-upload-placeholder {
        padding: var(--space-8);
    }

    .file-upload-placeholder svg {
        width: 48px;
        height: 48px;
    }

    .order-summary {
        padding: var(--space-6);
    }
}

@media (max-width: 480px) {
    .checkout-section {
        padding: var(--space-12) 0;
        min-height: calc(100vh - var(--header-height-small) - 60px);
    }
    
    .checkout-form-section,
    .order-summary {
        padding: var(--space-6);
    }
    
    .form-section {
        margin-bottom: var(--space-6);
        padding-bottom: var(--space-5);
    }
    
    .payment-notice,
    .checkout-notice {
        padding: var(--space-5);
    }
    
    .file-upload-placeholder {
        padding: var(--space-6);
    }
    
    .file-upload-placeholder svg {
        width: 40px;
        height: 40px;
    }
    
    .order-item {
        gap: var(--space-4);
        padding: var(--space-4) 0;
    }
    
    .order-item-image {
        width: 64px;
        height: 52px;
    }

    .empty-checkout {
        padding: var(--space-16) var(--space-6);
    }

    .empty-checkout-icon svg {
        width: 72px;
        height: 72px;
    }

    .checkout-submit-btn {
        min-height: 56px;
        padding: var(--space-4) var(--space-6);
    }
}

/* Enhanced Form Validation Animations */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--burgundy-600);
    box-shadow: 0 0 0 4px rgba(57, 18, 25, 0.15), var(--shadow-md);
    animation: shake 0.6s ease-in-out;
    background: linear-gradient(135deg, rgba(57, 18, 25, 0.02), white);
}

.form-group.success input,
.form-group.success textarea,
.form-group.success select {
    border-color: var(--secondary-400);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.15), var(--shadow-md);
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.02), white);
}

@keyframes shake {
    0%, 100% { 
        transform: translateX(0); 
    }
    10%, 30%, 50%, 70%, 90% { 
        transform: translateX(-8px); 
    }
    20%, 40%, 60%, 80% { 
        transform: translateX(8px); 
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Loading states */
.checkout-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.checkout-form.loading input,
.checkout-form.loading textarea,
.checkout-form.loading select {
    background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
    color: var(--neutral-500);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .checkout-form-section,
    .order-summary {
        border: 3px solid var(--neutral-800);
    }
    
    .form-section {
        border-bottom: 3px solid var(--neutral-600);
    }
    
    .payment-notice,
    .checkout-notice {
        border: 3px solid var(--secondary-700);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .checkout-submit-btn .btn-icon,
    .file-upload-container,
    .remove-file-btn,
    .order-item-image {
        transition: none;
    }
    
    .checkout-submit-btn:hover .btn-icon,
    .remove-file-btn:hover,
    .file-upload-container:hover,
    .order-item:hover .order-item-image {
        transform: none;
    }
    
    .form-group.error input,
    .form-group.error textarea,
    .form-group.error select {
        animation: none;
    }

    .checkout-section::before {
        animation: none;
    }
}

/* Print styles */
@media print {
    .checkout-section {
        background: white;
    }
    
    .checkout-submit-btn,
    .file-upload-container {
        display: none;
    }
    
    .checkout-form-section,
    .order-summary {
        box-shadow: none;
        border: 2px solid var(--neutral-400);
    }

    .checkout-section::before {
        display: none;
    }
}