/* ===== Design Tokens ===== */
:root {
    /* Palette — derived from the brand images */
    --cream:       #f0ebe4;
    --cream-light: #f7f4f0;
    --cream-dark:  #e5ded4;
    --white:       #ffffff;
    --green-900:   #1a3c34;
    --green-800:   #22503e;
    --green-700:   #2c6650;
    --green-100:   rgba(26, 60, 52, 0.06);
    --gold:        #c49a3c;
    --gold-soft:   rgba(196, 154, 60, 0.12);
    --text-body:   #4a5c56;
    --text-muted:  #7c8e87;
    --border:      #ddd5ca;
    --border-light:#ece7df;

    /* Typography */
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, "Times New Roman", serif;

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(26,60,52,0.04);
    --shadow-sm:  0 2px 8px rgba(26,60,52,0.06);
    --shadow-md:  0 4px 20px rgba(26,60,52,0.08);
    --shadow-lg:  0 12px 40px rgba(26,60,52,0.10);
    --shadow-xl:  0 20px 60px rgba(26,60,52,0.12);

    /* Spacing / Radius */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Utility */
.hidden { display: none !important; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Never allow sideways panning — the page scrolls vertically only */
    overflow-x: hidden;
    /* Stop iOS/Android from re-flowing type when the device is rotated */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream-light);
    color: var(--green-900);
    line-height: 1.7;
    min-height: 100vh;
    min-height: 100dvh; /* mobile browser chrome doesn't cause a jump */
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Subtle dot-grid texture */
    background-image: radial-gradient(circle, rgba(26,60,52,0.055) 1px, transparent 1px);
    background-size: 28px 28px;
}

img { display: block; max-width: 100%; height: auto; }

/* ===== Logo (inside hero, top-left) ===== */
.logo-link {
    display: block;
    line-height: 0;
    align-self: flex-start;
}

.logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* ===== Student login pill (hero top-right) ===== */
.hero-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.hero-login-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-900);
    text-decoration: none;
    padding: 0.55rem 1.1rem;
    border: 1.5px solid var(--green-900);
    border-radius: 100px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-login-link:hover {
    background: var(--green-900);
    color: var(--white);
}

/* ===== Hero Section ===== */
.hero-section {
    background-color: var(--cream);
    overflow: hidden;
    position: relative;
}
/* Radial gold glow in hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 50%;
    background: radial-gradient(ellipse at 60% 40%, rgba(196,154,60,0.10) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.hero-content-row {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    min-width: 280px;
}

.badge {
    display: inline-block;
    padding: 0.28rem 0.9rem;
    background-color: var(--gold-soft);
    color: var(--gold);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 1.25rem;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--green-900);
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
    font-weight: 400;
    line-height: 1.7;
    text-wrap: pretty;
}

.hero-image-wrap {
    flex: 1.6;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 100%;
    display: block;
    filter: drop-shadow(0 16px 32px rgba(26, 60, 52, 0.13));
}

/* Square product art (free course) — cap it so it doesn't dominate the fold */
.hero-image--square {
    border-radius: 16px;
    width: 100%;
    max-width: 340px;
    object-fit: cover;
}

/* ===== Main Content Section ===== */
main { flex: 1; }

.content-section {
    padding: 3.5rem 0 4rem;
}

.content-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Product Column (Left) */
.product-column {
    flex: 1.1;
    min-width: 0;
}

/* Info Cards */
.info-card {
    background-color: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(26,60,52,0.04), inset 0 1px 0 rgba(255,255,255,0.9);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.info-card:hover {
    box-shadow: 0 6px 20px rgba(26,60,52,0.08), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--green-900);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    text-wrap: balance;
}

/* Check List */
.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-light);
    text-wrap: pretty;
}

.check-list li:last-child {
    border-bottom: none;
}

.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--gold-soft);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Learn List (detailed) */
.learn-list {
    list-style: none;
    counter-reset: learn;
}

.learn-list li {
    position: relative;
    padding: 1rem 0 1rem 0;
    border-bottom: 1px solid var(--border-light);
    counter-increment: learn;
}

.learn-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.learn-list li::before {
    content: counter(learn);
    position: absolute;
    left: 0;
    top: 1rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green-900);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* RTL override: push numbers to the right side */
[dir="rtl"] .learn-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .learn-list li {
    padding-right: 2.5rem;
    padding-left: 0;
}

.learn-list strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-900);
    margin-bottom: 0.3rem;
    line-height: 1.5;
    text-wrap: balance;
}

.learn-list p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-wrap: pretty;
}

/* Testimonial Card */
.testimonial-card {
    background: linear-gradient(145deg, var(--green-900) 0%, var(--green-800) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: var(--white);
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
}
/* Grain texture on testimonial */
.testimonial-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.2;
}
/* Gold shimmer line at top */
.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196,154,60,0.6), transparent);
}

.testimonial-card .stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-bottom: 0.75rem;
}

.testimonial-card blockquote {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-wrap: pretty;
}

.testimonial-attribution {
    font-size: 0.82rem;
    opacity: 0.6;
    font-weight: 500;
}

