/*
 * Healey Packaging – Multi-Step Quote Form CSS
 * File: assets/css/quote-form.css (child theme)
 *
 * Design tokens
 * ─────────────────────────────────────────────
 *  --hpq-brand    #003087   (Healey navy)
 *  --hpq-blue     #2187cc   (Healey blue)
 *  --hpq-accent   #1a56db   (active / CTA)
 *  --hpq-text     #111827
 *  --hpq-muted    #6b7280
 *  --hpq-border   #e5e7eb
 *  --hpq-bg       #f9fafb
 *  --hpq-radius   10px
 */

/* ═══════════════════════════════════════════════════════════════════════════
   TOKENS & RESET
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-wrap *, .hpq-modal * { box-sizing: border-box; }

:root {
    --hpq-brand:  #003087;
    --hpq-blue:   #2187cc;
    --hpq-accent: #1a56db;
    --hpq-text:   #111827;
    --hpq-muted:  #6b7280;
    --hpq-border: #e5e7eb;
    --hpq-bg:     #f9fafb;
    --hpq-radius: 10px;
    --hpq-shadow: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
    --hpq-shadow-md: 0 4px 16px rgba(0,0,0,.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM RESPONSE (success / error)
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-form-response {
    display: block;
    padding: 16px 20px;
    border-radius: var(--hpq-radius);
    font-size: .95rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: hpq-fadein .3s ease;
}
.hpq-form-response[hidden] { display: none !important; }
.hpq-form-response--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.hpq-form-response--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.hpq-form-response--notice  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ═══════════════════════════════════════════════════════════════════════════
   OUTER LAYOUT  (3-column: sidebar | form | summary)
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-wrap {
    display: grid;
    grid-template-columns: 220px 1fr 200px;
    gap: 24px;
    align-items: start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--hpq-text);
    padding: 32px 0;
    max-width: 1100px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEFT SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-sidebar {
    position: sticky;
    top: 80px;
}
.hpq-sidebar__heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--hpq-brand);
    margin: 0 0 10px;
    line-height: 1.3;
}
.hpq-sidebar__desc {
    font-size: .875rem;
    color: var(--hpq-muted);
    margin: 0 0 16px;
    line-height: 1.55;
}
.hpq-sidebar__checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hpq-sidebar__checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: var(--hpq-text);
    margin-bottom: 8px;
}
.hpq-check-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--hpq-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hpq-check-icon::before {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg) translate(-1px,-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM CARD
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-form-card {
    background: #fff;
    border: 1px solid var(--hpq-border);
    border-radius: 14px;
    box-shadow: var(--hpq-shadow-md);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEPPER NAV
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-stepper {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: var(--hpq-bg);
    border-bottom: 1px solid var(--hpq-border);
    overflow-x: auto;
    gap: 0;
    scrollbar-width: none;
}
.hpq-stepper::-webkit-scrollbar { display: none; }

.hpq-stepper__item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.hpq-stepper__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}
.hpq-stepper__btn:focus-visible { outline: 2px solid var(--hpq-accent); outline-offset: 2px; }
.hpq-stepper__circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--hpq-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: var(--hpq-muted);
    background: #fff;
    flex-shrink: 0;
    transition: background .2s, border-color .2s, color .2s;
}
.hpq-stepper__label {
    font-size: .7rem;
    color: var(--hpq-muted);
    white-space: nowrap;
    transition: color .2s;
    display: none;
}
.hpq-stepper__line {
    width: 20px;
    height: 2px;
    background: var(--hpq-border);
    flex-shrink: 0;
    margin: 0 2px;
    transition: background .2s;
}

/* Active step */
.hpq-stepper__item.is-active .hpq-stepper__circle { background: var(--hpq-accent); border-color: var(--hpq-accent); color: #fff; }
.hpq-stepper__item.is-active .hpq-stepper__label  { color: var(--hpq-accent); font-weight: 600; }

/* Complete step */
.hpq-stepper__item.is-complete .hpq-stepper__circle { background: #ecfdf5; border-color: #34d399; color: #065f46; }
.hpq-stepper__item.is-complete + .hpq-stepper__line { background: #34d399; }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP PANELS
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-form {
    padding: 24px;
    min-height: 360px;
}
.hpq-step { border: none; padding: 0; margin: 0; animation: hpq-fadein .25s ease; }
.hpq-step--hidden { display: none; }

@keyframes hpq-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hpq-step__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--hpq-brand);
    margin: 0 0 4px;
    display: block;
}
.hpq-step__desc {
    font-size: .875rem;
    color: var(--hpq-muted);
    margin: 0 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 1 – STYLE GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.hpq-style-card {
    position: relative;
    border: 2px solid var(--hpq-border);
    border-radius: var(--hpq-radius);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
}
.hpq-style-card__radio { position: absolute; opacity: 0; pointer-events: none; }
.hpq-style-card.is-selected { border-color: var(--hpq-accent); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }
.hpq-style-card:hover { border-color: var(--hpq-blue); }
.hpq-style-card__img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}
.hpq-style-card__svg-wrap {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hpq-bg);
}
.hpq-box-svg { width: 60%; height: 60%; color: var(--hpq-blue); }
.hpq-style-card__name {
    padding: 8px;
    font-size: .75rem;
    font-weight: 600;
    text-align: center;
    color: var(--hpq-text);
    width: 100%;
}

