/* ════════════════════════════════════════════════════════════════════
 * ChinaHub Quick-Add Modal v17 — TEMU DESKTOP+MOBILE EDITION
 * Desktop: Image left, info right (Temu style)
 * Mobile: Stacked vertically
 * Identifier: CH_QA_V17_TEMU
 * ════════════════════════════════════════════════════════════════════ */

/* Add-button loading states */
.ch-qa-loading { position: relative; cursor: wait; opacity: .85; }
.ch-qa-loading::after {
    content: '';
    position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: chqaSpin .6s linear infinite;
}
.ch-qa-added {
    background: linear-gradient(135deg, #16A34A, #15803D) !important;
    color: #FFF !important;
}
@keyframes chqaSpin { to { transform: rotate(360deg); } }

/* Toast */
.ch-qa-toast {
    position: fixed; bottom: 28px; inset-inline-end: 28px;
    background: #18181B; color: #FFF;
    padding: 14px 22px; border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
    font: 800 14px/1.4 'Cairo','Inter',-apple-system,sans-serif;
    z-index: 100000; opacity: 0; transform: translateY(20px);
    transition: all .3s cubic-bezier(.16,1,.3,1);
    display: flex; align-items: center; gap: 10px;
    max-width: 92vw; pointer-events: none;
}
.ch-qa-toast.show { opacity: 1; transform: translateY(0); }
.ch-qa-toast.success { background: linear-gradient(135deg, #16A34A, #15803D); }
.ch-qa-toast.error { background: linear-gradient(135deg, #DC2626, #991B1B); }

/* ════════════════════════════════════════════════════════════════════
   MODAL
   ════════════════════════════════════════════════════════════════════ */
.ch-qa-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: none;
    align-items: flex-end; justify-content: center;
    font-family: 'Cairo','Inter',-apple-system,Segoe UI,sans-serif;
    color: #18181B;
}
.ch-qa-modal.show { display: flex; }
.ch-qa-overlay {
    position: absolute; inset: 0;
    background: rgba(15,23,42,.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: chqaFadeIn .25s ease;
}
@keyframes chqaFadeIn { from { opacity: 0; } to { opacity: 1; } }

.ch-qa-sheet {
    position: relative;
    background: #FFF;
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    z-index: 1;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 60px rgba(0,0,0,.3);
    animation: chqaSlideUp .38s cubic-bezier(.16,1,.3,1);
    -webkit-overflow-scrolling: touch;
}
@keyframes chqaSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.ch-qa-drag {
    width: 44px; height: 5px;
    background: #D4D4D8;
    border-radius: 99px;
    margin: 10px auto 0;
}

.ch-qa-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    width: 40px; height: 40px;
    background: rgba(255,255,255,.95);
    border: none; border-radius: 50%;
    cursor: pointer;
    color: #18181B;
    z-index: 20;
    font-size: 26px; font-weight: 300;
    line-height: 1;
    font-family: inherit;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
    transition: transform .15s ease;
}
.ch-qa-close:hover { transform: scale(1.1); }

/* ════════════════════════════════════════════════════════════════════
   GRID — Mobile: stacked. Desktop: image left, info right
   ════════════════════════════════════════════════════════════════════ */
.ch-qa-grid {
    display: block;
}

/* LEFT column (image gallery) */
.ch-qa-left {
    background: #FFF;
}
.ch-qa-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, #FFF7F0 0%, #FFEDDC 100%);
    overflow: hidden;
}
@supports not (aspect-ratio: 1 / 1) {
    .ch-qa-hero { padding-bottom: 100%; }
    .ch-qa-hero-img { position: absolute; inset: 0; }
}
.ch-qa-hero-img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: opacity .2s ease;
}
.ch-qa-disc-bdg {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: linear-gradient(135deg, #FB6E1C 0%, #DC2626 100%);
    color: #FFF;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px; font-weight: 900; line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
    box-shadow: 0 4px 14px rgba(229,81,0,.4);
    z-index: 2;
}

/* Thumbnail strip */
.ch-qa-gallery-strip {
    display: flex; gap: 8px;
    padding: 10px 14px;
    overflow-x: auto; overflow-y: hidden;
    background: #FFF;
    border-bottom: 1px solid #F4F4F5;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.ch-qa-gallery-strip::-webkit-scrollbar { height: 4px; }
.ch-qa-gallery-strip::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 99px; }
.ch-qa-gal-thumb {
    width: 52px; height: 52px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1.5px #E4E4E7;
    cursor: pointer;
    padding: 0; overflow: hidden;
    background: #FFF;
    transition: all .15s ease;
}
.ch-qa-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-qa-gal-thumb.active {
    border-color: #FB6E1C;
    box-shadow: 0 0 0 1.5px #FB6E1C, 0 4px 10px rgba(251,110,28,.3);
}

/* ════════════════════════════════════════════════════════════════════
   RIGHT column (info, options, CTA)
   ════════════════════════════════════════════════════════════════════ */
.ch-qa-right {
    padding: 14px 16px 88px; /* tighter, space for sticky CTA on mobile */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ch-qa-name {
    font-size: 15px;
    font-weight: 700;
    color: #18181B;
    line-height: 1.4;
    margin: 0;
    letter-spacing: -.005em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ch-qa-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #71717A;
    font-weight: 600;
}
.ch-qa-meta b { color: #18181B; font-weight: 800; }
.ch-qa-meta-sep { color: #D4D4D8; }
.ch-qa-stars { color: #FB6E1C; font-size: 13px; }

.ch-qa-best {
    display: inline-flex;
    align-items: center;
    background: #DCFCE7;
    color: #15803D;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 11.5px;
    font-weight: 800;
    align-self: flex-start;
    letter-spacing: -.005em;
}

.ch-qa-prices {
    display: flex;
    align-items: baseline;
    gap: 9px;
    margin-top: 2px;
    flex-wrap: wrap;
}
.ch-qa-cmp {
    font-size: 13.5px;
    color: #A1A1AA;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    font-weight: 700;
}
.ch-qa-price {
    font-size: 28px;
    font-weight: 900;
    color: #18181B;
    line-height: 1;
    letter-spacing: -.04em;
}

.ch-qa-disc-chip {
    display: inline-block;
    background: #FB6E1C;
    color: #FFF;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 900;
    align-self: flex-start;
    letter-spacing: -.005em;
    box-shadow: 0 3px 8px rgba(251,110,28,.25);
}

/* ════════════════════════════════════════════════════════════════════
   OPTIONS GROUPS — compact
   ════════════════════════════════════════════════════════════════════ */
.ch-qa-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}
.ch-qa-group { display: block; }
.ch-qa-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
}
.ch-qa-label > span:first-child { color: #18181B; font-weight: 700; }
.ch-qa-label b { color: #18181B; font-weight: 900; margin-inline-start: 4px; }
.ch-qa-warn { color: #E60023; font-weight: 900; font-size: 11.5px; }

.ch-qa-opts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── COLOR PICKER (image-based, Temu style) ─── */
.ch-qa-opts-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}
.ch-qa-opt-color-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 3px;
    cursor: pointer;
    font-family: inherit;
    border-radius: 10px;
    transition: all .2s ease;
    position: relative;
}
.ch-qa-opt-color-img:hover:not(.disabled) { transform: translateY(-1px); }

.ch-qa-color-disc {
    position: absolute;
    top: -2px;
    inset-inline-start: -2px;
    background: linear-gradient(135deg, #FB6E1C, #DC2626);
    color: #FFF;
    font-size: 9.5px;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 5px 0 5px 0;
    z-index: 2;
    line-height: 1;
    letter-spacing: -.005em;
    box-shadow: 0 2px 5px rgba(229,81,0,.4);
}

.ch-qa-color-thumb {
    width: 66px; height: 66px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2.5px solid #FFF;
    box-shadow: 0 0 0 1.5px #E4E4E7, 0 2px 6px rgba(0,0,0,.05);
    transition: all .2s ease;
}
.ch-qa-color-name {
    font-size: 11px;
    font-weight: 700;
    color: #52525B;
    text-align: center;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.ch-qa-opt-color-img.selected .ch-qa-color-thumb {
    box-shadow: 0 0 0 2.5px #FB6E1C, 0 6px 14px rgba(251,110,28,.35);
    transform: scale(1.04);
}
.ch-qa-opt-color-img.selected .ch-qa-color-name {
    color: #E55100;
    font-weight: 900;
}
.ch-qa-opt-color-img.disabled { opacity: .35; cursor: not-allowed; }

/* Legacy color circles fallback */
.ch-qa-opt-color {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2.5px solid #FFF;
    box-shadow: 0 0 0 1.5px #E4E4E7;
    cursor: pointer;
    flex-shrink: 0; padding: 0;
    background-clip: padding-box;
    font-family: inherit;
    transition: all .2s ease;
}
.ch-qa-opt-color.selected {
    box-shadow: 0 0 0 2.5px #FB6E1C, 0 4px 10px rgba(251,110,28,.4);
}

/* ─── SIZE GRID — compact ─── */
.ch-qa-opts-sizes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 7px;
}
.ch-qa-opt-size {
    padding: 9px 6px;
    border: 1.5px solid #E4E4E7;
    background: #FFF;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    color: #18181B;
    font-family: inherit;
    line-height: 1;
    text-align: center;
    transition: all .15s ease;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ch-qa-opt-size:hover:not(.disabled) {
    border-color: #FB6E1C;
}
.ch-qa-opt-size.selected {
    border-color: #FB6E1C;
    background: #FFF7F0;
    color: #E55100;
    font-weight: 900;
    box-shadow: 0 3px 8px rgba(251,110,28,.18);
}
.ch-qa-opt-size.disabled {
    opacity: .4;
    text-decoration: line-through;
    cursor: not-allowed;
    background: #FAFAFA;
}

/* ════════════════════════════════════════════════════════════════════
   STICKY FOOTER CTA (mobile only — desktop has it inline)
   ════════════════════════════════════════════════════════════════════ */
.ch-qa-foot {
    position: sticky;
    bottom: 0;
    left: 0; right: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.6) 0%, #FFF 35%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px 16px;
    margin: 10px -16px -88px;
    z-index: 5;
    border-top: 1px solid #F4F4F5;
}
.ch-qa-add {
    width: 100%;
    background: linear-gradient(135deg, #FB6E1C 0%, #DC2626 100%);
    color: #FFF;
    border: none;
    padding: 13px;
    border-radius: 99px;
    font-size: 14.5px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(229,81,0,.4);
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    letter-spacing: -.012em;
}
.ch-qa-add::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
    animation: chqaShine 2.8s infinite;
}
@keyframes chqaShine { to { left: 200%; } }
.ch-qa-add:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(229,81,0,.55);
}
.ch-qa-add:disabled {
    background: #E4E4E7;
    color: #71717A;
    cursor: not-allowed;
    box-shadow: none;
    text-shadow: none;
}
.ch-qa-add:disabled::after { display: none; }

.ch-qa-spin {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2.5px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: chqaSpin .6s linear infinite;
}

/* ════════════════════════════════════════════════════════════════════
   DESKTOP — side-by-side (>= 768px)
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .ch-qa-modal {
        align-items: center;
        padding: 24px;
    }
    .ch-qa-sheet {
        border-radius: 20px;
        max-height: 92vh;
        max-width: 920px;
        width: 920px;
        box-shadow: 0 24px 60px rgba(0,0,0,.3);
        overflow: hidden; /* grid will handle scrolling */
    }
    @keyframes chqaSlideUp {
        from { transform: translateY(30px) scale(.96); opacity: 0; }
        to   { transform: translateY(0) scale(1); opacity: 1; }
    }
    .ch-qa-drag { display: none; }

    /* Side-by-side grid */
    .ch-qa-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        max-height: 92vh;
    }
    .ch-qa-left {
        position: relative;
        overflow-y: auto;
        max-height: 92vh;
        padding: 16px;
        border-inline-end: 1px solid #F4F4F5;
    }
    .ch-qa-hero {
        border-radius: 12px;
    }
    .ch-qa-gallery-strip {
        border-bottom: none;
        padding: 12px 0 0;
    }
    .ch-qa-right {
        overflow-y: auto;
        max-height: 92vh;
        padding: 18px 20px 18px;
    }
    /* On desktop CTA is in flow, not sticky */
    .ch-qa-foot {
        position: relative;
        background: none;
        backdrop-filter: none;
        border-top: none;
        padding: 6px 0 0;
        margin: 0;
    }
    .ch-qa-name { font-size: 16px; }
    .ch-qa-price { font-size: 32px; }
}

/* ─── Mobile < 380px tweaks ─── */
@media (max-width: 380px) {
    .ch-qa-right { padding: 16px 16px 96px; }
    .ch-qa-name { font-size: 15.5px; }
    .ch-qa-price { font-size: 30px; }
    .ch-qa-color-thumb { width: 76px; height: 76px; }
    .ch-qa-opts-colors { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); }
}

/* ─── RTL ─── */
[dir="rtl"] .ch-qa-modal { direction: rtl; }
[dir="rtl"] .ch-qa-color-disc { border-radius: 0 6px 0 6px; }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .ch-qa-sheet, .ch-qa-overlay, .ch-qa-add::after { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   QUICK-ADD SHEET v3 (.cqa) — Temu-style, dense
   ═══════════════════════════════════════════════════════════════════════ */
.cqa{--q-ink:#16181D;--q-ink2:#4B5060;--q-ink3:#8A8F9C;--q-line:#ECEDF0;--q-or:#FB7701;--q-or2:#FF5A00;--q-green:#0A8A3A}
.ch-qa-modal.cqa{position:fixed;inset:0;z-index:100060;display:none}
.ch-qa-modal.cqa.show{display:block}
.cqa .ch-qa-overlay{position:absolute;inset:0;background:rgba(10,12,16,.55);animation:none!important;opacity:1!important}
@keyframes cqaFade{from{opacity:0}to{opacity:1}}
.cqa .cqa-sheet{position:absolute;left:0;right:0;bottom:0;display:flex!important;flex-direction:column;max-height:88dvh;padding:0!important;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.18);overflow:hidden;animation:cqaUp .26s cubic-bezier(.2,.8,.2,1);opacity:1!important;font-family:inherit;color:var(--q-ink);transform:none!important;width:auto!important;max-width:none!important;top:auto!important}
@keyframes cqaUp{from{transform:translateY(40px)}to{transform:none}}
.cqa .cqa-grab{flex:none;width:38px;height:4px;border-radius:4px;background:#DADBDF;margin:7px auto 0}
/* header */
.cqa .cqa-hd{flex:none;position:relative;display:grid;grid-template-columns:96px minmax(0,1fr);gap:12px;padding:10px 14px 12px;border-bottom:1px solid var(--q-line)}
.cqa .cqa-ph{width:96px;height:96px;border-radius:10px;overflow:hidden;background:#F4F5F7}
.cqa .cqa-ph img{width:100%;height:100%;object-fit:cover;transition:opacity .2s}
.cqa .cqa-hd-tx{min-width:0;display:flex;flex-direction:column;gap:5px;padding-inline-end:34px;padding-top:2px}
.cqa .cqa-nm{margin:0;font-size:14px;color:var(--q-ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cqa .cqa-pr{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;direction:ltr;justify-content:flex-start}
[dir="rtl"] .cqa .cqa-pr{justify-content:flex-end}
.cqa .cqa-now{display:inline-flex;align-items:baseline;color:var(--q-or2);font-weight:800}
.cqa .cqa-now b{font-size:26px;font-weight:900;line-height:1;letter-spacing:-.5px}
.cqa .cqa-p-sym{font-size:15px;margin-inline-end:2px}
.cqa .cqa-p-dec{font-size:15px}
.cqa .cqa-pr s{font-size:13px;color:var(--q-ink3)}
.cqa .cqa-off{font-size:12.5px;font-weight:900;color:var(--q-or2);border:1.5px solid var(--q-or2);border-radius:5px;padding:0 5px;line-height:1.5}
.cqa .cqa-sub{font-size:12.5px;color:var(--q-ink2);font-weight:700}
.cqa .cqa-star{color:#FFB400}
.cqa .cqa-x{position:absolute;top:8px;inset-inline-end:10px;width:34px;height:34px;border:0;border-radius:50%;background:none;color:var(--q-ink);display:grid;place-items:center;cursor:pointer}
.cqa .cqa-x:hover{background:#F2F2F4}
.cqa .cqa-x svg{width:22px;height:22px}
/* body */
.cqa .cqa-bd{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 14px 14px}
.cqa .cqa-grp{padding:12px 0 2px}
.cqa .cqa-lbl{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;margin-bottom:9px;font-size:15px}
.cqa .cqa-lbl b{font-weight:800}
.cqa .cqa-lbl span{color:var(--q-ink2);font-weight:600}
.cqa .cqa-lbl em{font-style:normal;font-size:12.5px;font-weight:800;color:#D92D20;display:inline-flex;align-items:center;gap:3px}
.cqa .cqa-lbl em.cqa-low{color:var(--q-or2)}
.cqa .cqa-lbl em svg{width:13px;height:13px}
.cqa .cqa-grp.shake{animation:cqaShake .38s}
@keyframes cqaShake{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
/* colour photos */
.cqa .cqa-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:8px}
.cqa .cqa-tile{position:relative;display:flex;flex-direction:column;gap:4px;padding:0;border:0;background:none;cursor:pointer;text-align:center;font:inherit}
.cqa .cqa-tile img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;border:2px solid transparent;box-shadow:0 0 0 1px var(--q-line);transition:border-color .12s}
.cqa .cqa-tile span{font-size:11.5px;color:var(--q-ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cqa .cqa-tile.on img{border-color:var(--q-ink);box-shadow:none}
.cqa .cqa-tile.on span{color:var(--q-ink);font-weight:800}
.cqa .cqa-tile.off{opacity:.38;cursor:not-allowed}
/* pills */
.cqa .cqa-pills{display:flex;flex-wrap:wrap;gap:8px}
.cqa .cqa-pill{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:56px;height:40px;padding:0 16px;border:1.5px solid #CFD1D6;border-radius:999px;background:#fff;color:var(--q-ink);font:inherit;font-size:15px;font-weight:600;cursor:pointer;transition:border-color .12s}
.cqa .cqa-pill:hover:not(.off){border-color:var(--q-ink)}
.cqa .cqa-pill.on{border:2px solid var(--q-ink);font-weight:800;padding:0 15px}
.cqa .cqa-pill.off{color:#B6B9C0;border-style:dashed;cursor:not-allowed;background:linear-gradient(to top right,transparent calc(50% - .6px),#D6D8DD calc(50% - .6px),#D6D8DD calc(50% + .6px),transparent calc(50% + .6px))}
.cqa .cqa-dot{width:14px;height:14px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}
/* service + qty */
.cqa .cqa-svc{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;padding:16px 0 4px}
.cqa .cqa-svc-h{display:inline-flex;align-items:center;gap:4px;width:100%;font-size:15px;font-weight:800;color:var(--q-green)}
.cqa .cqa-svc-p{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 12px;border-radius:999px;background:var(--q-green);color:#fff;font-size:13px;font-weight:800}
.cqa .cqa-svc svg{width:14px;height:14px}
.cqa .cqa-qty{display:flex;align-items:center;gap:12px;padding:16px 0 4px}
.cqa .cqa-qty>b{font-size:15px;font-weight:800}
.cqa .cqa-step{display:inline-flex;align-items:center;height:38px;border:1.5px solid #CFD1D6;border-radius:8px;overflow:hidden}
.cqa .cqa-step button{width:40px;height:100%;border:0;background:#F6F6F7;color:var(--q-ink);font-size:20px;font-weight:700;cursor:pointer}
.cqa .cqa-step button:disabled{color:#C3C5CB;cursor:default}
.cqa .cqa-step output{min-width:46px;text-align:center;font-size:16px;font-weight:800}
.cqa .cqa-sold{display:inline-flex;align-items:center;gap:3px;color:var(--q-or2);font-weight:800;font-size:15px}
.cqa .cqa-sold svg{width:15px;height:15px}
/* sticky button */
.cqa .cqa-ft{flex:none;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--q-line);background:#fff}
.cqa .cqa-cta{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:52px;border:0;border-radius:999px;background:var(--q-or)!important;color:#fff!important;font:inherit;font-size:17px;font-weight:800;cursor:pointer;box-shadow:none;opacity:1!important;transition:filter .12s,transform .1s}
.cqa .cqa-cta.ready{background:linear-gradient(90deg,var(--q-or),var(--q-or2))!important;box-shadow:0 8px 20px rgba(255,90,0,.28)}
.cqa .cqa-cta:active{transform:scale(.99)}
.cqa .cqa-cta[disabled]{background:#C9CBD1!important;cursor:not-allowed}
.cqa .cqa-cta-sep{width:1px;height:18px;background:rgba(255,255,255,.45)}
/* computer: a centred dialog */
@media (min-width:761px){
  .cqa .cqa-sheet{left:50%!important;top:50%!important;bottom:auto!important;width:min(560px,calc(100vw - 48px))!important;max-height:min(760px,calc(100dvh - 48px));border-radius:18px;transform:translate(-50%,-50%)!important;animation:cqaIn .2s ease}
  @keyframes cqaIn{from{transform:translate(-50%,-47%)}to{transform:translate(-50%,-50%)}}
  .cqa .cqa-grab{display:none}
  .cqa .cqa-hd{padding:16px 18px 14px;grid-template-columns:110px minmax(0,1fr)}
  .cqa .cqa-ph{width:110px;height:110px}
  .cqa .cqa-bd{padding:4px 18px 16px}
  .cqa .cqa-ft{padding:12px 18px}
  .cqa .cqa-tiles{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}
}
@media (prefers-reduced-motion:reduce){.cqa .cqa-sheet,.cqa .ch-qa-overlay,.cqa .cqa-grp.shake{animation:none!important}}
.cqa .cqa-cta::after,.cqa .cqa-cta::before{display:none!important;content:none!important}

/* ═══ v3.1 — photos on top like Temu, name and price under them ═══ */
.cqa .cqa-sheet{max-height:92dvh}
.cqa .cqa-grab{position:absolute;top:0;left:50%;transform:translateX(-50%);z-index:3;margin-top:6px;background:rgba(255,255,255,.85)}
.cqa .cqa-x{position:absolute!important;top:10px!important;inset-inline-end:10px!important;z-index:4;width:34px;height:34px;border-radius:50%;background:rgba(0,0,0,.42)!important;color:#fff!important;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.cqa .cqa-x:hover{background:rgba(0,0,0,.6)!important}
.cqa .cqa-x svg{width:20px;height:20px}
.cqa .cqa-bd{padding:0 0 14px!important}
.cqa .cqa-bd > :not(.cqa-gal){margin-inline:14px}
.cqa .cqa-gal{display:flex;gap:6px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;background:#F4F5F7}
.cqa .cqa-gal::-webkit-scrollbar{display:none}
.cqa .cqa-gi{flex:0 0 calc(50% - 3px);aspect-ratio:3/4;scroll-snap-align:start;overflow:hidden;background:#EEF0F2}
.cqa .cqa-gal.one .cqa-gi{flex-basis:100%;aspect-ratio:4/3}
.cqa .cqa-gi img{width:100%;height:100%;object-fit:cover;display:block}
.cqa .cqa-info{padding:12px 0 2px;display:flex;flex-direction:column;gap:6px}
.cqa .cqa-info .cqa-nm{margin:0;font-size:15px;line-height:1.4;color:var(--q-ink2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal!important;text-overflow:clip!important}
.cqa .cqa-info .cqa-pr{gap:4px 8px}
.cqa .cqa-info .cqa-now b{font-size:28px}
.cqa .cqa-info .cqa-sub{margin-inline-start:4px}
.cqa .cqa-grp{padding-top:14px}
@media (min-width:761px){
  .cqa .cqa-sheet{width:min(600px,calc(100vw - 48px))!important;max-height:min(820px,calc(100dvh - 40px))}
  .cqa .cqa-gi{flex-basis:calc(33.333% - 4px);aspect-ratio:3/4}
  .cqa .cqa-gal.one .cqa-gi{flex-basis:100%;aspect-ratio:16/9}
  .cqa .cqa-bd > :not(.cqa-gal){margin-inline:20px}
}

/* ═══ v3.3 — computer: a two-column window (photos on the left, choices on the right) ═══ */
@media (min-width:761px){
  .cqa .cqa-sheet{width:min(900px,calc(100vw - 48px))!important;max-height:min(640px,calc(100dvh - 48px))!important}
  .cqa .cqa-x{background:#F2F2F4!important;color:#16181D!important;backdrop-filter:none;-webkit-backdrop-filter:none;top:12px!important;inset-inline-end:12px!important}
  .cqa .cqa-x:hover{background:#E6E7EA!important}
  .cqa .cqa-bd{display:grid!important;grid-template-columns:minmax(0,380px) minmax(0,1fr);column-gap:26px;align-content:start;padding:22px 22px 96px!important}
  .cqa .cqa-bd > *{grid-column:2;margin-inline:0!important}
  .cqa .cqa-bd > .cqa-gal{grid-column:1;grid-row:1 / span 40;align-self:start;position:sticky;top:0;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;overflow:visible;background:none;scroll-snap-type:none}
  .cqa .cqa-gal .cqa-gi{flex:none;aspect-ratio:1;border-radius:8px;cursor:pointer;border:1px solid #ECEDF0;box-sizing:border-box}
  .cqa .cqa-gal .cqa-gi:hover{border-color:#16181D}
  .cqa .cqa-gal .cqa-gi:first-child{grid-column:1 / -1;border-radius:12px;cursor:default}
  .cqa .cqa-gal .cqa-gi:nth-child(n+7){display:none}
  .cqa .cqa-gal.one .cqa-gi{aspect-ratio:1}
  .cqa .cqa-info{padding:6px 44px 4px 0!important}
  [dir="rtl"] .cqa .cqa-info{padding:6px 0 4px 44px!important}
  .cqa .cqa-info .cqa-nm{font-size:16px;color:#16181D;-webkit-line-clamp:3}
  .cqa .cqa-ft{position:absolute;bottom:0;inset-inline-end:0;width:calc(100% - 428px);border-top:0!important;padding:14px 22px 18px!important;background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 22%)}
}

/* ═══ v3.4 — bold product name, denser window ═══ */
.cqa .cqa-info{padding:10px 0 0!important;gap:4px!important}
.cqa .cqa-info .cqa-nm{font-size:15px!important;font-weight:800!important;color:#16181D!important;line-height:1.35!important;-webkit-line-clamp:2}
.cqa .cqa-info .cqa-now b{font-size:24px!important}
.cqa .cqa-grp{padding-top:10px!important}
.cqa .cqa-lbl{margin-bottom:7px!important;font-size:14px!important}
.cqa .cqa-pills{gap:6px!important}
.cqa .cqa-pill{height:34px!important;min-width:48px!important;padding:0 13px!important;font-size:14px!important}
.cqa .cqa-pill.on{padding:0 12px!important}
.cqa .cqa-dot{width:12px!important;height:12px!important}
.cqa .cqa-tiles{grid-template-columns:repeat(auto-fill,minmax(62px,1fr))!important;gap:6px!important}
.cqa .cqa-svc{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;padding-top:12px!important;gap:6px!important}
.cqa .cqa-svc::-webkit-scrollbar{display:none}
.cqa .cqa-svc-h{width:auto!important;flex:none;font-size:13px!important}
.cqa .cqa-svc-p{flex:none;height:26px!important;padding:0 10px!important;font-size:12px!important;background:#EAF7EF!important;color:#0A8A3A!important}
.cqa .cqa-qty{padding-top:12px!important;gap:10px!important}
.cqa .cqa-qty>b{font-size:14px!important}
.cqa .cqa-step{height:32px!important}
.cqa .cqa-step button{width:34px!important;font-size:17px!important}
.cqa .cqa-step output{min-width:38px!important;font-size:15px!important}
.cqa .cqa-sold{font-size:13.5px!important}
.cqa .cqa-ft{padding-top:8px!important;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))!important}
.cqa .cqa-cta{height:48px!important;font-size:16px!important}
@media (max-width:760px){
  .cqa .cqa-gi{aspect-ratio:1/1!important}
  .cqa .cqa-bd > :not(.cqa-gal){margin-inline:12px!important}
}
@media (min-width:761px){
  .cqa .cqa-sheet{width:min(820px,calc(100vw - 48px))!important;max-height:min(560px,calc(100dvh - 48px))!important}
  .cqa .cqa-bd{grid-template-columns:minmax(0,320px) minmax(0,1fr)!important;column-gap:22px!important;padding:18px 18px 80px!important}
  .cqa .cqa-info{padding:2px 40px 0 0!important}
  [dir="rtl"] .cqa .cqa-info{padding:2px 0 0 40px!important}
  .cqa .cqa-info .cqa-nm{font-size:16px!important;-webkit-line-clamp:3}
  .cqa .cqa-ft{width:calc(100% - 360px)!important;padding:10px 18px 14px!important}
  .cqa .cqa-x{top:10px!important;inset-inline-end:10px!important;width:32px!important;height:32px!important}
}
