/**
 * GIFTIA WIZARD v3.0 - Estilos del buscador de regalos
 * Wizard (pasos 1-7) + Feed de resultados
 */
* { box-sizing: border-box; }

/* Ocultar WordPress cuando Giftia está activo */
body.gf-active { overflow: hidden !important; margin: 0 !important; padding: 0 !important; }
body.gf-active #wpadminbar,
body.gf-active .admin-bar,
body.gf-active header,
body.gf-active footer,
body.gf-active nav,
body.gf-active aside,
body.gf-active .site-header,
body.gf-active .site-footer,
body.gf-active .wp-site-blocks > *:not(#giftia-app),
body.gf-active #page > *:not(#giftia-app),
body.gf-active .elementor-location-header,
body.gf-active .elementor-location-footer {
    display: none !important;
    visibility: hidden !important;
}
html.gf-active { margin-top: 0 !important; padding-top: 0 !important; }

/* APP CONTAINER */
#giftia-app {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: white; z-index: 2147483647; font-family: var(--gf-font, 'Outfit', -apple-system, sans-serif);
    display: flex; flex-direction: column; overflow: hidden;
}

/* HEADER */
.gf-header {
    padding: 15px 20px; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.gf-logo { font-weight: 900; font-size: 18px; letter-spacing: 2px; }
.gf-progress { display: flex; gap: 6px; }
.gf-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: 0.3s; }
.gf-dot.active { background: #818cf8; transform: scale(1.2); }
.gf-dot.done { background: #22c55e; }
.btn-back { background: rgba(255,255,255,0.1); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: none; }
.btn-back.show { display: flex; align-items: center; justify-content: center; }

/* MAIN - Centrado vertical del formulario */
.gf-main { flex: 1; overflow-y: auto; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* STEPS */
.gf-step { display: none; width: 100%; max-width: 700px; animation: gfFadeIn 0.4s ease; }
.gf-step.active { display: flex; flex-direction: column; align-items: center; }
@keyframes gfFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.gf-step h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px 0; text-align: center; }
/* Typewriter para preguntas del wizard */
.gf-step .gf-typewriter { overflow: hidden; min-height: 1.4em; }
.gf-step .gf-typewriter-cursor { display: inline-block; width: 2px; height: 1em; background: #a5b4fc; margin-left: 2px; animation: gfBlink 0.8s infinite; vertical-align: text-bottom; }
.gf-step .gf-typewriter.completed .gf-typewriter-cursor { display: none; }
@keyframes gfBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.gf-step p.sub { color: #94a3b8; font-size: 15px; text-align: center; margin-bottom: 30px; }

/* OPTIONS GRID */
.gf-options { display: grid; gap: 12px; }
.gf-options.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gf-options.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gf-options.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* CARDS */
.gf-card {
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 20px 15px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.gf-card:hover { background: rgba(99, 102, 241, 0.15); border-color: rgba(129, 140, 248, 0.5); transform: translateY(-3px); }
.gf-card.selected { background: rgba(99, 102, 241, 0.3); border-color: #818cf8; box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
.gf-card i { font-size: 28px; margin-bottom: 10px; color: #a5b4fc; }
.gf-card span, .gf-card .card-name { font-size: 14px; font-weight: 600; }
.gf-card small, .gf-card .card-desc { font-size: 11px; color: #94a3b8; margin-top: 4px; line-height: 1.3; }
.gf-card .card-range { font-size: 10px; color: #64748b; margin-top: 2px; }

/* STEP 5: PRESUPUESTO + ENVÍO */
.gf-price-section,
.gf-urgencia-section {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}
.gf-price-section { margin-bottom: 32px; }
.gf-urgencia-section { margin-bottom: 24px; }
.gf-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px 0;
    text-align: center;
}

/* PRICE BOX & SLIDER */
.gf-price-box {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 24px 20px;
}
.gf-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}
.gf-price-col { display: flex; flex-direction: column; align-items: flex-start; }
.gf-price-col-right { align-items: flex-end; }
.gf-price-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.gf-price-value {
    font-size: 26px;
    font-weight: 800;
    color: #fbbf24;
    line-height: 1.2;
}
.gf-price-sep {
    font-size: 18px;
    color: #475569;
    font-weight: 300;
}
.gf-slider-container {
    position: relative;
    height: 42px;
    margin: 16px 0 24px 0;
}
.gf-slider-zone {
    position: absolute;
    top: 0;
    height: 32px;
    overflow: hidden;
    pointer-events: none;
}
.gf-slider-zone * { pointer-events: auto; }
.gf-slider-zone-min { left: 0; width: 50%; z-index: 2; }
.gf-slider-zone-max { left: 50%; width: 50%; z-index: 2; }
.gf-slider-zone-min .gf-slider-input { width: 200%; }
.gf-slider-zone-max .gf-slider-input { width: 200%; margin-left: -100%; }
.gf-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    transform: translateY(-50%);
}
.gf-slider-fill {
    position: absolute;
    top: 50%;
    height: 8px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 4px;
    transform: translateY(-50%);
    pointer-events: none;
}
.gf-slider-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    margin: 0;
    opacity: 1;
    cursor: pointer;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.gf-slider-input::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
}
.gf-slider-input::-moz-range-track {
    height: 8px;
    background: transparent;
    border: none;
}
.gf-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    margin-top: -6px;
    cursor: pointer;
}
.gf-slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}
.gf-slider-marks {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 12px;
}
.gf-slider-mark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translateX(-50%);
}
.gf-price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.gf-preset {
    padding: 10px 16px;
    margin: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}
.gf-preset:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(129, 140, 248, 0.4);
    color: white;
}

/* URGENCIA / TIEMPO DE ENTREGA */
.gf-urgencia-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.gf-card.gf-urgencia {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 100px;
}
.gf-urgencia-icon {
    font-size: 22px;
    color: #a5b4fc;
    margin-bottom: 10px;
    display: block;
}
.gf-urgencia-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 4px;
}
.gf-urgencia-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}
.gf-card.gf-urgencia.selected {
    background: rgba(99, 102, 241, 0.25);
    border-color: #818cf8;
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.3);
}
.gf-card.gf-urgencia.selected .gf-urgencia-icon { color: #c7d2fe; }

/* BUTTON NEXT */
.gf-btn-next {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 30px auto 0 auto;
    padding: 16px 24px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.gf-btn-next:hover { transform: scale(1.02); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }

/* EMAIL & AVATAR */
.gf-avatar-preview { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.gf-avatar-tag {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 12px; border-radius: 15px; font-size: 12px; color: #e2e8f0;
}
.gf-email-input {
    width: 100%; padding: 14px 18px; border-radius: 50px; flex: 1;
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
    color: white; font-size: 15px; font-family: inherit; outline: none;
}
.gf-email-input::placeholder { color: #94a3b8; }
.gf-email-input:focus { border-color: #818cf8; background: rgba(255,255,255,0.15); }
.gf-email-submit {
    padding: 14px 20px; border-radius: 50px; border: none;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: white; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.gf-email-submit:hover { transform: scale(1.02); box-shadow: 0 8px 25px rgba(34,197,94,0.4); }

/* FEED */
#gf-feed {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    z-index: 2147483650; overflow: hidden; display: none;
    font-family: var(--gf-font, 'Outfit', -apple-system, sans-serif);
}
.feed-header { padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to bottom, rgba(15,23,42,0.9), transparent); }
.feed-header-actions { display: flex; gap: 10px; align-items: center; }
.feed-logo { font-weight: 900; font-size: 18px; letter-spacing: 2px; color: white; }
.feed-counter { color: #94a3b8; font-size: 13px; }
.feed-btn-volver { background: rgba(255,255,255,0.1); border: none; color: white; padding: 10px 16px; border-radius: 24px; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.feed-btn-volver:hover { background: rgba(255,255,255,0.2); color: white; }
.feed-close { background: rgba(255,255,255,0.1); border: none; color: white; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.feed-container { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px 100px; }
.feed-card { width: 100%; max-width: 420px; animation: gfCardIn 0.4s ease; }
@keyframes gfCardIn { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.feed-image-wrap { position: relative; width: 100%; aspect-ratio: 1; border-radius: 24px; background: rgba(255,255,255,0.05); overflow: hidden; margin-bottom: 20px; }
.feed-image { width: 100%; height: 100%; object-fit: contain; padding: 20px; background: white; border-radius: 24px; }
.feed-match-badge { position: absolute; top: 15px; right: 15px; background: rgba(34,197,94,0.9); color: white; padding: 6px 12px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.feed-delivery-badge { position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.75); color: white; padding: 6px 12px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.feed-badge { position: absolute; bottom: 50px; left: 15px; background: rgba(0,0,0,0.75); color: #a5b4fc; padding: 6px 12px; border-radius: 12px; font-size: 11px; }
.feed-price-badge { position: absolute; bottom: 15px; left: 15px; background: rgba(0,0,0,0.85); color: #fbbf24; padding: 10px 18px; border-radius: 16px; font-size: 24px; font-weight: 900; }
.feed-info { text-align: center; color: white; }
.feed-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 15px; color: white; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px auto; flex-wrap: wrap; }
.feed-stars { display: flex; gap: 3px; }
.feed-stars i { color: #fbbf24; font-size: 16px; }
.feed-stars i.empty { color: #475569; }
.feed-rating-text { font-size: 14px; color: #fbbf24; font-weight: 700; }
.feed-reviews { font-size: 11px; color: #94a3b8; }
.feed-reason { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(129, 140, 248, 0.3); border-radius: 16px; padding: 15px 20px; margin-bottom: 20px; text-align: left; }
.feed-reason-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #a5b4fc; font-size: 12px; font-weight: 600; }
.feed-reason-text { color: #e2e8f0; font-size: 14px; line-height: 1.5; font-style: italic; }
.feed-pros { margin: 15px 0; text-align: left; }
.feed-pros-title { color: #a5b4fc; font-size: 12px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.feed-pros ul { margin: 0; padding-left: 20px; color: #e2e8f0; font-size: 14px; line-height: 1.6; }
.feed-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 15px 0; }
.feed-tag { background: rgba(255,255,255,0.1); padding: 5px 12px; border-radius: 12px; font-size: 12px; color: #a5b4fc; }
.feed-delivery { margin: 15px 0; padding: 12px; background: rgba(99,102,241,0.1); border-radius: 8px; text-align: center; }
.feed-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.feed-cta {
    width: 100%; background: linear-gradient(90deg, #6366f1, #a855f7);
    color: white; border: none; padding: 18px 24px; border-radius: 50px;
    font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
    text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.feed-cta:hover { transform: scale(1.02); box-shadow: 0 10px 30px rgba(99,102,241,0.4); color: white; }
.feed-cta-primary { background: linear-gradient(90deg, #6366f1, #a855f7) !important; }
.feed-cta-secondary { background: rgba(255,255,255,0.1) !important; border: 1px solid rgba(255,255,255,0.2); }
.feed-vendor { text-align: center; color: #64748b; font-size: 12px; margin-top: 15px; }
.feed-nav-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.feed-nav-btn { width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.feed-nav-btn:hover { background: rgba(99, 102, 241, 0.3); }
.feed-swipe-hint { text-align: center; color: #64748b; font-size: 11px; margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.feed-alternatives { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.feed-alternatives-header { color: #a5b4fc; font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.feed-alternatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
.feed-alt-item { display: flex; flex-direction: column; align-items: center; color: white; }
.feed-alt-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: rgba(255,255,255,0.1); }
.feed-alt-title { font-size: 11px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.feed-alt-price { font-size: 12px; font-weight: 700; color: #fbbf24; }
.feed-end-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 25px; }

/* RESPONSIVE */
@media (max-width: 600px) {
    .gf-options.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .gf-options.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .gf-card { padding: 15px 10px; }
    .gf-card i { font-size: 22px; }
    .gf-step h2 { font-size: 22px; }
}