/* Browse All Styles button */
.hpq-browse-all-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 2px dashed var(--hpq-border);
    border-radius: var(--hpq-radius);
    background: var(--hpq-bg);
    cursor: pointer;
    text-align: left;
    transition: border-color .2s, background .2s;
    color: var(--hpq-text);
}
.hpq-browse-all-btn:hover { border-color: var(--hpq-blue); background: #eff6ff; }
.hpq-browse-all-btn:focus-visible { outline: 2px solid var(--hpq-accent); outline-offset: 2px; }
.hpq-browse-all-btn__icon { flex-shrink: 0; color: var(--hpq-blue); }
.hpq-browse-all-btn__icon svg { width: 24px; height: 24px; display: block; }
.hpq-browse-all-btn__text { flex: 1; }
.hpq-browse-all-btn__text strong { display: block; font-size: .9rem; font-weight: 700; color: var(--hpq-accent); }
.hpq-browse-all-btn__text span   { display: block; font-size: .8rem; color: var(--hpq-muted); margin-top: 1px; }
.hpq-browse-all-btn__arrow { flex-shrink: 0; width: 18px; height: 18px; color: var(--hpq-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 2 – DIMENSIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-dimensions-wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; }
.hpq-box-diagram svg { width: 160px; height: 160px; display: block; }
.hpq-dimensions-fields { display: flex; flex-direction: column; gap: 16px; }

.hpq-field { display: flex; flex-direction: column; gap: 6px; }
.hpq-field--full { grid-column: 1 / -1; }
.hpq-label { font-size: .875rem; font-weight: 600; color: var(--hpq-text); }
.hpq-required { color: #dc2626; margin-left: 2px; }

.hpq-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--hpq-border);
    border-radius: 8px;
    font-size: .9rem;
    color: var(--hpq-text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.hpq-input:focus { outline: none; border-color: var(--hpq-accent); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }

.hpq-input-unit-wrap { position: relative; display: flex; }
.hpq-input-unit-wrap .hpq-input { padding-right: 52px; }
.hpq-unit-badge {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
    color: var(--hpq-muted);
    background: var(--hpq-bg);
    border-left: 1.5px solid var(--hpq-border);
    border-radius: 0 8px 8px 0;
    pointer-events: none;
}
.hpq-textarea { resize: vertical; min-height: 80px; }

/* Unit toggle */
.hpq-unit-toggle { display: flex; gap: 0; border: 1.5px solid var(--hpq-border); border-radius: 8px; overflow: hidden; width: fit-content; }
.hpq-unit-btn {
    padding: 8px 14px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--hpq-muted);
    background: #fff;
    border-right: 1px solid var(--hpq-border);
    transition: background .15s, color .15s;
    line-height: 1;
}
.hpq-unit-btn:last-child { border-right: none; }
.hpq-unit-radio { display: none; }
.hpq-unit-btn.is-active, .hpq-unit-btn:has(.hpq-unit-radio:checked) {
    background: var(--hpq-accent);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 3, 4, 6 – OPTION LIST (radio rows)
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-option-list { display: flex; flex-direction: column; gap: 8px; }
.hpq-option-radio { display: none; }
.hpq-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--hpq-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
}
.hpq-option-row:hover { border-color: var(--hpq-blue); background: #eff6ff; }
.hpq-option-row.is-selected { border-color: var(--hpq-accent); background: #eff6ff; }
.hpq-option-row__label { flex: 1; font-size: .9rem; font-weight: 500; }
.hpq-option-row__check {
    width: 20px;
    height: 20px;
    border: 2px solid var(--hpq-border);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background .2s, border-color .2s;
}
.hpq-option-row.is-selected .hpq-option-row__check {
    background: var(--hpq-accent);
    border-color: var(--hpq-accent);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8l3 3 5-5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Material swatches */
.hpq-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.08);
}
.hpq-swatch--sbs        { background: #ffffff; border-color: #d1d5db; }
.hpq-swatch--kraft      { background: #d4a76a; }
.hpq-swatch--corrugated { background: repeating-linear-gradient(90deg, #f5e6c8 0 4px, #e0c89a 4px 8px); }
.hpq-swatch--rigid      { background: linear-gradient(135deg, #1e293b 50%, #334155); }
.hpq-swatch--other      { background: #e5e7eb; }

/* Print icons */
.hpq-print-icon { font-size: 1.2rem; width: 28px; text-align: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 5 – FINISHES GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-finishes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.hpq-finish-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 2px solid var(--hpq-border);
    border-radius: var(--hpq-radius);
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    text-align: center;
}
.hpq-finish-card:hover { border-color: var(--hpq-blue); }
.hpq-finish-card.is-selected { border-color: var(--hpq-accent); box-shadow: 0 0 0 3px rgba(26,86,219,.13); }
.hpq-finish-check { display: none; }
.hpq-finish-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.08);
}
.hpq-finish-swatch--dark   { background: #1e293b; }
.hpq-finish-swatch--light  { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
.hpq-finish-swatch--gold   { background: linear-gradient(135deg, #f6d365 0%, #c19a3a 100%); }
.hpq-finish-swatch--silver { background: linear-gradient(135deg, #e8e8e8 0%, #adb5bd 100%); }
.hpq-finish-card__label { font-size: .78rem; font-weight: 600; color: var(--hpq-text); line-height: 1.3; }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 6 – CUSTOM QTY
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-custom-qty-field {
    padding: 12px 14px;
    background: var(--hpq-bg);
    border-radius: 8px;
    border: 1px solid var(--hpq-border);
    margin-top: 4px;
    animation: hpq-fadein .2s ease;
}
.hpq-custom-qty-field[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 7 – FILE UPLOAD
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-dropzone {
    border: 2px dashed var(--hpq-border);
    border-radius: var(--hpq-radius);
    padding: 36px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--hpq-text);
}
.hpq-dropzone:hover, .hpq-dropzone.is-dragover { border-color: var(--hpq-blue); background: #eff6ff; }
.hpq-dropzone:focus-visible { outline: 2px solid var(--hpq-accent); outline-offset: 2px; }
.hpq-dropzone__icon svg { width: 48px; height: 48px; color: var(--hpq-blue); margin-bottom: 4px; }
.hpq-dropzone strong { font-size: .95rem; }
.hpq-dropzone span   { font-size: .875rem; color: var(--hpq-muted); }
.hpq-dropzone small  { font-size: .8rem; color: #9ca3af; }
.hpq-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

.hpq-upload-btns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hpq-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--hpq-border);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--hpq-text);
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, background .2s;
    position: relative;
    overflow: hidden;
}
.hpq-upload-btn:hover { border-color: var(--hpq-blue); background: var(--hpq-bg); }
.hpq-upload-btn svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--hpq-blue); }
.hpq-upload-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.hpq-file-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hpq-file-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--hpq-bg);
    border-radius: 8px;
    border: 1px solid var(--hpq-border);
    font-size: .85rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STEP 8 – CONTACT FIELDS
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }

.hpq-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--hpq-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .01em;
}
.hpq-submit-btn:hover { background: #1447c0; }
.hpq-submit-btn:active { transform: scale(.98); }
.hpq-submit-btn:disabled { background: #93c5fd; cursor: not-allowed; }

.hpq-privacy-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: .78rem;
    color: var(--hpq-muted);
    justify-content: center;
}
.hpq-privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV BAR (Back / indicator / Next)
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--hpq-bg);
    border-top: 1px solid var(--hpq-border);
    margin: 0 -24px -24px;
}
.hpq-nav__back,
.hpq-nav__next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    border: 1.5px solid var(--hpq-border);
    background: #fff;
    color: var(--hpq-text);
}
.hpq-nav__back svg, .hpq-nav__next svg { width: 18px; height: 18px; }
.hpq-nav__back:hover { border-color: var(--hpq-muted); }
.hpq-nav__next { background: var(--hpq-accent); color: #fff; border-color: var(--hpq-accent); }
.hpq-nav__next:hover { background: #1447c0; }
.hpq-nav__indicator { font-size: .8rem; color: var(--hpq-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHT SUMMARY PANEL
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-summary {
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid var(--hpq-border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--hpq-shadow);
}
.hpq-summary__heading {
    font-size: .95rem;
    font-weight: 700;
    color: var(--hpq-brand);
    margin: 0 0 12px;
}
.hpq-summary__subheading {
    font-size: .8rem;
    font-weight: 600;
    color: var(--hpq-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 14px 0 8px;
}
.hpq-summary__preview {
    aspect-ratio: 1;
    background: var(--hpq-bg);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    border: 1px solid var(--hpq-border);
}
.hpq-summary__placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hpq-summary__placeholder span { font-size: .78rem; color: var(--hpq-muted); text-align: center; }
.hpq-summary__img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hpq-summary__style-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    padding: 6px 8px;
    text-align: center;
}
.hpq-summary__style-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--hpq-blue);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.hpq-summary__list { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hpq-summary__row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; border-bottom: 1px solid var(--hpq-border); }
.hpq-summary__row:last-child { border-bottom: none; padding-bottom: 0; }
.hpq-summary__row dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--hpq-muted); }
.hpq-summary__row dd { font-size: .82rem; font-weight: 600; color: var(--hpq-text); margin: 0; }
.hpq-summary__value--empty { color: var(--hpq-muted); font-weight: 400; }

.hpq-summary__secure {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: .72rem;
    color: var(--hpq-muted);
    justify-content: center;
}
.hpq-summary__secure svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   BROWSE ALL MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-end; justify-content: center; }
.hpq-modal[hidden] { display: none; }
.hpq-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.hpq-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 860px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0,0,0,.2);
    animation: hpq-slide-up .3s cubic-bezier(.4,0,.2,1);
}
@keyframes hpq-slide-up { from { transform: translateY(100%); } to { transform: none; } }

.hpq-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 14px;
    border-bottom: 1px solid var(--hpq-border);
}
.hpq-modal__header h2 { font-size: 1.1rem; font-weight: 700; color: var(--hpq-brand); margin: 0; }
.hpq-modal__close {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--hpq-border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: var(--hpq-muted);
    transition: background .15s;
}
.hpq-modal__close:hover { background: var(--hpq-bg); }
.hpq-modal__close svg { width: 18px; height: 18px; }

.hpq-modal__search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--hpq-border);
}
.hpq-modal__search-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--hpq-muted); }
.hpq-modal__search {
    flex: 1;
    border: none;
    outline: none;
    font-size: .9rem;
    color: var(--hpq-text);
    background: none;
}

