/* ==========================================================================
   TCG Grading Flow — Wizard Styles (Gradeit theme)
   Palette: #F15F51 #F8AA4A #FBCC0A #60C7CB #FFFFFF #0D0908
   ========================================================================== */

:root {
    /* Gradeit brand */
    --tgf-gradeit-coral:   #F15F51;
    --tgf-gradeit-orange:  #F8AA4A;
    --tgf-gradeit-yellow:  #FBCC0A;
    --tgf-gradeit-teal:    #60C7CB;
    --tgf-gradeit-white:   #FFFFFF;
    --tgf-gradeit-charcoal:#0D0908;

    /* Semantic (kept names for existing rules) */
    --tgf-green:      var(--tgf-gradeit-coral);
    --tgf-green-dk:   #d94a3d;
    --tgf-green-lt:   rgba(241, 95, 81, 0.12);
    --tgf-green-glow: rgba(241, 95, 81, 0.22);
    --tgf-teal:       var(--tgf-gradeit-teal);
    --tgf-teal-dk:    #4aaeb2;
    --tgf-teal-lt:    rgba(96, 199, 203, 0.18);
    --tgf-border:     rgba(13, 9, 8, 0.14);
    --tgf-border-sel: var(--tgf-gradeit-coral);
    --tgf-text-body:  var(--tgf-gradeit-charcoal);
    --tgf-text-muted: #5c514f;
    --tgf-text-dim:   #8a7e7c;
    --tgf-opt-accent: #2a8a8f;
    --tgf-danger:     #c43d32;
    --tgf-radius:     14px;
    --tgf-radius-sm:  8px;
    --tgf-trans:      0.18s ease;
}

/* --------------------------------------------------------------------------
   Container — no background, inherits page
   -------------------------------------------------------------------------- */
#tgf-wizard,
.tgf-wizard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.55;
    color: var(--tgf-text-body);
}

/* --------------------------------------------------------------------------
   Progress bar
   -------------------------------------------------------------------------- */
.tgf-progress-bar {
    padding: 24px 0 36px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#tgf-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 280px;
}

.tgf-prog-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tgf-prog-bubble {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.12);
    color: var(--tgf-text-dim);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tgf-trans);
}
.tgf-prog-bubble svg { width: 15px; height: 15px; }

.tgf-prog-step.active .tgf-prog-bubble {
    background: var(--tgf-gradeit-coral);
    border-color: var(--tgf-gradeit-coral);
    color: var(--tgf-gradeit-white);
    box-shadow: 0 0 0 4px var(--tgf-green-glow);
}
/* Done step colours set inline via --tgf-done-bg / --tgf-done-fg (wizard.js) */
.tgf-prog-step.done .tgf-prog-bubble {
    background: var(--tgf-done-bg, var(--tgf-teal-dk));
    border-color: var(--tgf-done-bg, var(--tgf-teal-dk));
    color: var(--tgf-done-fg, var(--tgf-gradeit-white));
}

.tgf-prog-label {
    font-size: 11px;
    color: var(--tgf-text-dim);
    white-space: nowrap;
}
.tgf-prog-step.active .tgf-prog-label { color: var(--tgf-gradeit-coral); font-weight: 600; }
.tgf-prog-step.done  .tgf-prog-label { color: var(--tgf-done-bg, var(--tgf-teal-dk)); font-weight: 600; }

.tgf-prog-line {
    height: 2px;
    flex: 1;
    min-width: 16px;
    max-width: 72px;
    background: rgba(13, 9, 8, 0.1);
    margin-bottom: 20px;
    transition: background var(--tgf-trans);
}
/* Connector gradient matches adjacent completed steps (--line-from / --line-to from JS) */
.tgf-prog-line.done {
    background: linear-gradient(90deg, var(--line-from, var(--tgf-teal)), var(--line-to, var(--tgf-gradeit-yellow)));
}

@media (max-width: 400px) {
    .tgf-prog-label { font-size: 9px; max-width: 44px; white-space: normal; text-align: center; line-height: 1.2; }
    .tgf-prog-bubble { width: 28px; height: 28px; font-size: 11px; }
    .tgf-prog-line { min-width: 6px; }
}
@media (max-width: 320px) {
    .tgf-prog-label { display: none; }
}

/* --------------------------------------------------------------------------
   Step content
   -------------------------------------------------------------------------- */
.tgf-step-content {
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* --------------------------------------------------------------------------
   Section header — centered by default on step 1 & 2, left on others
   -------------------------------------------------------------------------- */
.tgf-section-header {
    margin-bottom: 28px;
}
.tgf-section-header.centered {
    text-align: center;
}
.tgf-section-header h2 {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
}
.tgf-section-header p {
    color: var(--tgf-text-muted);
    margin: 0;
    font-size: 15px;
}

/* --------------------------------------------------------------------------
   Back button
   -------------------------------------------------------------------------- */
.tgf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px solid var(--tgf-border);
    border-radius: 20px;
    color: var(--tgf-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 14px 6px 10px;
    margin-bottom: 20px;
    transition: border-color var(--tgf-trans), color var(--tgf-trans), background var(--tgf-trans);
}
.tgf-back-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.tgf-back-btn:hover {
    border-color: var(--tgf-gradeit-coral);
    color: var(--tgf-gradeit-coral);
    background: var(--tgf-green-lt);
}

/* --------------------------------------------------------------------------
   STEP 1 — Grading Service cards
   -------------------------------------------------------------------------- */
.tgf-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 640px) {
    .tgf-services-grid { grid-template-columns: repeat(4, 1fr); }
}

