/* ==========================================================================
   TTY Product Finder — Frontend Styles
   All selectors prefixed with .tty-pf- to prevent conflicts.
   Reads --tty-* CSS variables from the theme for brand colours.
   ========================================================================== */

/* ── Variables (fallbacks when theme vars not loaded) ─────────────────────── */
:root {
    --tty-pf-primary:      var(--tty-primary,      #247772);
    --tty-pf-primary-dark: var(--tty-primary-dark,  #005f5f);
    --tty-pf-secondary:    var(--tty-secondary,     #E5924C);
    --tty-pf-radius-sm:    var(--tty-radius-sm,     6px);
    --tty-pf-radius-md:    16px;
    --tty-pf-radius-lg:    var(--tty-radius-lg,     20px);
    --tty-pf-shadow-md:    var(--tty-shadow-md,     0 8px 32px rgba(0,0,0,.18));
    --tty-pf-shadow-lg:    var(--tty-shadow-lg,     0 20px 60px rgba(0,0,0,.25));
    --tty-pf-font:         'Figtree', 'Segoe UI', Arial, sans-serif;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.tty-pf-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

.tty-pf-overlay.tty-pf-open {
    display: flex;
}

/* ==========================================================================
   Modal shell
   ========================================================================== */

.tty-pf-modal {
    background: #fff;
    border-radius: var(--tty-pf-radius-lg);
    width: 100%;
    max-width: 640px;
    max-height: calc(100dvh - 90px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--tty-pf-shadow-lg);
    font-family: var(--tty-pf-font);
    animation: tty-pf-slide-up .28s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes tty-pf-slide-up {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ==========================================================================
   Header
   ========================================================================== */

.tty-pf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    color: #1a1a1a;
    flex-shrink: 0;
    border-radius: 30px 30px 0 0;
}

.tty-pf-header-left {
    display: flex;
    align-items: center;
}

.tty-pf-header-icon {
    margin-right: 12px;
    font-size: 30px;
    color: var(--tty-header-primary);
}

.tty-pf-header-title {
    margin: 0;
    font-size: 24px;
    align-items: center;
    display: flex;
    gap: 8px;
    color: var(--tty-text-primary);
    font-weight: 600;
    line-height: 28px;
}

.tty-pf-close {
    background: rgba(0,0,0,.07);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    transition: background .15s;
    flex-shrink: 0;
}

.tty-pf-close:hover {
    background: rgba(255,255,255,.3);
}

/* ==========================================================================
   Progress bar
   ========================================================================== */

.tty-pf-progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0px 20px 10px;
    flex-shrink: 0;
    background: #fff;
}

.tty-pf-progress-bar {
    flex: 1;
    height: 5px;
    background: #e0e0e0;
    border-radius: 99px;
    overflow: hidden;
}

.tty-pf-progress-fill {
    height: 100%;
    background: var(--tty-pf-primary);
    border-radius: 99px;
    transition: width .4s cubic-bezier(.4,0,.2,1);
}

.tty-pf-progress-label {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

/* ==========================================================================
   Gender memory badge
   ========================================================================== */

.tty-pf-gender-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: #f0f9f8;
    border-bottom: 1px solid #d8eeed;
    font-size: 13px;
    color: var(--tty-pf-primary-dark);
    flex-shrink: 0;
    margin-bottom: 15px;
}

.tty-pf-gender-badge-text {
    flex: 1;
    font-weight: 600;
}

.tty-pf-gender-change {
    background: none;
    border: 1px solid var(--tty-pf-primary);
    color: var(--tty-pf-primary);
    border-radius: var(--tty-pf-radius-lg);
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}

.tty-pf-gender-change:hover {
    background: var(--tty-pf-primary);
    color: #fff;
}

/* ==========================================================================
   Content area
   ========================================================================== */

.tty-pf-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px 20px 20px 20px;
    position: relative;
    min-height: 200px;
}

/* ==========================================================================
   Loader
   ========================================================================== */

.tty-pf-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.tty-pf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--tty-pf-primary);
    border-radius: 50%;
    animation: tty-pf-spin .7s linear infinite;
}

@keyframes tty-pf-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Question screen
   ========================================================================== */

.tty-pf-screen {
    animation: tty-pf-fade-in .22s ease both;
}

@keyframes tty-pf-fade-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.tty-pf-screen-question.tty-pf-going-back {
    animation: tty-pf-fade-back .22s ease both;
}

@keyframes tty-pf-fade-back {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.tty-pf-question-text {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.2px;
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--tty-primary);
}

.tty-pf-question-help {
    font-size: 13px;
    color: #777;
    margin: 0 0 18px;
}

/* ── Options grid ──────────────────────────────────────────────────────────── */

.tty-pf-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    align-items: stretch;
}

