:root {
    --navy: #000075;
    --burgundy: #960018;
    --dark: #121212;
    --ivory: #FEFEFA;
    --gold: #C4A267;
    --success: #28a745;
    --warning: #ffc107;
    --light-gold: rgba(196, 162, 103, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: var(--ivory);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: linear-gradient(rgba(254, 254, 250, 0.92), rgba(254, 254, 250, 0.94)), 
                      url('https://images.unsplash.com/photo-1510812431401-41e2f9c2c0b4?q=80&w=2000');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 50px 150px;
}

.checkout-header {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(150, 0, 24, 0.1);
}

.checkout-header h1 {
    color: var(--navy);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-variant: small-caps;
}

.checkout-header p {
    color: var(--burgundy);
    font-style: italic;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
}

.checkout-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--ivory);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--burgundy);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(150, 0, 24, 0.1);
}

.checkout-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--navy), var(--burgundy));
    z-index: 2;
}

.checkout-form::after {
    content: '🍷';
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 180px;
    opacity: 0.03;
    z-index: 0;
    transform: rotate(15deg);
}

.form-section {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.form-section h2 {
    color: var(--navy);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 117, 0.1);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

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

.form-group input, .form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid rgba(0, 0, 117, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: rgba(255, 255, 255, 0.7);
    font-family: 'Cormorant Garamond', serif;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--navy);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 117, 0.1);
    background-color: white;
}

.form-group input::placeholder {
    color: rgba(18, 18, 18, 0.4);
    font-style: italic;
}

.shipping-methods, .payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.method {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 117, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
}

.method:hover {
    border-color: var(--navy);
    background-color: white;
}

.method.active {
    border-color: var(--burgundy);
    background-color: rgba(150, 0, 24, 0.03);
}

.method input {
    margin-right: 1rem;
    accent-color: var(--burgundy);
}

.method-content {
    flex: 1;
}

.method-title {
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.method-description {
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.8;
}

.method-price {
    font-weight: 500;
    color: var(--burgundy);
    margin-left: 1rem;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin: 1.5rem 0;
}

.terms-checkbox input {
    margin-right: 1rem;
    margin-top: 0.3rem;
    accent-color: var(--burgundy);
}

.terms-checkbox label {
    font-size: 0.9rem;
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--burgundy);
    text-decoration: none;
    border-bottom: 1px dotted var(--burgundy);
}

.btn {
    width: 100%;
    padding: 16px;
    background-color: var(--burgundy);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    letter-spacing: 0.5px;
    font-weight: 500;
    font-family: 'Cormorant Garamond', serif;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    z-index: -1;
}

.btn:hover {
    background-color: #7a0014;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(150, 0, 24, 0.2);
}

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

.checkout-btn {
    margin-top: 1rem;
}

.order-summary {
    flex: 0 0 350px;
    background-color: var(--ivory);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--navy);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 117, 0.1);
    height: fit-content;
}

.order-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--burgundy), var(--navy));
    z-index: 2;
}

.order-summary h2 {
    color: var(--navy);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 117, 0.1);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Account Promotion Styles */
.account-promotion {
    background: linear-gradient(135deg, var(--light-gold), rgba(196, 162, 103, 0.05));
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.account-promotion::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 100px;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(196, 162, 103, 0.1), transparent);
    transform: rotate(15deg);
}

.promotion-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--gold);
}

.promotion-content h3 {
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
}