.tgf-svc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    border: 2px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    padding: 28px 16px 18px;
    cursor: pointer;
    transition: border-color var(--tgf-trans), transform var(--tgf-trans), box-shadow var(--tgf-trans);
    position: relative;
}
.tgf-svc-card:hover {
    border-color: var(--tgf-gradeit-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(241, 95, 81, 0.18);
}
.tgf-svc-card.selected {
    border-color: var(--tgf-gradeit-coral);
    box-shadow: 0 0 0 3px var(--tgf-green-glow), 0 6px 20px rgba(241, 95, 81, 0.2);
    background: linear-gradient(160deg, var(--tgf-green-lt) 0%, var(--tgf-teal-lt) 100%);
}

/* Paused service card — grayed out, banner, click blocked */
.tgf-svc-card--paused {
    cursor: not-allowed;
    background: #fafafa;
    border-color: #d1d5db;
    opacity: 0.65;
    filter: grayscale(0.85);
    padding-top: 44px;
}
.tgf-svc-card--paused:hover {
    border-color: #d1d5db;
    transform: none;
    box-shadow: none;
}
.tgf-svc-card--paused .tgf-svc-name,
.tgf-svc-card--paused .tgf-svc-price,
.tgf-svc-card--paused .tgf-svc-desc {
    color: #6b7280;
}
.tgf-svc-card--paused .tgf-svc-details-btn {
    opacity: 0.7;
}
.tgf-svc-paused-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-top-left-radius: var(--tgf-radius);
    border-top-right-radius: var(--tgf-radius);
    text-align: center;
}

.tgf-modal-paused-note {
    margin: 16px 0;
    padding: 14px 16px;
    background: #f3f4f6;
    border-left: 4px solid #1f2937;
    border-radius: 4px;
    color: #1f2937;
    font-size: 14px;
}
.tgf-modal-paused-note strong { text-transform: uppercase; letter-spacing: 0.05em; }
.tgf-modal-paused-note span { display: inline-block; margin-top: 4px; color: #4b5563; font-size: 13px; }
.tgf-modal-select[disabled] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* Logo: just the image as-is, no filter */
.tgf-svc-logo {
    width: 100%;
    max-width: 130px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tgf-svc-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.tgf-svc-card.selected .tgf-svc-logo {
    height: 96px;
    max-width: 160px;
}
.tgf-svc-initials {
    font-size: 30px;
    font-weight: 800;
    color: var(--tgf-green);
}

.tgf-svc-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
}
.tgf-svc-price {
    font-size: 14px;
    color: var(--tgf-green);
    font-weight: 700;
}
.tgf-svc-price .woocommerce-Price-amount,
.tgf-svc-price .woocommerce-Price-currencySymbol { color: var(--tgf-green); }

.tgf-svc-desc {
    font-size: 12px;
    color: var(--tgf-text-muted);
    line-height: 1.45;
    flex: 1;
}

.tgf-svc-details-btn {
    margin-top: 6px;
    background: none;
    border: 1.5px solid var(--tgf-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tgf-text-muted);
    cursor: pointer;
    transition: border-color var(--tgf-trans), color var(--tgf-trans);
}
.tgf-svc-details-btn:hover {
    border-color: var(--tgf-green);
    color: var(--tgf-green);
}

/* Selected check badge */
.tgf-svc-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tgf-green);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity var(--tgf-trans), transform var(--tgf-trans);
}
.tgf-svc-check svg { width: 12px; height: 12px; color: #fff; }
.tgf-svc-card.selected .tgf-svc-check { opacity: 1; transform: scale(1); }

/* --------------------------------------------------------------------------
   Modal — service details overlay
   -------------------------------------------------------------------------- */
#tgf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#tgf-modal-overlay.visible { opacity: 1; }

/* Modal — flex column so topbar never scrolls */
.tgf-modal {
    background: #fff;
    border-radius: var(--tgf-radius);
    max-width: 780px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;          /* clip to border-radius */
    transform: translateY(12px);
    transition: transform 0.22s ease;
    color: #222;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
#tgf-modal-overlay.visible .tgf-modal { transform: translateY(0); }

/* Non-scrolling topbar with close button */
.tgf-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.09);
    flex-shrink: 0;
    background: #fff;
}
.tgf-modal-topbar-name {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tgf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.07);
    font-size: 13px;
    cursor: pointer;
    color: #555;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.tgf-modal-close:hover { background: rgba(0,0,0,0.16); color: #111; }

/* Scrollable body area */
.tgf-modal-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Gallery inside scrollable area */
.tgf-modal-gallery { background: #f5f5f5; }
.tgf-modal-main-img {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.tgf-modal-main-img img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.15s ease;
}
.tgf-modal-main-img img:hover { transform: scale(1.03); }
.tgf-modal-thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0,0,0,0.08);
    overflow-x: auto;
}
.tgf-modal-thumb {
    width: 56px; height: 56px;
    object-fit: contain;
    border-radius: 6px;
    border: 2px solid transparent;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    padding: 3px;
    transition: border-color var(--tgf-trans);
}
.tgf-modal-thumb:hover  { border-color: rgba(241, 95, 81, 0.45); }
.tgf-modal-thumb.active { border-color: var(--tgf-gradeit-coral); }