.hpq-modal__filters {
    display: flex;
    gap: 6px;
    padding: 12px 24px;
    overflow-x: auto;
    border-bottom: 1px solid var(--hpq-border);
    scrollbar-width: none;
}
.hpq-modal__filters::-webkit-scrollbar { display: none; }
.hpq-modal__filter-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--hpq-border);
    border-radius: 20px;
    font-size: .83rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
    color: var(--hpq-muted);
    transition: background .15s, color .15s, border-color .15s;
}
.hpq-modal__filter-btn:hover { border-color: var(--hpq-blue); color: var(--hpq-blue); }
.hpq-modal__filter-btn.is-active { background: var(--hpq-accent); border-color: var(--hpq-accent); color: #fff; }

.hpq-modal__grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    align-content: start;
}
.hpq-modal__loading, .hpq-modal__empty {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--hpq-muted);
    font-size: .9rem;
    padding: 40px;
}
.hpq-modal__item { display: flex; flex-direction: column; gap: 6px; }
.hpq-modal__item-thumb {
    aspect-ratio: 1;
    background: var(--hpq-bg);
    border-radius: var(--hpq-radius);
    overflow: hidden;
    border: 1.5px solid var(--hpq-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .2s;
}
.hpq-modal__item-thumb:hover { border-color: var(--hpq-blue); }
.hpq-modal__item-name { font-size: .8rem; font-weight: 600; color: var(--hpq-text); text-align: center; }
.hpq-modal__choose-btn {
    padding: 7px;
    border: 1.5px solid var(--hpq-accent);
    border-radius: 7px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--hpq-accent);
    background: #fff;
    cursor: pointer;
    width: 100%;
    transition: background .15s, color .15s;
}
.hpq-modal__choose-btn:hover { background: var(--hpq-accent); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════════════════════ */
.hpq-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--hpq-border);
    border-top-color: var(--hpq-blue);
    border-radius: 50%;
    animation: hpq-spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes hpq-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hpq-wrap { grid-template-columns: 1fr; }
    .hpq-sidebar, .hpq-summary { position: static; }
    .hpq-sidebar { display: none; }
    .hpq-summary { display: none; }
}
@media (max-width: 768px) {
    .hpq-style-grid     { grid-template-columns: repeat(2, 1fr); }
    .hpq-finishes-grid  { grid-template-columns: repeat(2, 1fr); }
    .hpq-contact-fields { grid-template-columns: 1fr; }
    .hpq-dimensions-wrap { grid-template-columns: 1fr; }
    .hpq-box-diagram { display: none; }
    .hpq-modal__grid  { grid-template-columns: repeat(2, 1fr); }
    .hpq-upload-btns  { flex-direction: column; }
    .hpq-stepper__label { display: none; }
}
@media (max-width: 480px) {
    .hpq-form { padding: 16px; }
    .hpq-nav  { padding: 12px 16px; }
    .hpq-style-grid { grid-template-columns: 1fr 1fr; }
    .hpq-finishes-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY – reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .hpq-step, .hpq-modal__panel, .hpq-custom-qty-field { animation: none; }
}
.hpq-style-card__name {
  display: none;
}