/* 1 option: full width */
.tty-pf-options-grid.tty-pf-count-1 {
    grid-template-columns: 1fr;
}

/* 2 options: side by side */
.tty-pf-options-grid.tty-pf-count-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 4 options: 2×2 */
.tty-pf-options-grid.tty-pf-count-4 {
    grid-template-columns: repeat(2, 1fr);
}

/* 7–8 options: 4 columns */
.tty-pf-options-grid.tty-pf-count-7,
.tty-pf-options-grid.tty-pf-count-8 {
    grid-template-columns: repeat(4, 1fr);
}

/* 9–12 options: 4 columns */
.tty-pf-options-grid.tty-pf-count-9,
.tty-pf-options-grid.tty-pf-count-10,
.tty-pf-options-grid.tty-pf-count-11,
.tty-pf-options-grid.tty-pf-count-12 {
    grid-template-columns: repeat(4, 1fr);
}

/* 13+ options: auto-fill smaller cards */
.tty-pf-options-grid.tty-pf-many {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.tty-pf-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--tty-pf-radius-md);
    background: #fff;
    cursor: pointer;
    font-family: var(--tty-pf-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--tty-text-primary);
    transition: all .18s cubic-bezier(.4,0,.2,1);
    text-align: left;
    line-height: 1.2;
    min-height: 90px;
    height: 100%;
}

.tty-pf-option-btn:hover {
    border-color: var(--tty-pf-primary);
    color: var(--tty-pf-primary);
    background: #f0f9f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36,119,114,.15);
}

.tty-pf-option-btn.tty-pf-selected {
    border-color: var(--tty-pf-primary);
    background: var(--tty-pf-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(36,119,114,.3);
}

.tty-pf-option-btn .tty-pf-opt-icon {
    font-size: 24px;
    line-height: 1;
}

.tty-pf-option-btn.tty-pf-selected .tty-pf-opt-icon {
    filter: brightness(0) invert(1);
}

/* Yes/No: wider buttons */
.tty-pf-options-grid.tty-pf-yes-no {
    grid-template-columns: 1fr 1fr;
}

.tty-pf-options-grid.tty-pf-yes-no .tty-pf-option-btn {
    min-height: 100px;
    font-size: 16px;
}

/* Single-select: full width rows */
.tty-pf-options-grid.tty-pf-single-select {
    grid-template-columns: 1fr;
}

.tty-pf-options-grid.tty-pf-single-select .tty-pf-option-btn {
    flex-direction: row;
    justify-content: flex-start;
    min-height: auto;
    padding: 14px 16px;
}

/* List layout with inline icons (>8 options) */
.tty-pf-options-grid.tty-pf-list-with-icons .tty-pf-option-btn {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    min-height: auto;
    padding: 16px;
}

.tty-pf-options-grid.tty-pf-list-with-icons .tty-pf-option-btn .tty-pf-opt-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    opacity: .85;
}

.tty-pf-options-grid.tty-pf-list-with-icons .tty-pf-option-btn.tty-pf-selected .tty-pf-opt-icon {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* ==========================================================================
   Slider
   ========================================================================== */

.tty-pf-slider-wrap {
    padding: 10px 0;
}

.tty-pf-slider-value-display {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    color: var(--tty-pf-primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.tty-pf-slider-value-display span + span {
    font-size: 18px;
    font-weight: 600;
    margin-left: 4px;
    opacity: .7;
}

.tty-pf-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: linear-gradient(
        to right,
        var(--tty-pf-primary) 0%,
        var(--tty-pf-primary) var(--tty-pf-slider-pct, 50%),
        #e0e0e0 var(--tty-pf-slider-pct, 50%),
        #e0e0e0 100%
    );
    outline: none;
    cursor: pointer;
}

.tty-pf-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tty-pf-primary);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(36,119,114,.35);
    cursor: pointer;
    transition: transform .15s;
}

