/**
 * Gift Quiz — /podbor-podarka/
 * v1 · 2026-04-22
 * Совместимо с темой vintajj-2025 (палитра #A65A3C / #FDF8F3)
 */

.gq-landing {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1c1917;
}

.gq-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gq-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 600;
    color: #A65A3C;
    margin: 0 0 0.75rem;
    letter-spacing: 0.01em;
}

.gq-lead {
    font-size: 1.05rem;
    line-height: 1.55;
    color: #57534e;
    max-width: 540px;
    margin: 0 auto;
}

.gq-card {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 20px;
    padding: 2rem 1.75rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

/* Progress */
.gq-progress {
    margin-bottom: 1.75rem;
}
.gq-progress-bar {
    height: 4px;
    background: #f0ebe5;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.75rem;
}
.gq-progress-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, #A65A3C, #8B4A32);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.gq-progress-bar[data-progress="25"]::after { width: 25%; }
.gq-progress-bar[data-progress="50"]::after { width: 50%; }
.gq-progress-bar[data-progress="75"]::after { width: 75%; }
.gq-progress-bar[data-progress="100"]::after { width: 100%; }

.gq-progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a8a29e;
    letter-spacing: 0.02em;
}
.gq-step-label.gq-step-active {
    color: #A65A3C;
    font-weight: 600;
}

/* Question */
.gq-question {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #1c1917;
    text-align: center;
}
.gq-hint {
    text-align: center;
    color: #78716c;
    font-size: 0.92rem;
    margin: 0 0 1.5rem;
}
.gq-step:not(.gq-hint-parent) .gq-question {
    margin-bottom: 1.5rem;
}

/* Chips */
.gq-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.gq-chip {
    padding: 12px 16px;
    border: 1.5px solid #e7e5e4;
    border-radius: 12px;
    background: #fff;
    color: #1c1917;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 52px;
    justify-content: center;
}
.gq-chip span { display: block; }
.gq-chip small {
    font-size: 0.72rem;
    font-weight: 400;
    color: #a8a29e;
    letter-spacing: 0.01em;
}
.gq-chip.gq-chip-selected small { color: rgba(255,255,255,0.8); }
.gq-chip:hover {
    border-color: #A65A3C;
    color: #A65A3C;
    background: #FEF7F2;
    transform: translateY(-1px);
}
.gq-chip:active {
    transform: translateY(0);
}
.gq-chip.gq-chip-selected {
    border-color: #A65A3C;
    background: #A65A3C;
    color: #fff;
    box-shadow: 0 2px 8px rgba(166, 90, 60, 0.2);
}

/* Navigation */
.gq-nav {
    margin-top: 1.5rem;
    min-height: 24px;
}
.gq-nav-back {
    background: none;
    border: none;
    color: #78716c;
    font-family: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s ease;
}
.gq-nav-back:hover {
    color: #A65A3C;
}

/* Loading */
.gq-loading {
    text-align: center;
    padding: 2.5rem 0 1rem;
}
.gq-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid #f0ebe5;
    border-top-color: #A65A3C;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    animation: gq-spin 0.8s linear infinite;
}
@keyframes gq-spin { to { transform: rotate(360deg); } }
.gq-loading-text {
    color: #78716c;
    font-size: 0.95rem;
    margin: 0;
}

/* Result */
.gq-result {
    animation: gq-fadein 0.35s ease;
}
@keyframes gq-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.gq-result-summary {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 1.25rem;
    font-size: 0.86rem;
    color: #78716c;
}
.gq-result-summary span {
    background: #faf5f0;
    border: 1px solid #f0e7dc;
    color: #8B4A32;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.gq-result-response {
    background: #FEF7F2;
    border: 1px solid #f5ead8;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    line-height: 1.6;
    color: #1c1917;
    margin-bottom: 1.25rem;
    white-space: pre-wrap;
}

/* Product cards */
.gq-result-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 1.5rem;
}
.gq-product {
    display: flex;
    flex-direction: column;
    border: 1px solid #e7e5e4;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.2s ease;
}
.gq-product:hover {
    border-color: #A65A3C;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.gq-product img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #f8f6f3;
    display: block;
}
.gq-product-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.gq-product-name {
    font-size: 0.9rem;
    line-height: 1.35;
    color: #1c1917;
    margin: 0;
}
.gq-product-price {
    font-size: 1rem;
    font-weight: 600;
    color: #A65A3C;
    margin: auto 0 0;
}
.gq-product-sku {
    font-size: 0.75rem;
    color: #a8a29e;
}

/* Result actions */
.gq-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    border-top: 1px solid #f0ebe5;
    margin-top: 0.5rem;
    padding-top: 1.25rem;
}
/* Mismatch — когда Людмила говорит "не подходит, уточните" */
.gq-card.gq-mismatch .gq-result-response {
    background: #fdf4ef;
    border-color: #f0d8c4;
}
.gq-card.gq-mismatch .gq-btn-primary {
    font-size: 1rem;
    padding: 13px 26px;
    box-shadow: 0 4px 12px rgba(166, 90, 60, 0.25);
}
.gq-card.gq-mismatch .gq-btn-secondary {
    opacity: 0.7;
}
.gq-btn-primary,
.gq-btn-secondary {
    padding: 11px 22px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gq-btn-primary {
    background: #A65A3C;
    color: #fff !important; /* перебиваем глобальный a {color:#A65A3C !important} из темы */
    border: 1.5px solid #A65A3C;
}
.gq-btn-primary:hover {
    background: #8B4A32;
    border-color: #8B4A32;
    color: #fff !important;
}
.gq-btn-secondary {
    background: #fff;
    color: #A65A3C !important;
    border: 1.5px solid #e7e5e4;
}
.gq-btn-secondary:hover {
    border-color: #A65A3C;
    background: #FEF7F2;
}
/* Product link card — также перебиваем глобальный `a {color: #A65A3C !important}` */
.gq-product { color: inherit !important; }
.gq-product .gq-product-name { color: #1c1917 !important; }
.gq-product .gq-product-price { color: #A65A3C !important; }
.gq-product .gq-product-sku { color: #a8a29e !important; }

/* How it works */
.gq-how {
    margin-top: 2.5rem;
    padding: 1.75rem 1.5rem;
    background: #FEF7F2;
    border-radius: 16px;
    border: 1px solid #f5ead8;
}
.gq-how h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #A65A3C;
    margin: 0 0 1rem;
}
.gq-how ol {
    margin: 0;
    padding-left: 1.25rem;
    color: #57534e;
    line-height: 1.65;
}
.gq-how li {
    margin-bottom: 0.4rem;
}

/* Mobile */
@media (max-width: 640px) {
    .gq-landing { padding: 1rem 0.75rem 2.5rem; }
    .gq-card { padding: 1.5rem 1.1rem; border-radius: 14px; }
    .gq-chips { grid-template-columns: 1fr 1fr; gap: 8px; }
    .gq-chip { padding: 12px 14px; font-size: 0.9rem; }
    .gq-result-products { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
    .gq-chips { grid-template-columns: 1fr; }
}