.hpq-style-card__name {
  display: none;
}

.hpq-style-card__name {
  display: none;
}

.hpq-style-card__name {
  display: none;
}
.hpq-style-grid {
  grid-template-columns: repeat(4, 1fr);
  width: auto;
  max-width: 600px;
  gap: 8px;
}

.hpq-style-card.is-selected {
  width: 120px;
  height: 120px;
}

.hpq-style-card {
  width: 120px;
  height: 120px;
}

.hpq-style-card {
  width: 120px;
  height: 120px;
}
/* Field-mapping additions for premium 8-step quote form */
.hpq-subsection{margin-top:18px;padding-top:16px;border-top:1px solid rgba(90,159,224,.18)}
.hpq-subsection__title{margin:0 0 10px;font-size:13px;font-weight:800;color:#010302}
.hpq-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hpq-field--full{grid-column:1/-1}
.hpq-checkbox-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hpq-checkbox-pill{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid rgba(90,159,224,.22);border-radius:12px;background:#fff;font-size:13px;font-weight:600;color:#25364d;cursor:pointer}
.hpq-checkbox-pill input{accent-color:#5a9fe0}
.hpq-checkbox-pill:has(input:checked){border-color:#5a9fe0;background:#f0f7ff;color:#010302}
@media(max-width:640px){.hpq-mini-grid,.hpq-checkbox-grid{grid-template-columns:1fr}.hpq-subsection{margin-top:14px;padding-top:14px}}

/* -- Style card thumb (image wrapper) ------------------------------------- */
.hpq-style-card__thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hpq-style-card__thumb--icon {
    background: var(--hpq-bg);
}
.hpq-style-card__thumb .hpq-style-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================================================== 
   Mobile responsive fix v3 — scoped to the actual main quote form wrapper only
   Actual structure inspected: #hpq-quote-form-wrap[data-hpq] > aside.hpq-sidebar + main.hpq-form-card + aside.hpq-summary
   ========================================================================== */
#hpq-quote-form-wrap[data-hpq],
#hpq-quote-form-wrap[data-hpq] * { box-sizing: border-box; }

#hpq-quote-form-wrap[data-hpq] {
    width: 100%;
    max-width: 1252px;
    grid-template-columns: minmax(190px,250px) minmax(0,1fr) minmax(190px,250px);
    overflow: visible;
}
#hpq-quote-form-wrap[data-hpq] .hpq-form-card { min-width: 0; }
#hpq-quote-form-wrap[data-hpq] #hpq-form { min-width: 0; }
#hpq-quote-form-wrap[data-hpq] .hpq-input,
#hpq-quote-form-wrap[data-hpq] select,
#hpq-quote-form-wrap[data-hpq] textarea { max-width: 100%; }

/* Compact cards and exact step grids */
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    gap: 10px;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card {
    width: auto;
    height: auto;
    min-height: 118px;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__img,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__svg-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / .78;
    object-fit: contain;
    background: #f8fbff;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__name {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    padding: 7px 6px;
    overflow-wrap: anywhere;
}

#hpq-quote-form-wrap[data-hpq] fieldset[data-step="3"] > .hpq-option-list,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] > .hpq-option-list,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="6"] > .hpq-option-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] .hpq-checkbox-grid,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="5"] .hpq-finishes-grid,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="7"] .hpq-checkbox-grid--radio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="3"] .hpq-checkbox-grid,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="6"] .hpq-checkbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
#hpq-quote-form-wrap[data-hpq] .hpq-option-row,
#hpq-quote-form-wrap[data-hpq] .hpq-checkbox-pill,
#hpq-quote-form-wrap[data-hpq] .hpq-finish-card {
    min-width: 0;
    min-height: 46px;
    padding: 10px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
#hpq-quote-form-wrap[data-hpq] .hpq-option-row__label,
#hpq-quote-form-wrap[data-hpq] .hpq-checkbox-pill span,
#hpq-quote-form-wrap[data-hpq] .hpq-finish-card__label { font-size: 12px; }
#hpq-quote-form-wrap[data-hpq] input[type="radio"],
#hpq-quote-form-wrap[data-hpq] input[type="checkbox"] {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin: 0;
    accent-color: #5a9fe0;
}
#hpq-quote-form-wrap[data-hpq] .hpq-style-card__radio { width: 1px; height: 1px; }

/* Submit state */
#hpq-quote-form-wrap[data-hpq] #hpq-submit-btn { min-height: 50px; }
#hpq-quote-form-wrap[data-hpq] #hpq-submit-btn.is-sending::after {
    content: "";
    width: 15px;
    height: 15px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,.55);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    animation: hpq-spin .8s linear infinite;
}
@keyframes hpq-spin { to { transform: rotate(360deg); } }
#hpq-quote-form-wrap[data-hpq] .hp-field-invalid {
    border-color: #b42318 !important;
    box-shadow: 0 0 0 3px rgba(180,35,24,.12) !important;
}