.tty-pf-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.tty-pf-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tty-pf-primary);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(36,119,114,.35);
    cursor: pointer;
}

.tty-pf-slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

/* ==========================================================================
   Results screen
   ========================================================================== */

.tty-pf-results-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.tty-pf-results-icon {
    font-size: 32px;
    color: #ffc107;
    flex-shrink: 0;
    margin-top: 2px;
}

.tty-pf-results-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

.tty-pf-results-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ── Product card ──────────────────────────────────────────────────────────── */

.tty-pf-product-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 14px;
    border: 2px solid #e0e0e0;
    border-radius: var(--tty-pf-radius-md);
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
    transition: all .2s;
    text-decoration: none;
    color: inherit;
}

.tty-pf-product-card.tty-pf-best-card {
    border-color: var(--tty-pf-primary);
    background: #f0f9f8;
    box-shadow: 0 4px 18px rgba(36,119,114,.14);
}

.tty-pf-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tty-pf-shadow-md);
}

.tty-pf-card-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--tty-pf-radius-sm);
    background: #f0f0f0;
    flex-shrink: 0;
}

.tty-pf-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tty-pf-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffc107;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 8px;
    border-radius: 20px;
    width: fit-content;
}

.tty-pf-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.2;
}

.tty-pf-card-desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tty-pf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 8px;
}

.tty-pf-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--tty-pf-primary);
}

.tty-pf-card-match {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
}

.tty-pf-card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--tty-pf-primary);
    color: #fff;
    padding: 7px 14px;
    border-radius: var(--tty-pf-radius-lg);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.tty-pf-card-link:hover {
    background: var(--tty-pf-primary-dark);
    color: #fff;
}

/* ── Alternatives toggle ───────────────────────────────────────────────────── */

.tty-pf-toggle-alt {
    background: none;
    border: 1px solid var(--tty-pf-primary);
    color: var(--tty-pf-primary);
    border-radius: var(--tty-pf-radius-sm);
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all .15s;
    margin-bottom: 10px;
}

.tty-pf-toggle-alt:hover {
    background: var(--tty-pf-primary);
    color: #fff;
}

.tty-pf-alternatives-grid .tty-pf-product-card {
    grid-template-columns: 60px 1fr;
}

.tty-pf-alternatives-grid .tty-pf-card-img {
    width: 60px;
    height: 60px;
}

/* ── Cross-sell section ────────────────────────────────────────────────────── */

.tty-pf-crosssell-wrap {
    border-top: 1px solid #e8e8e8;
    padding-top: 16px;
    margin-top: 4px;
}

.tty-pf-crosssell-title {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tty-pf-crosssell-title::before {
    content: '💡';
}

.tty-pf-crosssell-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.tty-pf-crosssell-card {
    border: 1px solid #e8e8e8;
    border-radius: var(--tty-pf-radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
}

.tty-pf-crosssell-card:hover {
    border-color: var(--tty-pf-secondary);
    box-shadow: 0 3px 10px rgba(229,146,76,.15);
    transform: translateY(-2px);
}

.tty-pf-crosssell-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--tty-pf-radius-sm);
    background: #f0f0f0;
}

.tty-pf-crosssell-name {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.tty-pf-crosssell-price {
    font-size: 12px;
    color: var(--tty-pf-secondary);
    font-weight: 600;
}

.tty-pf-crosssell-link {
    font-size: 11px;
    color: var(--tty-pf-secondary);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
}

/* ── Related treatments ────────────────────────────────────────────────────── */

.tty-pf-treatments-wrap {
    border-top: 1px solid #e8e8e8;
    padding-top: 16px;
    margin-top: 4px;
}

.tty-pf-treatments-title {
    font-size: 14px;
    font-weight: 700;
    color: #555;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tty-pf-treatments-title .tty-pf-treatments-icon {
    color: var(--tty-pf-primary);
    font-size: 16px;
}

.tty-pf-treatments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

/* Single treatment: horizontal layout */
.tty-pf-treatments-grid.tty-pf-treatments-single {
    grid-template-columns: 1fr;
}

.tty-pf-treatments-grid.tty-pf-treatments-single .tty-pf-treatment-card {
    flex-direction: row;
}

.tty-pf-treatments-grid.tty-pf-treatments-single .tty-pf-treatment-img {
    width: 140px;
    min-width: 140px;
    aspect-ratio: unset;
    height: auto;
}

.tty-pf-treatments-grid.tty-pf-treatments-single .tty-pf-treatment-img--placeholder {
    height: 100px;
}

.tty-pf-treatment-card {
    border: 1px solid #e8e8e8;
    border-radius: var(--tty-pf-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all .15s;
}

.tty-pf-treatment-card:hover {
    border-color: var(--tty-pf-primary);
    box-shadow: 0 3px 10px rgba(36,119,114,.15);
    transform: translateY(-2px);
}

.tty-pf-treatment-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f0f0f0;
}

.tty-pf-treatment-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--tty-pf-primary);
}

