/* ============================================================
   BD Token Hub store category page
   Scoped entirely under .bd-tokenhub — no global selectors.
   ============================================================ */

.bd-tokenhub {
    --bdth-red: #BF1E50;
    --bdth-red-dark: #a51a45;
    --bdth-ink: #1f2430;
    --bdth-muted: #5c6470;
    --bdth-line: #e8e9ee;
    --bdth-soft: #f7f8fa;
    --bdth-radius: 12px;
    color: var(--bdth-ink);
}

/* ---------- HERO ---------- */
.bd-tokenhub .bdth-hero {
    background: linear-gradient(180deg, #ffffff 0%, var(--bdth-soft) 100%);
    border-bottom: 1px solid var(--bdth-line);
    padding: 42px 0 34px;
}
.bd-tokenhub .bdth-badge {
    display: inline-block;
    background: rgba(191, 30, 80, .08);
    color: var(--bdth-red);
    border: 1px solid rgba(191, 30, 80, .18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 5px 13px;
    margin-bottom: 16px;
}
.bd-tokenhub .bdth-h1 {
    font-size: 40px;
    line-height: 1.12;
    font-weight: 700;
    margin: 0 0 14px;
    letter-spacing: -.015em;
}
.bd-tokenhub .bdth-sub {
    font-size: 17px;
    line-height: 1.6;
    color: var(--bdth-muted);
    max-width: 540px;
    margin: 0 0 24px;
}
.bd-tokenhub .bdth-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.bd-tokenhub .bdth-btn {
    border-radius: 8px;
    padding: 11px 22px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.bd-tokenhub .bdth-btn-primary { background: var(--bdth-red); color: #fff; }
.bd-tokenhub .bdth-btn-primary:hover { background: var(--bdth-red-dark); color: #fff; }
.bd-tokenhub .bdth-btn-ghost { background: transparent; color: var(--bdth-ink); border-color: var(--bdth-line); }
.bd-tokenhub .bdth-btn-ghost:hover { border-color: var(--bdth-red); color: var(--bdth-red); }
.bd-tokenhub .bdth-btn-lg { padding: 13px 30px; font-size: 16px; }

/* ---------- TERMINAL ---------- */
.bd-tokenhub .bdth-terminal {
    background: #14161c;
    border-radius: var(--bdth-radius);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(20, 22, 28, .18);
}
.bd-tokenhub .bdth-term-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    background: #1c1f27;
    border-bottom: 1px solid #262a34;
}
.bd-tokenhub .bdth-term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3f4b; }
.bd-tokenhub .bdth-term-bar i:first-child { background: #ff5f57; }
.bd-tokenhub .bdth-term-bar i:nth-child(2) { background: #febc2e; }
.bd-tokenhub .bdth-term-bar i:nth-child(3) { background: #28c840; }
.bd-tokenhub .bdth-term-bar span {
    margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px; color: #7d8593;
}
.bd-tokenhub .bdth-terminal pre {
    margin: 0; padding: 18px 16px;
    color: #d6dae2;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px; line-height: 1.7;
    white-space: pre;
    overflow-x: hidden;
}
.bd-tokenhub .bdth-term-foot {
    padding: 10px 16px;
    border-top: 1px solid #262a34;
    color: #8b93a1;
    font-size: 12px;
}

/* ---------- STATS ---------- */
.bd-tokenhub .bdth-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 38px;
}
.bd-tokenhub .bdth-stat {
    background: #fff;
    border: 1px solid var(--bdth-line);
    border-radius: 10px;
    padding: 16px 18px;
}
.bd-tokenhub .bdth-stat strong {
    display: block;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--bdth-ink);
}
.bd-tokenhub .bdth-stat span { display: block; font-size: 13px; color: var(--bdth-muted); margin-top: 2px; }

/* ---------- SECTIONS ---------- */
.bd-tokenhub .bdth-section { padding: 52px 0; }
.bd-tokenhub .bdth-section-alt { background: var(--bdth-soft); border-top: 1px solid var(--bdth-line); border-bottom: 1px solid var(--bdth-line); }
.bd-tokenhub .bdth-sec-head { max-width: 640px; margin: 0 auto 30px; text-align: center; }
.bd-tokenhub .bdth-sec-head-left { margin: 0 0 20px; text-align: left; }
.bd-tokenhub .bdth-kicker {
    display: block;
    font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--bdth-red); margin-bottom: 8px;
}
.bd-tokenhub .bdth-sec-head h2 { font-size: 27px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.01em; }
.bd-tokenhub .bdth-sec-sub { color: var(--bdth-muted); font-size: 15.5px; line-height: 1.6; margin: 0; }

/* ---------- MODELS ---------- */
.bd-tokenhub .bdth-models { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.bd-tokenhub .bdth-model {
    background: #fff;
    border: 1px solid var(--bdth-line);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.bd-tokenhub .bdth-model:hover { border-color: rgba(191,30,80,.35); box-shadow: 0 6px 18px rgba(31,36,48,.06); }
.bd-tokenhub .bdth-model code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px; color: var(--bdth-ink); background: none; padding: 0; border: 0;
}

/* ---------- TOOLS ---------- */
.bd-tokenhub .bdth-tools { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bd-tokenhub .bdth-tool {
    background: #fff; border: 1px solid var(--bdth-line); border-radius: 999px;
    padding: 9px 18px; font-size: 14px; font-weight: 600; color: var(--bdth-ink);
}
.bd-tokenhub .bdth-tool:last-child { background: var(--bdth-red); border-color: var(--bdth-red); color: #fff; }

/* ---------- STEPS ---------- */
.bd-tokenhub .bdth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bd-tokenhub .bdth-step {
    background: #fff; border: 1px solid var(--bdth-line); border-radius: var(--bdth-radius); padding: 26px 24px;
}
.bd-tokenhub .bdth-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bdth-red); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.bd-tokenhub .bdth-step h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 8px; }
.bd-tokenhub .bdth-step p { color: var(--bdth-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }

/* ---------- ORDER ---------- */
.bd-tokenhub .bdth-section-order { background: var(--bdth-soft); border-top: 1px solid var(--bdth-line); }
.bd-tokenhub .bdth-notes { list-style: none; padding: 0; margin: 0; }
.bd-tokenhub .bdth-notes li {
    position: relative; padding: 0 0 0 22px; margin: 0 0 11px;
    color: var(--bdth-muted); font-size: 14.5px; line-height: 1.55;
}
.bd-tokenhub .bdth-notes li::before {
    content: ""; position: absolute; left: 0; top: 8px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--bdth-red);
}
.bd-tokenhub .bdth-order-card {
    background: #fff; border: 1px solid var(--bdth-line); border-radius: var(--bdth-radius);
    padding: 24px 26px; box-shadow: 0 10px 30px rgba(31,36,48,.05);
}
.bd-tokenhub .bdth-order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.bd-tokenhub .bdth-order-name { font-size: 18px; font-weight: 700; }
.bd-tokenhub .bdth-order-price { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
.bd-tokenhub .bdth-order-body { color: var(--bdth-muted); font-size: 14.5px; line-height: 1.6; margin: 10px 0 18px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
    .bd-tokenhub .bdth-h1 { font-size: 32px; }
    .bd-tokenhub .bdth-models { grid-template-columns: repeat(2, 1fr); }
    .bd-tokenhub .bdth-steps { grid-template-columns: 1fr; }
    .bd-tokenhub .bdth-terminal { margin-top: 26px; }
}
@media (max-width: 575px) {
    .bd-tokenhub .bdth-stats { grid-template-columns: repeat(2, 1fr); }
    .bd-tokenhub .bdth-section { padding: 38px 0; }
    .bd-tokenhub .bdth-h1 { font-size: 27px; }
    .bd-tokenhub .bdth-model code { font-size: 12px; }
}

.bd-tokenhub .bdth-order-price small {
    display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: var(--bdth-muted); margin-bottom: 2px;
}

/* ---------- CREDIT PRESET PICKER (Token Hub configure page) ---------- */
.bdth-credits-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bdth-credits-title { font-size: 16px; font-weight: 700; color: #1f2430; }
.bdth-credits-hint { font-size: 13px; color: #5c6470; }
.bdth-credit-input { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; border: 0; padding: 0; }
.bdth-credit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bdth-credit-opt {
    background: #fff; border: 1px solid #e8e9ee; border-radius: 10px; padding: 14px 10px;
    text-align: center; cursor: pointer; margin: 0;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.bdth-credit-opt:hover { border-color: rgba(191, 30, 80, .4); }
.bdth-credit-opt strong { display: block; font-size: 20px; font-weight: 700; color: #1f2430; line-height: 1.2; }
.bdth-credit-opt span { display: block; font-size: 12px; color: #5c6470; margin-top: 1px; }
.bdth-credit-opt em { display: block; font-style: normal; font-size: 14px; font-weight: 700; color: #BF1E50; margin-top: 6px; }
.bdth-credit-opt.is-active { border-color: #BF1E50; box-shadow: 0 0 0 2px rgba(191, 30, 80, .12); background: #fff8fa; }
.bdth-credit-opt.is-active strong { color: #BF1E50; }
.bdth-credit-summary {
    margin-top: 14px; background: #f7f8fa; border: 1px solid #e8e9ee; border-radius: 8px;
    padding: 12px 14px; font-size: 14.5px; color: #5c6470;
}
.bdth-credit-summary strong { color: #1f2430; }
.bdth-credit-note { margin: 10px 0 0; font-size: 13px; color: #5c6470; }
@media (max-width: 575px) { .bdth-credit-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CREDIT PICKER (radio cards) ---------- */
.bdth-credits { border: 1px solid #e8e9ee; border-radius: 12px; padding: 20px 22px; background: #fff; }
.bdth-credits-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bdth-credits-title { font-size: 17px; font-weight: 700; color: #1f2430; letter-spacing: -.01em; }
.bdth-credits-hint { font-size: 13px; color: #5c6470; }
.bdth-credit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bdth-credit-opt {
    position: relative; display: block; margin: 0; cursor: pointer;
    background: #fff; border: 1px solid #e4e6ec; border-radius: 10px; padding: 16px 10px 14px;
    text-align: center; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
}
.bdth-credit-opt:hover { border-color: rgba(191, 30, 80, .45); box-shadow: 0 6px 16px rgba(31, 36, 48, .06); }
.bdth-credit-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.bdth-credit-num { display: block; font-size: 21px; font-weight: 700; line-height: 1.15; color: #1f2430; letter-spacing: -.015em; }
.bdth-credit-unit { display: block; font-size: 11.5px; color: #7b8290; margin-top: 2px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.bdth-credit-price { display: block; font-size: 15px; font-weight: 700; color: #BF1E50; margin-top: 10px; }
.bdth-credit-opt.is-active { border-color: #BF1E50; background: #fff8fa; box-shadow: 0 0 0 2px rgba(191, 30, 80, .12); }
.bdth-credit-opt.is-active .bdth-credit-num { color: #BF1E50; }
.bdth-credit-opt:focus-within { box-shadow: 0 0 0 3px rgba(191, 30, 80, .28); border-color: #BF1E50; }
.bdth-credit-summary {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
    margin-top: 16px; background: #f7f8fa; border: 1px solid #e8e9ee; border-radius: 10px; padding: 13px 16px;
    font-size: 14.5px; color: #5c6470;
}
.bdth-credit-summary strong { color: #1f2430; font-size: 16px; font-weight: 700; }
.bdth-credit-summary-label, .bdth-credit-summary-for { color: #5c6470; }
.bdth-credit-summary-rate { margin-left: auto; font-size: 13px; color: #7b8290; }
.bdth-credit-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: #7b8290; }
@media (max-width: 575px) {
    .bdth-credit-grid { grid-template-columns: repeat(2, 1fr); }
    .bdth-credit-summary-rate { margin-left: 0; width: 100%; }
}

/* ============================================================
   LAYOUT FIX  (Token Hub pages only - this file is only loaded
   by the bd_tokenhub order form)
   The credit grid was forcing .secondary-cart-body wider than its
   65% float, which pushed .secondary-cart-sidebar (order summary)
   below the content. flow-root makes the column honour its width.
   ============================================================ */
#order-standard_cart .secondary-cart-body { display: flow-root; }
#order-standard_cart .secondary-cart-sidebar { display: flow-root; }
#order-standard_cart .cart-body { display: flow-root; }

/* grid must never force its column wider */
.bdth-credits { min-width: 0; }
.bdth-credit-grid { grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); min-width: 0; }
.bdth-credit-opt { min-width: 0; }

/* higher specificity - the theme styles label spans */
.bdth-credits .bdth-credit-num { display: block; font-size: 21px; font-weight: 700; line-height: 1.15; color: #1f2430; letter-spacing: -.015em; }
.bdth-credits .bdth-credit-unit { display: block; font-size: 11.5px; color: #7b8290; margin-top: 2px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.bdth-credits .bdth-credit-price { display: block; font-size: 15px; font-weight: 700; color: #BF1E50; margin-top: 10px; }
.bdth-credits .bdth-credit-opt.is-active .bdth-credit-num { color: #BF1E50; }
.bdth-credits .bdth-credit-opt.is-active { border-color: #BF1E50; background: #fff8fa; box-shadow: 0 0 0 2px rgba(191, 30, 80, .12); }
.bdth-credits .bdth-credits-title { display: block; font-size: 17px; font-weight: 700; color: #1f2430; }
.bdth-credits .bdth-credits-hint { display: block; font-size: 13px; color: #5c6470; }
.bdth-credits .bdth-credit-summary strong { font-size: 16px; font-weight: 700; color: #1f2430; }
.bdth-credits .bdth-credit-summary-label,
.bdth-credits .bdth-credit-summary-for { color: #5c6470; font-weight: 400; }
.bdth-credits .bdth-credit-summary-rate { color: #7b8290; font-size: 13px; }
.bdth-credits .bdth-credit-note { color: #7b8290; font-size: 13px; }

/* the Token Hub email field should look like part of the form, not a stray bar */
#order-standard_cart .field-container {
    border: 1px solid #e8e9ee; border-radius: 12px; padding: 18px 20px; background: #fff; margin-bottom: 18px;
}
#order-standard_cart .field-container .form-group { margin-bottom: 0; }
#order-standard_cart .field-container label { font-weight: 600; color: #1f2430; font-size: 14px; }
#order-standard_cart .field-container input.form-control {
    border-radius: 8px; padding: 10px 12px; border-color: #dfe1e6; font-size: 14.5px;
}
#order-standard_cart .field-container input.form-control:focus {
    border-color: #BF1E50; box-shadow: 0 0 0 3px rgba(191, 30, 80, .12);
}

/* the theme JS injects an inline position/offset on every radio - override it
   so the native radio stays usable inside its card */
.bdth-credits .bdth-credit-radio {
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 1px !important; height: 1px !important; opacity: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important;
    z-index: 1 !important; cursor: pointer !important;
}

/* selection state driven by CSS so it can never drift from the radio */
.bdth-credits .bdth-credit-opt:has(.bdth-credit-radio:checked) {
    border-color: #BF1E50 !important; background: #fff8fa !important;
    box-shadow: 0 0 0 2px rgba(191, 30, 80, .12) !important;
}
.bdth-credits .bdth-credit-opt:has(.bdth-credit-radio:checked) .bdth-credit-num { color: #BF1E50 !important; }
.bdth-credits .bdth-credit-opt:focus-within { box-shadow: 0 0 0 3px rgba(191, 30, 80, .28) !important; }

/* ---------- PRICING TIERS ---------- */
.bdth-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 30px; }
.bdth-tier {
    position: relative; background: #fff; border: 1px solid #e4e6ec; border-radius: 12px;
    padding: 24px 18px 18px; text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.bdth-tier:hover { border-color: rgba(191, 30, 80, .45); box-shadow: 0 10px 26px rgba(31, 36, 48, .07); transform: translateY(-2px); }
.bdth-tier-hot { border-color: #BF1E50; box-shadow: 0 10px 30px rgba(191, 30, 80, .12); }
.bdth-tier-flag {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    background: #BF1E50; color: #fff; font-size: 10.5px; font-weight: 700;
    letter-spacing: .09em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px;
    white-space: nowrap;
}
.bdth-tier-buy { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #1f2430; line-height: 1.1; }
.bdth-tier-buy span { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7b8290; margin-top: 3px; }
.bdth-tier-bonus {
    display: inline-block; margin-top: 14px; background: rgba(191, 30, 80, .08); color: #BF1E50;
    border: 1px solid rgba(191, 30, 80, .22); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 4px 12px;
}
.bdth-tier-get { margin-top: 10px; font-size: 14px; color: #5c6470; }
.bdth-tier-price { margin-top: 10px; font-size: 24px; font-weight: 700; color: #1f2430; letter-spacing: -.02em; }
.bdth-tier-btn { margin-top: 16px; width: 100%; }
.bdth-order-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 991px) {
    .bdth-tiers { grid-template-columns: repeat(2, 1fr); }
    .bdth-order-foot { grid-template-columns: 1fr; }
}
@media (max-width: 575px) { .bdth-tiers { grid-template-columns: 1fr; } }

/* ---------- CREDIT CARD BONUS ---------- */
.bdth-credits .bdth-credit-bonus {
    display: inline-block; margin-top: 10px; background: rgba(191, 30, 80, .08); color: #BF1E50;
    border: 1px solid rgba(191, 30, 80, .22); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 3px 10px;
}
.bdth-credits .bdth-credit-bonus-none { background: #f1f2f5; color: #7b8290; border-color: #e4e6ec; }
.bdth-credits .bdth-credit-get { display: block; font-size: 12.5px; color: #5c6470; margin-top: 8px; }
.bdth-credits .bdth-credit-opt.is-active .bdth-credit-get { color: #1f2430; font-weight: 600; }

.bdth-tier-more { margin-top: 22px; text-align: center; font-size: 14px; color: #5c6470; }
.bdth-tier-more a { color: #BF1E50; font-weight: 600; text-decoration: underline; }
.bdth-tier-more a:hover { color: #8f1740; }