@media (max-width: 1024px) {
    #hpq-quote-form-wrap[data-hpq] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding-left: 12px;
        padding-right: 12px;
        overflow-x: clip;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-sidebar {
        display: block;
        position: static;
        order: 1;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-form-card {
        order: 2;
        width: 100%;
        max-width: 100%;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-summary {
        display: block;
        position: static;
        order: 3;
        width: 100%;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-summary__preview {
        aspect-ratio: auto;
        min-height: 92px;
    }
}

@media (max-width: 768px) {
    #hpq-quote-form-wrap[data-hpq] { padding: 10px; }
    #hpq-quote-form-wrap[data-hpq] .hpq-form { padding: 16px; }
    #hpq-quote-form-wrap[data-hpq] .hpq-stepper {
        padding: 12px 14px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-stepper__line { width: 14px; }
    #hpq-quote-form-wrap[data-hpq] .hpq-stepper__circle { width: 26px; height: 26px; font-size: 11px; }
    #hpq-quote-form-wrap[data-hpq] .hpq-contact-fields,
    #hpq-quote-form-wrap[data-hpq] .hpq-mini-grid,
    #hpq-quote-form-wrap[data-hpq] .hpq-dimensions-wrap { grid-template-columns: 1fr; }
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="3"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="6"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] .hpq-checkbox-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="5"] .hpq-finishes-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="7"] .hpq-checkbox-grid--radio {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-nav {
        gap: 10px;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-nav__indicator {
        order: -1;
        width: 100%;
        text-align: center;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-nav__back,
    #hpq-quote-form-wrap[data-hpq] .hpq-nav__next,
    #hpq-quote-form-wrap[data-hpq] #hpq-submit-btn,
    #hpq-quote-form-wrap[data-hpq] .hpq-upload-btn,
    #hpq-quote-form-wrap[data-hpq] .hpq-browse-all-btn {
        width: 100%;
        justify-content: center;
        min-height: 46px;
    }
}

@media (max-width: 520px) {
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="3"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="6"] > .hpq-option-list,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="3"] .hpq-checkbox-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="6"] .hpq-checkbox-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="4"] .hpq-checkbox-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="5"] .hpq-finishes-grid,
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="7"] .hpq-checkbox-grid--radio {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-option-row,
    #hpq-quote-form-wrap[data-hpq] .hpq-checkbox-pill,
    #hpq-quote-form-wrap[data-hpq] .hpq-finish-card {
        padding: 8px 7px;
        min-height: 42px;
        gap: 6px;
    }
    #hpq-quote-form-wrap[data-hpq] .hpq-option-row__label,
    #hpq-quote-form-wrap[data-hpq] .hpq-checkbox-pill span,
    #hpq-quote-form-wrap[data-hpq] .hpq-finish-card__label { font-size: 11px; }
    #hpq-quote-form-wrap[data-hpq] .hpq-input,
    #hpq-quote-form-wrap[data-hpq] textarea,
    #hpq-quote-form-wrap[data-hpq] select { width: 100%; font-size: 16px; }
}


