/* ==========================================================================
   THUNDER HOST — VISITOR THEME — COMPONENTS
   Sections, cards, features, pricing, FAQ, footer
   ========================================================================== */

.th-section { padding: 5rem 0; }
.th-section-sm { padding: 3rem 0; }
.th-section-lg { padding: 7rem 0; }
.th-section-soft { background: var(--th-soft); }
.th-section-soft-2 { background: var(--th-soft-2); }
.th-section-dark {
    background: var(--th-ink);
    color: #cbd5e1;
}
.th-section-dark h1, .th-section-dark h2, .th-section-dark h3, .th-section-dark h4 { color: #fff; }
.th-section-dark p { color: #94a3b8; }

@media (max-width: 768px) {
    .th-section { padding: 3rem 0; }
    .th-section-lg { padding: 4rem 0; }
}

.th-section-head { text-align: center; margin-bottom: 3rem; }
.th-section-head.left { text-align: left; }
.th-section-eyebrow {
    display: inline-block;
    padding: .35rem .9rem;
    background: rgba(5, 150, 105, .1);
    color: var(--th-primary-dark);
    font-size: .8rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 1rem;
}
.th-section-head h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 1rem;
}
.th-section-head p {
    font-size: 1.1rem;
    color: var(--th-muted);
    max-width: 640px;
    margin: 0 auto;
}
.th-section-head.left p { margin: 0; }

/* Feature cards */
.th-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.th-feature-card {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 2rem 1.5rem;
    transition: all .25s ease;
    height: 100%;
}
.th-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--th-shadow-lg);
    border-color: rgba(5, 150, 105, .3);
}
.th-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    background: linear-gradient(135deg, rgba(5, 150, 105, .1), rgba(16, 185, 129, .15));
    color: var(--th-primary);
    border-radius: 14px;
    margin-bottom: 1.25rem;
}
.th-feature-icon svg { width: 28px; height: 28px; }
.th-feature-card h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.th-feature-card p { color: var(--th-muted); font-size: .95rem; margin: 0; }

/* Domain search */
.th-domain-search {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-lg);
    padding: 2rem;
    box-shadow: var(--th-shadow);
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}
.th-domain-search-form {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
}
.th-domain-search-form .th-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: .9rem 1.1rem;
    border: 2px solid var(--th-border);
    border-radius: var(--th-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    transition: all .2s ease;
    background: #fff;
    color: var(--th-ink);
    box-sizing: border-box;
    width: 100%;
}
.th-domain-search-form .th-input:focus {
    outline: none;
    border-color: var(--th-primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
}
.th-domain-search-form .th-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* TLD suggestion chips — render as small cards (not raw text) and wrap
   so they never overflow the search input / mobile screen. */
.th-domain-tlds {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .35rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.th-tld-chip {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    padding: .45rem .7rem;
    background: var(--th-soft);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-sm);
    font-size: .9rem;
    font-weight: 700;
    color: var(--th-ink);
    white-space: nowrap;
    line-height: 1.2;
    box-sizing: border-box;
    max-width: 100%;
}
.th-tld-chip .price {
    font-size: .72rem;
    font-weight: 600;
    color: var(--th-muted);
}

@media (max-width: 575px) {
    .th-domain-search { padding: 1.25rem; }
    /* Mimic the footer newsletter on mobile: the input flexes and shrinks
       (min-width:0) while the button stays fixed, so the form always fits
       the screen without overlapping. */
    .th-domain-search-form { gap: .5rem; }
    .th-domain-search-form .th-input {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
    }
    .th-domain-search-form .th-btn {
        flex-shrink: 0;
        width: auto;
    }
    .th-domain-tlds { gap: .5rem; }
    .th-tld-chip { font-size: .8rem; padding: .4rem .6rem; }
}
.th-domain-pricing {
    max-width: 960px;
    margin: 4rem auto 0;
}
.th-domain-pricing .th-section-head { margin-bottom: 2rem; }
.th-domain-pricing .th-section-head h2 { font-size: 1.8rem; }
.th-domain-pricing .th-section-head p { font-size: 1rem; }

/* 3-column TLD grid */
.th-domain-tld-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

/* Each row: tld badge | prices */
.th-domain-tld-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-width: 0;
    padding: .85rem 1rem;
    background: #fff;
    border: 1.5px solid var(--th-border);
    border-radius: var(--th-radius);
    color: var(--th-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .18s ease;
    position: relative;
    overflow: hidden;
}
.th-domain-tld-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5,150,105,.04), transparent 60%);
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.th-domain-tld-card:hover {
    border-color: var(--th-primary);
    box-shadow: 0 4px 20px rgba(5,150,105,.12);
    transform: translateY(-2px);
}
.th-domain-tld-card:hover::before { opacity: 1; }