.tgf-modal-body { padding: 22px 26px 28px; }
.tgf-modal-title { font-size: 21px; font-weight: 700; margin: 0 0 8px; color: #111; }
.tgf-modal-price { font-size: 20px; font-weight: 700; color: var(--tgf-green); margin-bottom: 16px; }
.tgf-modal-price span { font-size: 13px; font-weight: 400; color: #888; }
.tgf-modal-price .woocommerce-Price-amount { color: var(--tgf-green); }
.tgf-modal-desc { font-size: 14px; line-height: 1.65; color: #444; margin-bottom: 24px; }
.tgf-modal-desc p { margin: 0 0 10px; }
.tgf-modal-desc p:last-child { margin-bottom: 0; }
.tgf-modal-select { width: 100%; }

/* ── Lightbox ── */
#tgf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: zoom-out;
}
#tgf-lightbox.visible { opacity: 1; }
.tgf-lb-inner {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tgf-lb-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
    display: block;
}
.tgf-lb-close {
    position: absolute;
    top: -16px; right: -16px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    color: #222;
    transition: background 0.15s;
    z-index: 1;
}
.tgf-lb-close:hover { background: #f0f0f0; }

/* --------------------------------------------------------------------------
   STEP 2 — Collectable type tiles
   Bigger, centered, no fill background
   -------------------------------------------------------------------------- */
.tgf-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 480px) {
    .tgf-types-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 680px) {
    .tgf-types-grid { grid-template-columns: repeat(4, 1fr); }
}

.tgf-type-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    padding: 32px 16px;
    cursor: pointer;
    text-align: center;
    position: relative;
    transition: border-color var(--tgf-trans), transform var(--tgf-trans), box-shadow var(--tgf-trans);
    min-height: 130px;
}
.tgf-type-tile:hover {
    border-color: var(--tgf-gradeit-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(248, 170, 74, 0.25);
}
.tgf-type-tile.selected {
    border-color: var(--tgf-gradeit-coral);
    background: linear-gradient(145deg, var(--tgf-green-lt) 0%, rgba(251, 204, 10, 0.12) 100%);
    box-shadow: 0 0 0 3px var(--tgf-green-glow);
}

.tgf-type-icon { font-size: 38px; line-height: 1; }
.tgf-type-icon--logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
.tgf-type-icon--logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.tgf-type-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--tgf-text-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    text-align: center;
}

/* TCG category step — search + favourites */
.tgf-tcg-cat-search-wrap {
    margin-bottom: 8px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.tgf-tcg-cat-hint {
    text-align: center;
    font-size: 13px;
    color: var(--tgf-text-muted);
    margin: 0 auto 16px;
    line-height: 1.45;
    max-width: 520px;
}
.tgf-tcg-cat-empty { padding: 20px 16px; }
.tgf-tcg-fav-badge {
    color: var(--tgf-gradeit-yellow);
    font-size: 12px;
    line-height: 1;
}

.tgf-tile-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tgf-green);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity var(--tgf-trans), transform var(--tgf-trans);
}
.tgf-tile-check svg { width: 11px; height: 11px; color: #fff; }
.tgf-type-tile.selected .tgf-tile-check { opacity: 1; transform: scale(1); }

/* --------------------------------------------------------------------------
   STEP 3 — Two-column layout with image sidebar
   -------------------------------------------------------------------------- */
.tgf-step3-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 640px) {
    .tgf-step3-layout {
        grid-template-columns: 1fr;
    }
}
.tgf-step3-images {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tgf-step3-main-img {
    border-radius: var(--tgf-radius);
    overflow: hidden;
    border: 1.5px solid var(--tgf-border);
    background: #f8f7f7;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    position: relative;
}
.tgf-step3-main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.15s ease;
}
.tgf-step3-main-img:hover img {
    transform: scale(1.03);
}
.tgf-step3-zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    opacity: 0.8;
}
.tgf-step3-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tgf-step3-thumb {
    width: 68px;
    height: 68px;
    border-radius: var(--tgf-radius-sm);
    border: 2px solid var(--tgf-border);
    overflow: hidden;
    cursor: pointer;
    background: #f8f7f7;
    transition: border-color var(--tgf-trans);
    flex-shrink: 0;
}
.tgf-step3-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.tgf-step3-thumb:hover,
.tgf-step3-thumb.active {
    border-color: var(--tgf-gradeit-coral);
}
.tgf-step3-options {
    min-width: 0;
}
@media (max-width: 640px) {
    .tgf-step3-images {
        position: static;
        flex-direction: row;
        align-items: flex-start;
    }
    .tgf-step3-main-img {
        width: 130px;
        flex-shrink: 0;
        aspect-ratio: 3 / 4;
    }
    .tgf-step3-thumbs {
        flex-direction: row;
    }
}

/* --------------------------------------------------------------------------
   STEP 3 — Options form
   -------------------------------------------------------------------------- */
.tgf-options-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 28px;
}