/* ===== Checkout Column (Right) ===== */
.checkout-column {
    flex: 0 0 440px;
    min-width: 0;
}

/* Secure Checkout Label (sits in the beige area above the white card) */
.secure-checkout-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.secure-checkout-label svg {
    color: var(--gold);
}

.checkout-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    box-shadow: 0 4px 24px rgba(26,60,52,0.08), inset 0 1px 0 rgba(255,255,255,1);
    position: sticky;
    top: 2rem;
}

.checkout-header {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}

.checkout-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--green-900);
    text-wrap: balance;
}

.order-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    font-size: 1rem;
    color: var(--text-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tax-row {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.total-row {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
    font-weight: 600;
    font-size: 1.25rem;
}

.total-row .price {
    font-size: 1.5rem;
}

.total-row .price-currency {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

/* Form Blocks */
.form-block {
    margin-bottom: 1.75rem;
}

.form-block h3 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 1rem;
}

.field {
    margin-bottom: 0.85rem;
}

.field-row {
    display: flex;
    gap: 0.75rem;
}

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--green-900);
    background: var(--cream-light);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input::placeholder {
    color: #b0b8b4;
}

.field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
    background: var(--white);
}

/* Card Input */
.card-input-wrapper {
    position: relative;
}

.card-input-wrapper input {
    padding-right: 2.75rem;
}

.card-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Payment Method Toggles */
.payment-methods {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.payment-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s var(--ease);
}

.payment-option.selected .option-content {
    border-color: var(--green-900);
    color: var(--green-900);
    background-color: var(--green-100);
}

/* Payment Details */
.payment-details {
    display: none;
    animation: fadeSlide 0.25s var(--ease) forwards;
}

.payment-details.active {
    display: block;
}

.paypal-info {
    padding: 1.25rem;
    background-color: var(--cream-light);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    border: 1px dashed var(--border);
}

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

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s var(--ease);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.08);
    letter-spacing: 0.02em;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
    background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 100%);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Trust Row */
.trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.trust-item svg {
    color: var(--gold);
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--border-light);
    background-color: var(--white);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-inner {
        padding: 1.5rem 2rem 2.5rem;
    }

    .hero-content-row {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-inner {
        flex-direction: column;
    }

    .checkout-column {
        flex: none;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

    .checkout-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero-image {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    /* Square art would otherwise eat the whole first screen on a phone */
    .hero-image--square {
        max-width: 230px;
    }

    .hero-inner {
        padding: 0.75rem 1.25rem 2rem;
    }

    .logo {
        height: 52px;
    }

    .hero-login-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.9rem;
    }

    .hero-content-row {
        gap: 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .content-inner {
        padding: 0 1.25rem;
    }

    .content-section {
        padding: 2rem 0 3rem;
    }

    .info-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .checkout-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .testimonial-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .field-row {
        flex-direction: column;
        gap: 0;
    }

    .trust-row {
        gap: 0.6rem 1rem;
        margin-top: 1rem;
    }

    .footer-inner {
        padding: 1.25rem;
    }
}

/* Small phones (iPhone SE / 360px Androids) */
@media (max-width: 400px) {
    .hero-inner {
        padding: 0.75rem 1rem 1.75rem;
    }

    .logo {
        height: 44px;
    }

    .hero-login-link {
        font-size: 0.75rem;
        padding: 0.45rem 0.75rem;
    }

    .hero-text h1 {
        font-size: 1.6rem;
    }

    .content-inner {
        padding: 0 1rem;
    }

    .info-card,
    .checkout-card,
    .testimonial-card {
        padding: 1.25rem 1rem;
    }

    .info-card h3 {
        font-size: 1.1rem;
    }

    .order-summary-block {
        padding: 1rem;
    }

    /* Wrap the numbered list tighter so long Persian lines don't get squeezed */
    [dir="rtl"] .learn-list li {
        padding-right: 2.1rem;
    }

    .total-row {
        font-size: 1.1rem;
    }

    .total-row .price {
        font-size: 1.3rem;
    }

    .trust-item {
        font-size: 0.68rem;
    }
}

/* Comfortable tap targets on touch devices (Apple/Google both recommend ~44px) */
@media (hover: none) and (pointer: coarse) {
    /* Any input under 16px makes iOS Safari zoom the page on focus — and once it
       has zoomed, the user can pan sideways. Keyed to touch rather than width so
       it still holds when the phone is turned landscape. */
    .field input[type="text"],
    .field input[type="email"],
    .field input[type="tel"],
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    select,
    textarea {
        font-size: 16px;
    }

    .hero-login-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .submit-btn {
        min-height: 50px;
    }

    .method-option {
        min-height: 46px;
    }

    /* Hover lift is meaningless on touch and leaves cards stuck in hover state */
    .info-card:hover {
        transform: none;
        box-shadow: 0 1px 3px rgba(26,60,52,0.04), inset 0 1px 0 rgba(255,255,255,0.9);
    }

    .submit-btn:hover {
        transform: none;
    }
}

/* =============================================================================
   Region Gate (paid course pages) — see region-gate.js
   ============================================================================= */

/* Lock the page behind the dialog while the buyer chooses */
html.region-gate-open,
html.region-gate-open body {
    overflow: hidden;
}

.region-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(26, 60, 52, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
    /* Animated by CSS, not by a JS class toggle: rAF is paused in background
       tabs, which would leave this overlay invisible while still blocking the
       page underneath. */
    animation: regionGateIn 0.25s var(--ease) both;
}

.region-gate.is-closing {
    animation: regionGateOut 0.2s var(--ease) both;
    pointer-events: none;
}

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

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

.region-gate__card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(26, 60, 52, 0.28);
    margin: auto;
    animation: regionGateCardIn 0.3s var(--ease) both;
}

@keyframes regionGateCardIn {
    from { transform: translateY(14px) scale(0.98); }
    to   { transform: translateY(0) scale(1); }
}

/* Respect reduced-motion — the gate must still appear, just without movement */
@media (prefers-reduced-motion: reduce) {
    .region-gate,
    .region-gate__card {
        animation-duration: 0.01ms;
    }
}

.region-gate__logo {
    height: 42px;
    width: auto;
    margin: 0 auto 1.5rem;
}

.region-gate__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--green-900);
    line-height: 1.35;
    margin-bottom: 0.6rem;
    text-wrap: balance;
}