/* Left: TLD badge */
.th-domain-tld-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    max-width: 80px;
    padding: .35rem .6rem;
    background: linear-gradient(135deg, rgba(5,150,105,.1), rgba(16,185,129,.15));
    color: var(--th-primary-dark);
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: -.01em;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Middle: prices */
.th-domain-tld-prices {
    display: flex;
    gap: .5rem;
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}
.th-domain-tld-price {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    background: var(--th-soft);
    border: 1px solid var(--th-border);
    border-radius: 6px;
    padding: .3rem .65rem;
    flex-shrink: 0;
}
.th-domain-tld-price small {
    color: var(--th-muted);
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    line-height: 1;
}
.th-domain-tld-price strong {
    color: var(--th-ink);
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.2;
}


.th-domain-tld-loading {
    display: block;
    grid-column: 1 / -1;
    color: var(--th-muted);
    cursor: default;
    padding: 1rem;
}

@media (max-width: 991px) {
    .th-domain-tld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .th-domain-tld-grid { grid-template-columns: 1fr; }
}

.th-domain-result {
    padding: 1rem 1.25rem;
    border-radius: var(--th-radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
    background: var(--th-soft);
    border: 1px solid var(--th-border);
}
.th-domain-result.available { border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .05); }
.th-domain-result.unavailable { border-color: rgba(220, 38, 38, .25); background: rgba(220, 38, 38, .04); }
.th-domain-result-name { font-weight: 700; color: var(--th-ink); }
.th-domain-result-actions { display: flex; align-items: center; gap: .5rem; }
.th-domain-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.th-domain-badge.ok { background: rgba(16, 185, 129, .12); color: var(--th-success); }
.th-domain-badge.no { background: rgba(220, 38, 38, .12); color: var(--th-danger); }
.th-domain-badge.pending { background: rgba(217, 119, 6, .12); color: var(--th-warning); }

/* Pricing */
.th-pricing-tabs {
    display: inline-flex;
    background: var(--th-soft-2);
    padding: .3rem;
    border-radius: 999px;
    margin: 0 auto 2rem;
    border: 1px solid var(--th-border);
}
.th-pricing-tab {
    padding: .55rem 1.4rem;
    background: transparent;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    color: var(--th-muted);
    cursor: pointer;
    transition: all .2s ease;
    font-size: .92rem;
}
.th-pricing-tab.active {
    background: #fff;
    color: var(--th-primary);
    box-shadow: var(--th-shadow);
}

.th-pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.75rem;
    align-items: stretch;
}

.th-pricing-grid-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.th-ssl-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}
.th-ssl-grid .th-price-card:nth-child(n+13) {
    display: none;
}
/* Prevent the featured card's scale() from overflowing into neighbours */
.th-ssl-grid .th-price-card.featured {
    transform: none;
    border-width: 2px;
    border-color: var(--th-primary);
    box-shadow: 0 8px 32px rgba(5, 150, 105, .18);
    z-index: 1;
}
.th-ssl-grid .th-price-card.featured:hover {
    transform: translateY(-4px);
}
/* Badge needs room above the card — add top padding to featured cards */
.th-ssl-grid .th-price-card.featured {
    padding-top: 2.5rem;
}
/* Tighten the price number so it fits 4 narrow columns */
.th-ssl-grid .th-price-amount .value {
    font-size: 2.1rem;
}
/* Don't reserve empty space for missing descriptions */
.th-ssl-grid .th-price-desc {
    min-height: 0;
}
/* Ensure card content never overflows its box */
.th-ssl-grid .th-price-card {
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
}
@media (max-width: 991px) {
    .th-ssl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .th-ssl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .th-pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .th-pricing-grid {
        grid-template-columns: 1fr;
    }
}
.th-price-card {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all .25s ease;
    position: relative;
    height: 100%;
}
.th-price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--th-shadow-lg);
}
.th-price-card.featured {
    border: 2px solid var(--th-primary);
    box-shadow: 0 20px 50px rgba(5, 150, 105, .15);
    transform: scale(1.02);
}
.th-price-card.featured:hover { transform: scale(1.02) translateY(-4px); }
.th-price-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--th-accent), var(--th-accent-light));
    color: #fff;
    padding: .25rem .9rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.th-price-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: .5rem;
}
.th-price-desc {
    color: var(--th-muted);
    font-size: .9rem;
    margin-bottom: 1.25rem;
    min-height: 2.6rem;
}
.th-price-amount {
    display: flex;
    align-items: baseline;
    gap: .25rem;
    margin-bottom: .25rem;
}
.th-price-amount .currency { font-size: 1.1rem; font-weight: 700; color: var(--th-ink); }
.th-price-amount .value { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--th-ink); }
.th-price-amount .period { font-size: .9rem; color: var(--th-muted); }
.th-price-original {
    color: var(--th-muted);
    text-decoration: line-through;
    font-size: .9rem;
    margin-bottom: 1.25rem;
    min-height: 1.2rem;
}
.th-price-renew {
    color: var(--th-muted);
    font-size: .8rem;
    margin: 0 0 1.25rem;
}
.th-price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex: 1;
}
.th-price-features li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .45rem 0;
    font-size: .92rem;
    color: var(--th-ink-soft);
}
.th-price-features li svg {
    width: 18px; height: 18px;
    color: var(--th-primary);
    flex-shrink: 0;
    margin-top: 1px;
}
.th-price-features li.no { color: var(--th-muted); }
.th-price-features li.no svg { color: var(--th-muted); }