.tgf-field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tgf-field-label {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tgf-teal-dk);
}
.tgf-req { color: var(--tgf-danger); }
/* Option price: green = increase, red = decrease (wizard grading options) */
.tgf-opt-price {
    font-size: 14px;
    font-weight: 700;
    margin-left: 4px;
}
.tgf-opt-price--increase { color: #15803d; }
.tgf-opt-price--decrease { color: #b91c1c; }

.tgf-price-disclaimer {
    margin: 16px 0 0;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--tgf-text-muted);
    text-align: center;
    border-top: 1px solid var(--tgf-border);
}

.tgf-radio-list,
.tgf-check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tgf-radio-item,
.tgf-check-item {
    display: grid;
    align-items: center;
    column-gap: 12px;
    row-gap: 12px;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color var(--tgf-trans), box-shadow var(--tgf-trans), background var(--tgf-trans);
}
.tgf-radio-item input[type=radio],
.tgf-check-item input[type=checkbox] { display: none; }

/* No option image: single row — control + label */
.tgf-radio-item:not(:has(.tgf-opt-img)),
.tgf-check-item:not(:has(.tgf-opt-img)) {
    grid-template-columns: auto 1fr;
}
.tgf-radio-item:not(:has(.tgf-opt-img)) .tgf-radio-dot { grid-column: 1; grid-row: 1; }
.tgf-radio-item:not(:has(.tgf-opt-img)) .tgf-radio-label { grid-column: 2; grid-row: 1; }
.tgf-check-item:not(:has(.tgf-opt-img)) .tgf-check-box { grid-column: 1; grid-row: 1; }
.tgf-check-item:not(:has(.tgf-opt-img)) .tgf-check-label { grid-column: 2; grid-row: 1; }

/* With image, not selected: dot | thumb | label */
.tgf-radio-item:has(.tgf-opt-img):not(.selected) {
    grid-template-columns: auto 56px 1fr;
}
.tgf-radio-item:has(.tgf-opt-img):not(.selected) .tgf-radio-dot { grid-column: 1; grid-row: 1; align-self: start; margin-top: 2px; }
.tgf-radio-item:has(.tgf-opt-img):not(.selected) .tgf-opt-img { grid-column: 2; grid-row: 1; }
.tgf-radio-item:has(.tgf-opt-img):not(.selected) .tgf-radio-label { grid-column: 3; grid-row: 1; }

.tgf-check-item:has(.tgf-opt-img):not(.selected) {
    grid-template-columns: auto 56px 1fr;
}
.tgf-check-item:has(.tgf-opt-img):not(.selected) .tgf-check-box { grid-column: 1; grid-row: 1; align-self: start; margin-top: 2px; }
.tgf-check-item:has(.tgf-opt-img):not(.selected) .tgf-opt-img { grid-column: 2; grid-row: 1; }
.tgf-check-item:has(.tgf-opt-img):not(.selected) .tgf-check-label { grid-column: 3; grid-row: 1; }

/* With image, selected: large hero image on top, then control + label */
.tgf-radio-item:has(.tgf-opt-img).selected {
    grid-template-columns: auto 1fr;
    background: linear-gradient(180deg, rgba(96, 199, 203, 0.08) 0%, rgba(255,255,255,0.6) 55%);
    box-shadow: 0 0 0 2px var(--tgf-gradeit-coral), 0 8px 24px rgba(13, 9, 8, 0.06);
}
.tgf-radio-item:has(.tgf-opt-img).selected .tgf-opt-img {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    max-width: min(100%, 360px);
    height: auto;
    max-height: 240px;
    min-height: 120px;
    object-fit: contain;
    justify-self: center;
    margin: 4px 0 4px;
    border-radius: 12px;
    border: 2px solid rgba(13, 9, 8, 0.08);
    box-shadow: 0 6px 20px rgba(13, 9, 8, 0.12);
    background: var(--tgf-gradeit-white);
}
.tgf-radio-item:has(.tgf-opt-img).selected .tgf-radio-dot { grid-column: 1; grid-row: 2; align-self: center; }
.tgf-radio-item:has(.tgf-opt-img).selected .tgf-radio-label { grid-column: 2; grid-row: 2; align-self: center; }

.tgf-check-item:has(.tgf-opt-img).selected {
    grid-template-columns: auto 1fr;
    background: linear-gradient(180deg, rgba(96, 199, 203, 0.08) 0%, rgba(255,255,255,0.6) 55%);
    box-shadow: 0 0 0 2px var(--tgf-gradeit-coral), 0 8px 24px rgba(13, 9, 8, 0.06);
}
.tgf-check-item:has(.tgf-opt-img).selected .tgf-opt-img {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    max-width: min(100%, 360px);
    height: auto;
    max-height: 240px;
    min-height: 120px;
    object-fit: contain;
    justify-self: center;
    margin: 4px 0 4px;
    border-radius: 12px;
    border: 2px solid rgba(13, 9, 8, 0.08);
    box-shadow: 0 6px 20px rgba(13, 9, 8, 0.12);
    background: var(--tgf-gradeit-white);
}
.tgf-check-item:has(.tgf-opt-img).selected .tgf-check-box { grid-column: 1; grid-row: 2; align-self: center; }
.tgf-check-item:has(.tgf-opt-img).selected .tgf-check-label { grid-column: 2; grid-row: 2; align-self: center; }

.tgf-radio-item:hover,
.tgf-check-item:hover { border-color: rgba(241, 95, 81, 0.35); }
.tgf-radio-item.selected,
.tgf-check-item.selected { border-color: var(--tgf-gradeit-coral); }

.tgf-radio-item.selected:not(:has(.tgf-opt-img)),
.tgf-check-item.selected:not(:has(.tgf-opt-img)) {
    background: var(--tgf-green-lt);
}

.tgf-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--tgf-trans);
}
.tgf-radio-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--tgf-green);
    transition: transform var(--tgf-trans);
}
.tgf-radio-item.selected .tgf-radio-dot { border-color: var(--tgf-green); }
.tgf-radio-item.selected .tgf-radio-dot::after { transform: translate(-50%,-50%) scale(1); }

.tgf-radio-label,
.tgf-check-label {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tgf-text-body);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.tgf-radio-item.selected .tgf-radio-label,
.tgf-check-item.selected .tgf-check-label {
    color: var(--tgf-gradeit-charcoal);
}

.tgf-check-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--tgf-trans), border-color var(--tgf-trans);
}
.tgf-check-box::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transition: opacity var(--tgf-trans);
}
.tgf-check-item.selected .tgf-check-box {
    background: var(--tgf-green);
    border-color: var(--tgf-green);
}
.tgf-check-item.selected .tgf-check-box::after { opacity: 1; }

/* --------------------------------------------------------------------------
   Custom Select Dropdown (.tgf-cs)
   -------------------------------------------------------------------------- */
.tgf-cs { position: relative; user-select: none; }

/* Trigger button */
.tgf-cs-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: var(--tgf-gradeit-white);
    color: var(--tgf-text-body);
    text-align: left;
    transition: border-color var(--tgf-trans), box-shadow var(--tgf-trans);
    font-family: inherit;
}
.tgf-cs-trigger:focus {
    outline: none;
    border-color: var(--tgf-gradeit-teal);
    box-shadow: 0 0 0 3px var(--tgf-teal-lt);
}
.tgf-cs--open .tgf-cs-trigger {
    border-color: var(--tgf-gradeit-teal);
    box-shadow: 0 0 0 3px var(--tgf-teal-lt);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Thumbnail in trigger */
.tgf-cs-thumb {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tgf-cs-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.tgf-cs-thumb .tgf-cs-placeholder-icon { width: 36px; height: 36px; }

/* Trigger label + price */
.tgf-cs-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgf-cs-price { margin-left: auto; white-space: nowrap; flex-shrink: 0; }

/* Chevron icon */
.tgf-cs-chevron {
    width: 10px; height: 10px;
    flex-shrink: 0;
    color: var(--tgf-text-muted);
    transition: transform var(--tgf-trans);
}
.tgf-cs--open .tgf-cs-chevron { transform: rotate(180deg); }

/* Dropdown list panel */
.tgf-cs-list {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--tgf-gradeit-white);
    border: 1.5px solid var(--tgf-gradeit-teal);
    border-top: none;
    border-bottom-left-radius: var(--tgf-radius-sm);
    border-bottom-right-radius: var(--tgf-radius-sm);
    box-shadow: 0 8px 28px rgba(13,9,8,0.13);
    z-index: 99999;
    max-height: 300px;
    overflow-y: auto;
}
.tgf-cs--open .tgf-cs-list { display: block; }

/* Flip upward when not enough space below */
.tgf-cs--above .tgf-cs-list {
    top: auto;
    bottom: 100%;
    border-top: 1.5px solid var(--tgf-gradeit-teal);
    border-bottom: none;
    border-radius: var(--tgf-radius-sm) var(--tgf-radius-sm) 0 0;
    box-shadow: 0 -8px 28px rgba(13,9,8,0.13);
}
.tgf-cs--above.tgf-cs--open .tgf-cs-trigger {
    border-radius: 0 0 var(--tgf-radius-sm) var(--tgf-radius-sm);
    border-top-color: transparent;
}

/* Overflow on accordion ancestors is managed by JS (csSetOverflowVisible / csRestoreOverflow)
   when a .tgf-cs opens, so the list can escape .tgf-acc-body / .tgf-acc-section clipping. */

/* Option rows */
.tgf-cs-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--tgf-trans);
}
.tgf-cs-opt + .tgf-cs-opt { border-top: 1px solid var(--tgf-border); }
.tgf-cs-opt:hover { background: rgba(96,199,203,0.10); }
.tgf-cs-opt--selected { background: rgba(241,95,81,0.07); }
.tgf-cs-opt--selected:hover { background: rgba(241,95,81,0.12); }
.tgf-cs-opt--blank { opacity: 0.55; }
.tgf-cs-opt--blank:hover { opacity: 0.85; }