.region-gate__lead {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    text-wrap: pretty;
}

.region-gate__options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.region-gate__option {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--cream-light);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    text-align: right;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.region-gate__option:hover {
    border-color: var(--gold);
    background: var(--white);
    transform: translateY(-1px);
}

.region-gate__option:focus-visible {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.region-gate__opt-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-900);
}

.region-gate__opt-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Iran payment panel (replaces the Stripe sections) ── */
.iran-pay {
    background: var(--cream-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.35rem;
    text-align: center;
}

.iran-pay__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--green-900);
    margin-bottom: 0.6rem;
    text-wrap: balance;
}

.iran-pay__text {
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.75;
    margin-bottom: 1.35rem;
    text-wrap: pretty;
}

/* Toman figures in the order summary — Persian digits need a touch more room
   and shouldn't inherit the tight negative tracking used on the USD price. */
.price-toman {
    letter-spacing: 0;
    white-space: nowrap;
}

.total-row .price-toman {
    font-size: 1.25rem;
}

.iran-pay__price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green-900);
    margin: -0.35rem 0 1.15rem;
    white-space: nowrap;
}

.iran-pay__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 100%);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.iran-pay__btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.iran-pay__btn--alt {
    background: transparent;
    color: var(--green-900);
    border: 1.5px solid var(--green-900);
    box-shadow: none;
}

.iran-pay__btn--alt:hover {
    background: var(--green-900);
    color: var(--white);
}

.iran-pay__note {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.9rem;
}

/* ── "Wrong answer?" escape hatch ── */
.region-switch {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.region-switch strong {
    color: var(--text-body);
    font-weight: 600;
}

.region-switch__btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--green-700);
    cursor: pointer;
    text-decoration: underline;
}

.region-switch__btn:hover { color: var(--green-900); }

@media (max-width: 640px) {
    .region-gate { padding: 1rem; }
    .region-gate__card { padding: 2rem 1.35rem; border-radius: var(--radius-md); }
    .region-gate__title { font-size: 1.3rem; }
    .region-gate__logo { height: 36px; margin-bottom: 1.25rem; }
    .iran-pay { padding: 1.35rem 1.1rem; }
}

@media (hover: none) and (pointer: coarse) {
    .region-gate__option { min-height: 60px; }
    .region-gate__option:hover { transform: none; }
    .iran-pay__btn:hover { transform: none; }
    .region-switch__btn { min-height: 34px; }
}

/* Payment Method Toggle */
.payment-method-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.method-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background-color: var(--white);
    transition: all 0.2s var(--ease);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.method-option input {
    display: none;
}

.method-option svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.method-option:hover {
    border-color: var(--text-body);
    color: var(--green-900);
}

.method-option.selected {
    border-color: var(--gold);
    background-color: rgba(196, 154, 60, 0.06);
    color: var(--green-900);
    box-shadow: 0 0 0 1px var(--gold);
}

.method-option.selected svg {
    color: var(--green-900);
}

/* Order Summary Block */
.order-summary-block {
    background: var(--cream-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.order-summary-block h3 {
    margin-bottom: 0.85rem;
}

/* Slide Panel Animation */
.slide-panel {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease);
}

.slide-panel.open {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease) 0.05s;
}


/* PayPal — an alternative to the card form, not a second card form.
   Hidden until the button has actually rendered (see setupPayPal). */
.paypal-block[hidden] {
    display: none;
}

.paypal-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    color: var(--text-muted, #8a8178);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.paypal-divider::before,
.paypal-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border, #ddd5ca);
}

.paypal-note {
    margin-top: 0.65rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted, #8a8178);
    text-align: center;
}
