/* css/checkout.css */

.checkout-container {
    width: 1000px; max-width: 100%; margin: 0 auto; padding: 5rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.form-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.payment-option {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.payment-option input {
    display: none;
}

.payment-option-content {
    padding: 1.5rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    text-align: center;
    transition: var(--transition);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    box-sizing: border-box;
}

.payment-option input:checked + .payment-option-content {
    border-color: var(--text);
    background: var(--bg-card);
}

.payment-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.upload-area {
    text-align: center;
    padding: 3rem 2rem;
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.upload-preview {
    margin-top: 1rem;
}

.upload-preview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

.order-summary {
    background: var(--bg-card);
    padding: 1.5rem;
}

.checkout-items {
    margin-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 600;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.order-success {
    text-align: center;
    padding: 4rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    color: #ffffff;
}

.order-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    margin: 1rem 0;
}

/* ==========================================================================
   Secure Transaction Guarantee ("letter")
   ========================================================================== */

.secure-guarantee-box {
    margin: 2rem 0;
    padding: 0;
    background: linear-gradient(135deg, #fdfbf7 0%, #f8f4ec 50%, #faf9f6 100%);
    border: 1px solid #d4c9a8;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.secure-guarantee-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid #c9a96e;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0.5;
}

.secure-guarantee-box .letter-header {
    padding: 2.5rem 2.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #d4c9a8;
    position: relative;
}

.secure-guarantee-box .letter-header .seal {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e 0%, #a8853e 100%);
    border: 2px solid #8b6914;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 2px 8px rgba(201,169,110,0.3);
    position: relative;
    z-index: 1;
}

.secure-guarantee-box .letter-header .seal i {
    color: #fff;
    font-size: 1.3rem;
}

.secure-guarantee-box .letter-header h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #5c4a1e;
    margin: 0;
    font-weight: 500;
}

.secure-guarantee-box .letter-body {
    padding: 2rem 2.5rem;
}

/* This paragraph rule was the readability bug: 0.9rem + justify + auto
   hyphens on a narrow single-column mobile card reads far smaller than
   the font-size alone suggests, and hyphenation breaks words awkwardly.
   Left-aligned, larger, and roomier line-height fixes it at every size. */
.secure-guarantee-box .letter-body p {
    font-family: var(--font-display);
    color: #4a3f2a;
    line-height: 1.85;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.secure-guarantee-box .letter-body p strong {
    color: #2a2010;
    font-weight: 600;
}

.secure-guarantee-box .letter-body p.muted {
    color: #8a7e6a;
    font-size: 0.95rem;
    font-style: italic;
    text-align: center;
}

.secure-guarantee-box .letter-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #c9a96e;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
}

.secure-guarantee-box .letter-divider::before,
.secure-guarantee-box .letter-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #c9a96e, transparent);
}

.secure-guarantee-box .terms-agree-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    color: #4a3f2a;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    line-height: 1.7;
    margin-top: 2rem;
    padding: 1.5rem 1.5rem;
    background: rgba(255,255,255,0.5);
    border: 1px solid #d4c9a8;
    border-radius: 2px;
    transition: var(--transition);
    box-sizing: border-box;
}

.secure-guarantee-box .terms-agree-label:hover {
    background: rgba(255,255,255,0.8);
    border-color: #c9a96e;
}

.secure-guarantee-box .terms-agree-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    accent-color: #c9a96e;
    flex-shrink: 0;
    cursor: pointer;
}

.secure-guarantee-box .terms-agree-label span {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: #5a4f3a;
    line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .payment-options {
        grid-template-columns: 1fr;
    }

    .secure-guarantee-box {
        margin: 1.5rem 0;
        border-radius: 0;
    }

    .secure-guarantee-box .letter-header {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .secure-guarantee-box .letter-header .seal {
        width: 48px;
        height: 48px;
    }

    .secure-guarantee-box .letter-header h3 {
        font-size: 1.05rem;
        letter-spacing: 0.08em;
    }

    .secure-guarantee-box .letter-body {
        padding: 1.25rem;
    }

    .secure-guarantee-box .letter-body p {
        font-size: 1rem;
        line-height: 1.75;
    }

    .secure-guarantee-box .letter-body p.muted {
        font-size: 0.9rem;
    }

    .secure-guarantee-box .terms-agree-label {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .secure-guarantee-box .terms-agree-label span {
        font-size: 0.82rem;
        line-height: 1.6;
    }
}