/* Option thumbnail */
.tgf-cs-opt-thumb {
    flex: 0 0 40px;
    width: 40px; height: 40px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}
.tgf-cs-opt-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.tgf-cs-opt-thumb .tgf-cs-placeholder-icon { width: 40px; height: 40px; }

/* Option text body */
.tgf-cs-opt-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.tgf-cs-opt-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--tgf-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tgf-cs-opt-price { font-size: 13px; font-weight: 700; }
.tgf-cs-opt-price.tgf-opt-price--increase { color: var(--tgf-gradeit-coral); }
.tgf-cs-opt-price.tgf-opt-price--decrease { color: var(--tgf-opt-accent); }
.tgf-cs-opt-desc { font-size: 13px; color: var(--tgf-text-muted); white-space: normal; }

/* Disabled / condition-hidden state */
.tgf-field-hidden .tgf-cs-trigger { pointer-events: none; opacity: 0.45; }

/* Validation error state */
.tgf-field-error .tgf-field-label { color: var(--tgf-danger); }
.tgf-field-error .tgf-input,
.tgf-field-error .tgf-cs-trigger {
    border-color: var(--tgf-danger) !important;
    box-shadow: 0 0 0 3px rgba(196, 61, 50, 0.12);
}
.tgf-field-error .tgf-radio-list,
.tgf-field-error .tgf-check-list {
    border: 1.5px solid var(--tgf-danger);
    border-radius: var(--tgf-radius-sm);
    box-shadow: 0 0 0 3px rgba(196, 61, 50, 0.12);
}
.tgf-field-error::after {
    content: 'This field is required';
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--tgf-danger);
}

/* --------------------------------------------------------------------------
   Text input
   -------------------------------------------------------------------------- */
.tgf-input {
    width: 100%;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    background: var(--tgf-gradeit-white);
    color: var(--tgf-text-body);
    transition: border-color var(--tgf-trans), box-shadow var(--tgf-trans);
    box-sizing: border-box;
}
.tgf-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}
.tgf-input:focus {
    outline: none;
    border-color: var(--tgf-gradeit-teal);
    box-shadow: 0 0 0 3px var(--tgf-teal-lt);
}
.tgf-input::placeholder { color: var(--tgf-text-dim); }

/* --------------------------------------------------------------------------
   STEP 3 — Accordion sections (heading field type)
   -------------------------------------------------------------------------- */
.tgf-acc-section {
    border: 1px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    overflow: hidden;
    background: #fff;
}
.tgf-acc-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    text-align: left;
    transition: background var(--tgf-trans);
    /* Own border-radius so corners stay clipped when section overflow becomes visible */
    border-radius: var(--tgf-radius-sm) var(--tgf-radius-sm) 0 0;
    overflow: hidden;
}
.tgf-acc-header:hover { background: rgba(0,0,0,0.03); }
.tgf-acc-section.open .tgf-acc-header {
    background: linear-gradient(90deg, var(--tgf-teal-lt) 0%, var(--tgf-green-lt) 100%);
    color: var(--tgf-text-body);
}
.tgf-acc-arrow {
    width: 18px; height: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--tgf-text-muted);
}
.tgf-acc-section.open .tgf-acc-arrow { transform: rotate(180deg); color: var(--tgf-gradeit-coral); }
.tgf-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
}
.tgf-acc-body .tgf-field-group {
    padding: 18px 18px 0;
}
.tgf-acc-body .tgf-field-group:last-child {
    padding-bottom: 18px;
}

/* Selected option image preview (shown below the dropdown) */
.tgf-cs-preview {
    margin-top: 10px;
    border-radius: var(--tgf-radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--tgf-border);
    background: rgba(13,9,8,0.03);
}
.tgf-cs-preview-img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    padding: 10px;
    box-sizing: border-box;
}

/* Zoom overlay — appended to <body>, shown on preview image hover */
.tgf-cs-zoom {
    position: fixed;
    z-index: 999999;
    width: 340px;
    height: 340px;
    background: #fff;
    border: 1.5px solid rgba(13,9,8,0.14);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(13,9,8,0.22);
    padding: 10px;
    box-sizing: border-box;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.93);
    transition: opacity 0.14s ease, transform 0.14s ease;
}
.tgf-cs-zoom--on {
    opacity: 1;
    transform: scale(1);
}
.tgf-cs-zoom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Conditional visibility */
.tgf-field-hidden {
    display: none !important;
}