/* Main quote form only: final urgent fixes */
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card {
    min-height: 0;
    padding: 0;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__img,
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__svg-wrap {
    aspect-ratio: 1 / .76;
    height: auto;
    object-fit: contain;
}
#hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-card__name {
    display: none !important;
}
#hpq-quote-form-wrap[data-hpq] .hpq-nav__next[hidden] {
    display: none !important;
}
#hpq-quote-form-wrap[data-hpq] .hpq-submit-btn.is-sending {
    position: relative;
    opacity: .82;
    cursor: wait;
}
#hpq-quote-form-wrap[data-hpq] .hpq-submit-btn.is-sending::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -2px;
    animation: hpqSubmitSpin .75s linear infinite;
}
@keyframes hpqSubmitSpin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    #hpq-quote-form-wrap[data-hpq] fieldset[data-step="1"] .hpq-style-grid {
        grid-template-columns: 1fr;
    }
}
#hpq-quote-form-wrap[data-hpq] .hpq-summary__preview {
  height: auto;
  overflow: visible;
  max-height: none;
  min-height: 200px;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgb(221, 221, 221);
  border-radius: 8px;
  padding: 10px;
  justify-content: center;
  align-items: center;
  background: rgb(249, 249, 249);
  display: flex;
  flex-direction: column;
}

img#hpq-preview-img {
  object-fit: contain;
  width: 100%;
  height: auto;
  max-width: 250px;
  display: block;
  margin: 0px auto;
}

div#hpq-preview-name {
  display: none;
}

span#hpq-preview-badge {
  display: none;
}
@media (max-width: 600px) {
  div#hpq-preview-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 200px !important;
  }
  
  /* Hide the placeholder icon and text */
  div#hpq-preview-placeholder {
    display: none !important;
  }
  
  img#hpq-preview-img {
    display: block !important;
    position: static !important; /* Remove absolute positioning */
    width: 100% !important;
    height: auto !important;
    max-width: 250px !important;
    margin: 0 auto !important;
  }
}