.tty-pf-treatment-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.tty-pf-treatment-cat {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--tty-pf-primary);
}

.tty-pf-treatment-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.tty-pf-treatment-subtitle {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tty-pf-treatment-link {
    font-size: 11px;
    color: var(--tty-pf-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 6px;
}

/* ── Answers summary ───────────────────────────────────────────────────────── */

.tty-pf-answers-summary {
    border-top: 1px solid #e8e8e8;
    padding-top: 12px;
    margin-top: 12px;
}

.tty-pf-answers-toggle {
    font-size: 13px;
    font-weight: 600;
    color: var(--tty-pf-primary);
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(36,119,114,.07);
    border: 1px solid rgba(36,119,114,.25);
    border-radius: 20px;
    padding: 6px 14px;
    transition: background .15s, border-color .15s;
}

.tty-pf-answers-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform .2s;
}

.tty-pf-answers-toggle::-webkit-details-marker { display: none; }

.tty-pf-answers-summary[open] .tty-pf-answers-toggle {
    background: rgba(36,119,114,.12);
    border-color: rgba(36,119,114,.4);
}

.tty-pf-answers-summary[open] .tty-pf-answers-toggle::after {
    transform: rotate(180deg);
}

.tty-pf-answers-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: var(--tty-pf-radius-md);
    overflow: hidden;
}

.tty-pf-answers-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid #eee;
    gap: 12px;
    margin-bottom: 0px;
}

.tty-pf-answers-list li:last-child {
    border-bottom: none;
}

.tty-pf-answers-list li:nth-child(even) {
    background: #fff;
}

.tty-pf-answers-list li .tty-pf-ans-q {
    color: #888;
    flex: 1;
    line-height: 1.4;
}

.tty-pf-answers-list li .tty-pf-ans-v {
    font-weight: 700;
    color: var(--tty-pf-primary);
    text-align: right;
    flex-shrink: 0;
    max-width: 55%;
    line-height: 1.4;
}

/* ── Email section ─────────────────────────────────────────────────────────── */

.tty-pf-email-section {
    background: linear-gradient(135deg, rgba(36,119,114,.07) 0%, rgba(36,119,114,.03) 100%);
    border: 1px solid rgba(36,119,114,.2);
    border-radius: 16px;
    padding: 14px 16px;
    margin-top: 14px;
}

.tty-pf-email-icon {
    display: none;
}

.tty-pf-email-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tty-pf-primary);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tty-pf-email-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tty-pf-email-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(36,119,114,.25);
    border-radius: 8px;
    font-family: var(--tty-pf-font);
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
    background: #fff;
    box-sizing: border-box;
}

.tty-pf-email-input:focus {
    border-color: var(--tty-pf-primary);
}

.tty-pf-email-btn {
    padding: 10px 18px;
    background: var(--tty-pf-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--tty-pf-font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    width: 100%;
}

.tty-pf-email-btn:hover {
    background: var(--tty-pf-primary-dark);
}

.tty-pf-email-btn:disabled {
    opacity: .6;
    cursor: default;
}

.tty-pf-email-feedback {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--tty-pf-primary);
}

.tty-pf-email-feedback.tty-pf-error {
    color: #c00;
}

/* ── No results ────────────────────────────────────────────────────────────── */

.tty-pf-no-results {
    text-align: center;
    padding: 30px 20px;
    color: #888;
    font-size: 15px;
}