/* Option descriptions — readable secondary text */
.tgf-opt-desc {
    display: block;
    font-size: 14px;
    color: var(--tgf-opt-accent);
    line-height: 1.45;
    margin-top: 4px;
    font-weight: 500;
}
.tgf-select-desc {
    margin-top: 8px;
    font-size: 15px;
    color: var(--tgf-opt-accent);
    font-weight: 500;
}

/* Option images — compact when not selected; hero size when .selected (see grid rules above) */
.tgf-radio-item:has(.tgf-opt-img):not(.selected) .tgf-opt-img,
.tgf-check-item:has(.tgf-opt-img):not(.selected) .tgf-opt-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 2px solid rgba(13, 9, 8, 0.1);
}

/* Tooltip-styled title attributes — enhanced with CSS */
.tgf-radio-item[title],
.tgf-check-item[title] {
    position: relative;
}

/* --------------------------------------------------------------------------
   Search bar
   -------------------------------------------------------------------------- */
.tgf-search-bar {
    margin-bottom: 16px;
    position: relative;
}
.tgf-search-bar::before {
    content: '🔍';
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.4;
    pointer-events: none;
}
.tgf-search-bar .tgf-input { padding-left: 38px; }

/* --------------------------------------------------------------------------
   List items (set results)
   -------------------------------------------------------------------------- */
.tgf-item-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.tgf-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color var(--tgf-trans);
}
.tgf-list-item:hover { border-color: var(--tgf-green); }

.tgf-list-thumb {
    width: 38px; height: 38px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}
.tgf-list-info { flex: 1; min-width: 0; }
.tgf-list-name {
    font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tgf-list-sub { font-size: 12px; color: var(--tgf-text-muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Card grid (card search results)
   -------------------------------------------------------------------------- */
.tgf-card-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
}

.tgf-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    background: #fff;
    transition: border-color var(--tgf-trans), box-shadow var(--tgf-trans), background var(--tgf-trans);
}
.tgf-card-item:hover {
    border-color: var(--tgf-gradeit-coral);
    box-shadow: 0 2px 10px rgba(241, 95, 81, 0.15);
    background: #fafffe;
}

.tgf-card-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 78px;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tgf-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tgf-card-no-img { font-size: 26px; }

.tgf-card-info { flex: 1; min-width: 0; }
.tgf-card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
    color: #111;
}
.tgf-card-set {
    font-size: 12px;
    color: var(--tgf-text-muted);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tgf-card-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.tgf-card-select-arrow {
    flex-shrink: 0;
    font-size: 20px;
    color: var(--tgf-border);
    line-height: 1;
    transition: color var(--tgf-trans);
}
.tgf-card-item:hover .tgf-card-select-arrow { color: var(--tgf-gradeit-coral); }
.tgf-card-tag {
    display: inline-block; font-size: 11px;
    border: 1px solid var(--tgf-border);
    border-radius: 4px; padding: 2px 6px;
    color: var(--tgf-text-muted);
}

/* --------------------------------------------------------------------------
   STEP 5 — Review
   -------------------------------------------------------------------------- */
.tgf-review-card {
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.tgf-review-pricing-wrap {
    margin-bottom: 20px;
}
.tgf-review-pricing-wrap .tgf-order-pricing {
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.tgf-review-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--tgf-border);
}
.tgf-review-section:last-child { border-bottom: none; }

.tgf-review-heading {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--tgf-green);
    margin: 0 0 10px;
}

.tgf-review-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px; padding: 5px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 14px;
}
.tgf-review-row:last-child { border-bottom: none; }
.tgf-review-row span { color: var(--tgf-text-muted); flex-shrink: 0; }
.tgf-review-row strong { text-align: right; font-weight: 500; }

.tgf-price-panel { border-top: 1px solid var(--tgf-border); }
.tgf-grade-row strong { color: var(--tgf-green); }
.tgf-price-note { font-size: 11px; color: var(--tgf-text-dim); margin: 8px 0 0; }

/* --------------------------------------------------------------------------
   Quantity
   -------------------------------------------------------------------------- */