/* CTA banner */
.th-cta {
    position: relative;
    background: linear-gradient(135deg, var(--th-primary), var(--th-primary-dark));
    color: #fff;
    border-radius: var(--th-radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    overflow: hidden;
}
.th-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 32px 32px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    pointer-events: none;
}
.th-cta > * { position: relative; z-index: 1; }
.th-cta h2 { color: #fff; margin-bottom: 1rem; font-size: 2rem; }
.th-cta p { color: rgba(255,255,255,.9); margin-bottom: 1.75rem; font-size: 1.1rem; }
.th-cta .th-btn-primary {
    background: #fff;
    color: var(--th-primary-dark);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.th-cta .th-btn-primary:hover { color: var(--th-primary-dark); background: #fff; }
.th-cta .th-btn-secondary {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.25);
}
.th-cta .th-btn-secondary:hover { background: rgba(255,255,255,.25); color: #fff; }

/* FAQ */
.th-faq { max-width: 800px; margin: 0 auto; }
.th-faq-item {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all .2s ease;
}
.th-faq-item.open { border-color: var(--th-primary); }
.th-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: 0;
    text-align: left;
    font-weight: 700;
    color: var(--th-ink);
    cursor: pointer;
    font-size: 1rem;
}
.th-faq-question svg { width: 20px; height: 20px; color: var(--th-muted); transition: transform .2s ease; flex-shrink: 0; }
.th-faq-item.open .th-faq-question svg { transform: rotate(180deg); color: var(--th-primary); }
.th-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    color: var(--th-muted);
}
.th-faq-answer-inner { padding: 0 1.5rem 1.25rem; line-height: 1.7; }
.th-faq-item.open .th-faq-answer { max-height: 500px; }

/* Testimonials */
.th-testimonial {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    padding: 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.th-testimonial-quote {
    color: var(--th-muted);
    font-style: italic;
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.7;
}
.th-testimonial-quote::before {
    content: "\201C";
    font-size: 3rem;
    line-height: 0;
    color: var(--th-primary);
    font-family: Georgia, serif;
    margin-right: .25rem;
    vertical-align: -0.4em;
}
.th-testimonial-stars { color: var(--th-accent); margin-bottom: .75rem; letter-spacing: 2px; }
.th-testimonial-author { display: flex; align-items: center; gap: .75rem; }
.th-testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--th-primary), var(--th-accent));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}
.th-testimonial-author strong { display: block; color: var(--th-ink); font-size: .92rem; }
.th-testimonial-author small { color: var(--th-muted); font-size: .8rem; }

/* Auth pages */
.th-auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}
.th-auth-card {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--th-shadow);
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}
.th-auth-card h1 {
    font-size: 1.65rem;
    margin-bottom: .5rem;
    text-align: center;
}
.th-auth-card .th-auth-sub {
    text-align: center;
    color: var(--th-muted);
    margin-bottom: 1.75rem;
}
.th-auth-card .form-control,
.th-auth-card .form-select {
    padding: .75rem 1rem;
    border-radius: var(--th-radius-sm);
    border: 1.5px solid var(--th-border);
}
.th-auth-card .form-control:focus,
.th-auth-card .form-select:focus {
    border-color: var(--th-primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
}
.th-auth-card .form-label { font-weight: 600; font-size: .9rem; }
.th-auth-divider {
    text-align: center;
    color: var(--th-muted);
    margin: 1.25rem 0;
    font-size: .85rem;
    position: relative;
}
.th-auth-divider::before,
.th-auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--th-border);
}
.th-auth-divider::before { left: 0; }
.th-auth-divider::after { right: 0; }
.th-auth-foot {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--th-muted);
    font-size: .9rem;
}
.th-auth-foot a { color: var(--th-primary); font-weight: 600; }

/* Cart / checkout */
.th-cart-table {
    background: #fff;
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius);
    overflow: hidden;
}
.th-cart-table table { width: 100%; margin: 0; }