/* ==========================================================================
   Footer navigation
   ========================================================================== */

.tty-pf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-top: 1px solid #efefef;
  flex-shrink: 0;
  border-radius: 0 0 30px 30px;
}

.tty-pf-footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tty-pf-btn-back,
.tty-pf-btn-next,
.tty-pf-btn-restart {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--tty-pf-radius-lg);
    font-family: var(--tty-pf-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid;
    transition: all .15s;
}

.tty-pf-btn-back {
    background: #fff;
    color: #666;
    border-color: #d0d0d0;
}

.tty-pf-btn-back:hover {
    color: #333;
    border-color: #999;
}

.tty-pf-btn-next {
    background: var(--tty-pf-primary);
    color: #fff;
    border-color: var(--tty-pf-primary);
}

.tty-pf-btn-next:hover {
    background: var(--tty-pf-primary-dark);
    border-color: var(--tty-pf-primary-dark);
}

.tty-pf-btn-restart {
    background: #fff;
    color: var(--tty-pf-primary);
    border-color: var(--tty-pf-primary);
}

.tty-pf-btn-restart:hover {
    background: #f0f9f8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 560px) {
    .tty-pf-overlay {
        padding: 0px;
    }
    
    .tty-pf-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tty-pf-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0px;
        padding: 0px;
        height: 100%;
        width: 100%;
    }

    .tty-pf-close.tty-popup-close {
        flex-direction: column;
        padding: 0;
        position: relative;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: rgba(0, 95, 95, 0.08);
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.15s ease;
        color: var(--tty-primary);
        min-width: 40px;
        min-height: 40px;
    }

    .tty-pf-header {
        padding: 15px 20px;
    }

    .tty-pf-modal {
        animation: none;
    }

    .tty-pf-options-grid.tty-pf-count-1 {
        grid-template-columns: 1fr !important;
    }
    .tty-pf-options-grid.tty-pf-many {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    }

    .tty-pf-product-card {
        grid-template-columns: 60px 1fr;
    }

    .tty-pf-card-img {
        width: 60px;
        height: 60px;
    }

    .tty-pf-crosssell-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tty-pf-treatments-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tty-pf-email-btn {
        white-space: nowrap;
    }

    .tty-pf-card-footer {
        display: flex;
        align-items: start;
        justify-content: space-between;
        margin-top: auto;
        gap: 8px;
        flex-direction: column;
        width: fit-content;
    }
}

/* ==========================================================================
   Info screen
   ========================================================================== */

.tty-pf-screen-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.tty-pf-info-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(36,119,114,.12) 0%, rgba(36,119,114,.06) 100%);
    border-radius: 16px;
    margin-bottom: 4px;
}

.tty-pf-info-icon {
    font-size: 26px;
    color: var(--tty-pf-primary);
}

.tty-pf-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0;
}

.tty-pf-info-body {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.6;
    margin: 0;
}

.tty-pf-info-body p {
    margin: 0 0 12px;
}

.tty-pf-info-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: #1d2327;
}

.tty-pf-info-body h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 14px 0 6px;
    color: #1d2327;
}

.tty-pf-info-body ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.tty-pf-info-body li {
    margin-bottom: 2px;
    font-size: 14px;
}

.tty-pf-info-body em {
    color: #6b7280;
    font-style: italic;
}

.tty-pf-info-btn {
    margin-top: 4px;
    align-self: flex-start;
}

#ttyPfScreenInfo .tty-pf-info-body {
    font-size: 16px;
    line-height: 1.3;
    margin: 15px 0px;
}

#ttyPfScreenInfo .tty-pf-card-link {
    font-size: 14px;
    font-weight: 600;
}

#ttyPfScreenInfo .tty-pf-info-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.2px;
    font-size: 24px;
    color: var(--tty-primary);
}

/* ── Two treatments: side-by-side, wider cards ───────────────────────── */
.tty-pf-treatments-grid.tty-pf-treatments-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tty-pf-treatments-grid.tty-pf-treatments-two .tty-pf-treatment-card {
    flex-direction: column;
}

.tty-pf-treatments-grid.tty-pf-treatments-two .tty-pf-treatment-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .tty-pf-treatments-grid.tty-pf-treatments-two {
        grid-template-columns: 1fr;
    }
}