.promotion-content p {
    color: var(--dark);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.promotion-content strong {
    color: var(--gold);
    font-weight: 600;
}

.promotion-benefits {
    margin-bottom: 1.5rem;
}

.benefit {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.benefit-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.promotion-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-primary {
    background-color: var(--gold);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: #b38c4a;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--navy);
    padding: 12px 20px;
    border: 2px solid var(--navy);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: var(--navy);
    color: white;
}

/* Fidelity Section Styles */
.fidelity-section {
    background: linear-gradient(135deg, rgba(0, 0, 117, 0.05), rgba(0, 0, 117, 0.02));
    border: 2px solid rgba(0, 0, 117, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.fidelity-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.fidelity-icon {
    color: var(--gold);
    margin-right: 0.75rem;
}

.fidelity-header h3 {
    color: var(--navy);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.fidelity-balance {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(196, 162, 103, 0.1);
    border-radius: 8px;
}

.balance-amount {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.25rem;
}

.balance-label {
    font-size: 0.9rem;
    color: var(--dark);
    opacity: 0.7;
}

.fidelity-apply {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.apply-input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.apply-input-group input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid rgba(0, 0, 117, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    font-family: 'Cormorant Garamond', serif;
    transition: all 0.3s ease;
}

.apply-input-group input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(196, 162, 103, 0.2);
}

.input-suffix {
    position: absolute;
    right: 15px;
    color: var(--dark);
    opacity: 0.6;
    pointer-events: none;
    font-size: 0.9rem;
}

.apply-btn {
    padding: 12px 20px;
    background-color: var(--gold);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    white-space: nowrap;
    min-width: 100px;
}

.apply-btn:hover {
    background-color: #b38c4a;
    transform: translateY(-1px);
}

.fidelity-note {
    text-align: center;
}

.fidelity-note small {
    color: var(--dark);
    opacity: 0.7;
    font-style: italic;
}

.fidelity-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(0, 0, 117, 0.02);
    border: 2px dashed rgba(0, 0, 117, 0.1);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.empty-icon {
    color: rgba(0, 0, 117, 0.3);
    margin-bottom: 1rem;
}

.fidelity-empty h4 {
    color: var(--navy);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.fidelity-empty p {
    color: var(--dark);
    opacity: 0.7;
    font-size: 0.9rem;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 0, 117, 0.1);
}

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

.item-image {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 1rem;
    background-color: #f5f5f5;
}

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

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.item-variant {
    font-size: 0.85rem;
    color: var(--dark);
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.item-price {
    font-weight: 500;
    color: var(--burgundy);
}

.order-totals {
    border-top: 1px solid rgba(0, 0, 117, 0.1);
    padding-top: 1.5rem;
}

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

.total-row:last-child {
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-top: 1px solid rgba(0, 0, 117, 0.1);
    padding-top: 0.75rem;
}

.total-label {
    color: var(--dark);
}

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

.fidelity-discount .total-value {
    color: var(--success);
    font-weight: 500;
}

.grand-total .total-label {
    color: var(--navy);
}

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

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    body {
        background-image: linear-gradient(rgba(254, 254, 250, 0.96), rgba(254, 254, 250, 0.98)), 
                          url('https://images.unsplash.com/photo-1510812431401-41e2f9c2c0b4?q=80&w=1200');
    }
    
    .container {
        padding: 20px;
    }
    
    .checkout-form, .order-summary {
        padding: 1.75rem 1.25rem;
        border-radius: 10px;
    }
    
    .checkout-header h1 {
        font-size: 1.8rem;
    }
    
    .form-group input, .form-group select {
        padding: 14px 16px;
    }
    
    .btn {
        padding: 15px;
    }
    
    .checkout-form::after, .order-summary::after {
        font-size: 140px;
        bottom: -20px;
        right: -20px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .order-summary {
        flex: 1;
        min-width: 100%;
    }

    .fidelity-apply {
        flex-direction: column;
    }

    .apply-input-group input {
        padding: 14px 45px 14px 16px;
    }
    
    .apply-btn {
        padding: 14px;
        width: 100%;
        font-size: 0.95rem;
    }

    .promotion-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        padding: 14px 20px;
    }

    .balance-amount {
        font-size: 1.5rem;
    }

    .account-promotion, .fidelity-section {
        padding: 1.25rem;
    }
}

/* Animation for subtle interactivity */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.checkout-form, .order-summary {
    animation: fadeIn 0.6s ease-out forwards;
}

.form-section, .order-items, .order-totals, .btn {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

.account-promotion, .fidelity-section {
    opacity: 0;
    animation: slideIn 0.6s ease-out forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.order-items { animation-delay: 0.1s; }
.order-totals { animation-delay: 0.2s; }
.btn { animation-delay: 0.4s; }
.account-promotion, .fidelity-section { animation-delay: 0.05s; }

/* Success states */
.success-feedback {
    background-color: var(--success);
    color: white;
}

.apply-btn.success {
    background-color: var(--success) !important;
}

/* Hover effects for interactive elements */
.promotion-benefits .benefit:hover {
    transform: translateX(5px);
    transition: transform 0.2s ease;
}

.fidelity-balance:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Focus styles for accessibility */
.btn:focus,
.btn-primary:focus,
.btn-secondary:focus,
.apply-btn:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.form-group input:focus,
.apply-input-group input:focus {
    transform: translateY(-1px);
}

/* Loading state for apply button */
.apply-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.apply-btn.loading::after {
    content: '...';
    animation: dots 1s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}