.tgf-qty-row {
    display: flex; align-items: center; justify-content: space-between;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    padding: 14px 20px;
    margin-bottom: 20px;
}
.tgf-qty-ctrl {
    display: flex; align-items: center;
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    overflow: hidden;
}
.tgf-qty-btn {
    width: 40px; height: 40px;
    border: none; background: transparent; color: inherit;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--tgf-trans);
}
.tgf-qty-btn:hover { background: var(--tgf-gradeit-teal); color: var(--tgf-gradeit-white); }
.tgf-qty-val {
    min-width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
    border-left: 1px solid var(--tgf-border);
    border-right: 1px solid var(--tgf-border);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.tgf-step-actions {
    display: flex; flex-direction: column; gap: 10px; margin-top: 12px;
}
@media (min-width: 480px) {
    .tgf-step-actions { flex-direction: row; justify-content: flex-end; }
    .tgf-review-actions { justify-content: center; }
}

.tgf-btn-primary,
.tgf-btn-secondary,
.tgf-btn-ghost {
    padding: 13px 28px;
    border-radius: var(--tgf-radius-sm);
    font-size: 15px; font-weight: 700;
    cursor: pointer; border: none;
    transition: background var(--tgf-trans), transform var(--tgf-trans);
    text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tgf-btn-primary {
    background: var(--tgf-gradeit-coral);
    color: var(--tgf-gradeit-white);
    min-width: 160px;
    font-weight: 700;
    font-size: 16px;
}
.tgf-btn-primary:hover { background: var(--tgf-green-dk); transform: translateY(-1px); color: var(--tgf-gradeit-white); }
.tgf-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.tgf-btn-secondary {
    background: transparent; color: inherit;
    border: 1.5px solid var(--tgf-border);
}
.tgf-btn-secondary:hover { border-color: var(--tgf-green); color: var(--tgf-green); }

.tgf-btn-ghost {
    background: transparent; color: var(--tgf-text-muted);
    border: 1.5px solid var(--tgf-border);
    font-size: 13px; padding: 10px 18px;
}
.tgf-btn-ghost:hover { color: inherit; border-color: rgba(0,0,0,0.3); }

.tgf-link-btn {
    background: none; border: none; color: var(--tgf-green);
    cursor: pointer; font-size: inherit; text-decoration: underline; padding: 0;
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */
.tgf-notice {
    border: 1px solid var(--tgf-border);
    border-radius: var(--tgf-radius-sm);
    padding: 12px 16px; font-size: 13px;
    color: var(--tgf-text-muted); margin-bottom: 20px;
}
.tgf-notice-info  { border-color: rgba(59,130,246,0.3); color: #93c5fd; }
.tgf-notice-warn  { border-color: rgba(217,119,6,0.3);  color: #fcd34d; }

.tgf-error-msg {
    border: 1px solid rgba(224,82,82,0.3);
    border-radius: var(--tgf-radius-sm);
    padding: 14px 18px; color: #fca5a5; font-size: 14px;
}

/* --------------------------------------------------------------------------
   Loading
   -------------------------------------------------------------------------- */
.tgf-loading {
    display: flex; align-items: center; gap: 12px;
    padding: 48px; justify-content: center;
    color: var(--tgf-text-muted); font-size: 14px;
}
.tgf-loading-sm { font-size: 13px; color: var(--tgf-text-muted); padding: 12px 0; text-align: center; }
.tgf-spinner {
    width: 22px; height: 22px;
    border: 2.5px solid rgba(0,0,0,0.08);
    border-top-color: var(--tgf-green);
    border-radius: 50%;
    animation: tgf-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes tgf-spin { to { transform: rotate(360deg); } }

.tgf-empty { text-align: center; padding: 32px; color: var(--tgf-text-muted); font-size: 14px; }

/* --------------------------------------------------------------------------
   Success screen
   -------------------------------------------------------------------------- */
.tgf-success-screen { text-align: center; padding: 48px 20px; }

.tgf-success-icon {
    width: 72px; height: 72px; border-radius: 50%;
    border: 2px solid var(--tgf-gradeit-teal);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    animation: tgf-pop 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.tgf-success-icon svg { width: 36px; height: 36px; stroke: var(--tgf-gradeit-teal); }
@keyframes tgf-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.tgf-success-screen h2 { font-size: 24px; margin: 0 0 10px; }
.tgf-success-screen p  { color: var(--tgf-text-muted); margin: 0 0 28px; }

.tgf-order-list {
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    margin: 0 auto 28px; max-width: 420px; overflow: hidden;
}
.tgf-order-list-item {
    display: flex; justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--tgf-border);
    font-size: 13px;
}
.tgf-order-list-item:last-child { border-bottom: none; }
.tgf-order-list-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tgf-order-list-details { color: var(--tgf-text-muted); font-size: 11px; }
.tgf-qty-badge { color: var(--tgf-text-muted); font-weight: 600; flex-shrink: 0; }

.tgf-order-pricing {
    border: 1.5px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    margin: 0 auto 28px;
    max-width: 420px;
    padding: 14px 18px;
    text-align: left;
}
.tgf-order-pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.tgf-order-pricing-line:last-of-type { border-bottom: none; }
.tgf-order-pricing-line span { color: var(--tgf-text-muted); min-width: 0; }
.tgf-order-pricing-line strong { font-weight: 600; flex-shrink: 0; text-align: right; }
.tgf-order-pricing-line--base strong { color: inherit; }
.tgf-order-pricing-line--extra { font-size: 13px; }
.tgf-order-pricing-line--extra span { padding-left: 8px; }
.tgf-order-pricing-line--total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--tgf-border);
    border-bottom: none;
    font-size: 15px;
}
.tgf-order-pricing-line--total span { color: inherit; font-weight: 600; }
.tgf-order-pricing-line--total strong { font-size: 16px; color: var(--tgf-green); }
.tgf-order-pricing-line--suborder {
    border-bottom: none;
    padding-top: 4px;
    font-size: 14px;
}
.tgf-order-pricing-detail {
    margin: -4px 0 8px;
    font-size: 12px;
    color: var(--tgf-text-muted);
    text-align: right;
}
.tgf-order-pricing-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--tgf-text-dim);
    text-align: center;
}

.tgf-success-actions {
    display: flex; flex-direction: column; gap: 12px; align-items: center;
}
@media (min-width: 480px) {
    .tgf-success-actions { flex-direction: row; justify-content: center; }
}

/* ==========================================================================
   MOBILE UX IMPROVEMENTS
   ========================================================================== */

@media (min-width: 640px) {
    .tgf-step-actions--sticky { flex-direction: row; justify-content: flex-end; }
}

/* --------------------------------------------------------------------------
   Custom select — bottom sheet on narrow screens
   Replaces the absolute dropdown which can clip inside scrollable containers.
   -------------------------------------------------------------------------- */

/* Semi-transparent backdrop that sits behind the sheet */
.tgf-cs-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 9, 8, 0.45);
    z-index: 99998;
    animation: tgf-fade-in 0.15s ease;
}
.tgf-cs-backdrop.visible { display: block; }
@keyframes tgf-fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 639px) {
    /* Sheet list */
    .tgf-cs--sheet .tgf-cs-list {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 58vh;
        border-radius: 16px 16px 0 0;
        border: none;
        border-top: 2px solid var(--tgf-gradeit-teal);
        box-shadow: 0 -8px 40px rgba(13, 9, 8, 0.2);
        z-index: 99999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Don't flatten the trigger corners when sheet is open */
    .tgf-cs--sheet.tgf-cs--open .tgf-cs-trigger {
        border-bottom-left-radius: var(--tgf-radius-sm);
        border-bottom-right-radius: var(--tgf-radius-sm);
    }
    /* Slightly larger option rows for fat-finger tapping */
    .tgf-cs--sheet .tgf-cs-opt {
        padding: 13px 16px;
    }
}

/* --------------------------------------------------------------------------
   Better touch targets for radio / checkbox items on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .tgf-radio-item,
    .tgf-check-item {
        padding: 14px 14px;
        gap: 10px;
    }
    .tgf-radio-label,
    .tgf-check-label {
        font-size: 15px;
    }

    /* Service cards — tighter on very narrow screens */
    .tgf-svc-card {
        padding: 20px 10px 14px;
        gap: 8px;
    }
    .tgf-svc-logo { height: 58px; }
    .tgf-svc-card.selected .tgf-svc-logo { height: 80px; }
    .tgf-svc-name { font-size: 13px; }
    .tgf-svc-price { font-size: 13px; }
    .tgf-svc-desc { font-size: 11px; }

    /* Type tiles — less vertical padding */
    .tgf-type-tile {
        padding: 20px 10px;
        min-height: 110px;
        gap: 8px;
    }
    .tgf-type-name { font-size: 13px; }
    .tgf-type-icon { font-size: 32px; }
}

/* ── Calculated-price field (Step 4 insurance, etc.) ───────────────────── */
.tgf-calc-row {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--tgf-border);
    border-radius: var(--tgf-radius);
    overflow: hidden;
    max-width: 280px;
}
.tgf-calc-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    background: #f5f5f5;
    color: #555;
    font-weight: 700;
    border-right: 1px solid var(--tgf-border);
}
.tgf-calc-input {
    border: 0 !important;
    border-radius: 0 !important;
    flex: 1;
    min-width: 0;
}
.tgf-calc-input:focus { outline: none; box-shadow: none; }
.tgf-calc-card-hint { margin-top: 8px; }
.tgf-calc-hint {
    background: transparent;
    border: 1px dashed var(--tgf-gradeit-orange);
    color: var(--tgf-gradeit-orange);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.tgf-calc-hint:hover { background: rgba(241, 95, 81, 0.08); }
.tgf-calc-result {
    margin-top: 10px;
    padding: 10px 14px;
    background: linear-gradient(160deg, var(--tgf-green-lt) 0%, var(--tgf-teal-lt) 100%);
    border-radius: var(--tgf-radius);
    font-size: 14px;
    display: inline-block;
}
.tgf-calc-result-label { color: #555; }
.tgf-calc-result-value { font-size: 18px; margin-left: 4px; }

/* ── Paused option (radio / checkbox / custom select) ──────────────────── */
.tgf-radio-item.tgf-opt-item--paused,
.tgf-check-item.tgf-opt-item--paused {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.75);
    background: #fafafa;
}
.tgf-radio-item.tgf-opt-item--paused:hover,
.tgf-check-item.tgf-opt-item--paused:hover {
    border-color: var(--tgf-border);
    transform: none;
    box-shadow: none;
}
.tgf-cs-opt--paused {
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.75);
    pointer-events: none;
}
.tgf-cs-opt--paused .tgf-cs-opt-name { color: #6b7280; }
.tgf-opt-unavailable {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #1f2937;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    vertical-align: middle;
    /* keep the pill at full opacity even on grayed-out parents */
    filter: none;
    opacity: 1;
}

/* "Add similar card" helper text on the order-added screen */
.tgf-success-screen .tgf-success-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--tgf-text-muted, #5c514f);
    text-align: center;
}

/* ==========================================================================
   Service step — "Examples" button + Slab Showcase modal
   ========================================================================== */
.tgf-svc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}
.tgf-svc-actions .tgf-svc-details-btn { margin-top: 0; }
.tgf-svc-examples-btn {
    border-color: rgba(96, 199, 203, 0.7);
    color: var(--tgf-teal-dk, #4aaeb2);
}
.tgf-svc-examples-btn:hover {
    border-color: var(--tgf-gradeit-teal, #60C7CB);
    color: #2a8a8f;
}

.tgf-modal--showcase {
    background: #14171c;
    color: #f4f5f7;
}
.tgf-modal--showcase .tgf-modal-topbar {
    background: #14171c;
    border-bottom-color: rgba(255,255,255,0.08);
    color: #fff;
}
.tgf-modal--showcase .tgf-modal-topbar-name { color: #fff; }
.tgf-modal--showcase .tgf-modal-close { color: #fff; }
.tgf-showcase-counter { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55); margin-left: 8px; }

.tgf-showcase-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 12px 6px;
    background: radial-gradient(ellipse at center, #232831 0%, #14171c 70%);
}
.tgf-showcase-card {
    position: relative;
    width: min(62vw, 330px);
    aspect-ratio: 5 / 7;
    perspective: 1200px;
    cursor: pointer;
}
.tgf-showcase-card--noback { cursor: default; }
.tgf-showcase-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
    filter: drop-shadow(0 18px 28px rgba(0,0,0,0.55));
    background: transparent;
}
.tgf-showcase-back { transform: rotateY(180deg); }
.tgf-showcase-card.flipped .tgf-showcase-front { transform: rotateY(180deg); }
.tgf-showcase-card.flipped .tgf-showcase-back  { transform: rotateY(360deg); }
.tgf-showcase-nav {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--tgf-trans);
}
.tgf-showcase-nav:hover { background: rgba(255,255,255,0.16); }
.tgf-showcase-fliphint {
    margin: 0;
    padding: 6px 0 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
}
.tgf-showcase-thumbs {
    border-top-color: rgba(255,255,255,0.08);
    justify-content: center;
}
.tgf-showcase-thumbs .tgf-modal-thumb { background: rgba(255,255,255,0.06); }
.tgf-showcase-body { padding-top: 16px; }
.tgf-showcase-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tgf-showcase-head .tgf-modal-title { color: #fff; margin: 0; flex: 1; }
.tgf-showcase-price {
    display: inline-block;
    background: var(--tgf-gradeit-coral, #F15F51);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}
.tgf-showcase-caption { margin: 8px 0 0; color: rgba(255,255,255,0.8); font-size: 14px; line-height: 1.45; }
.tgf-showcase-desc { margin: 6px 0 0; color: rgba(255,255,255,0.55); font-size: 13px; line-height: 1.45; }
.tgf-showcase-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.tgf-showcase-chip {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 5px 10px;
}
.tgf-showcase-chip--type { color: var(--tgf-gradeit-teal, #60C7CB); }
.tgf-modal--showcase .tgf-modal-select { width: 100%; }
