/* ═══════════════════════════════════════════════════════════
   ROSA V3 — SHARED COMPONENTS
   Before/After slider, FAQ, Trust bar, Testimonials,
   Comparison table, WhatsApp float, Exit intent
   ═══════════════════════════════════════════════════════════ */

/* ─── TRUST BAR ─────────────────────────────────────────── */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.trust-bar .trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.trust-bar .trust-value {
    font-weight: 700;
    color: var(--text);
}

.trust-bar .trust-sep {
    color: var(--border);
}

/* Trust bar on dark sections */
.section-dark .trust-bar {
    color: var(--text-on-dark-muted);
}

.section-dark .trust-bar .trust-value {
    color: #fff;
}

.section-dark .trust-bar .trust-sep {
    color: rgba(255, 255, 255, 0.15);
}

/* ─── STATS CARDS (glassmorphism) ───────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-light);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-on-dark-muted);
    margin-top: 4px;
    line-height: 1.3;
}

/* ─── FAQ ACCORDION ─────────────────────────────────────── */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) 0;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    background: none;
    border: none;
    gap: var(--space-md);
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform var(--transition);
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--transition);
}

.faq-icon::before {
    width: 12px; height: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    width: 2px; height: 12px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.faq-item.open .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
}

.faq-answer p {
    padding-bottom: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.7;
}

/* ─── TESTIMONIAL CARDS ─────────────────────────────────── */
.testimonial-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition);
}

.testimonial-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-card-hover);
}

.testimonial-quote {
    font-size: var(--font-size-sm);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text);
}

.testimonial-role {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* ─── COMPARISON TABLE ──────────────────────────────────── */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.compare-table th,
.compare-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.compare-table thead th {
    font-weight: 600;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    position: sticky;
    top: var(--nav-height);
    z-index: 5;
}

/* Rosa column highlight */
.compare-table th.rosa-col,
.compare-table td.rosa-col {
    background: rgba(229, 93, 37, 0.04);
    font-weight: 600;
}

.compare-table th.rosa-col {
    color: var(--primary);
}

.compare-check {
    color: var(--success);
    font-weight: 700;
}

.compare-cross {
    color: var(--text-muted);
}

/* ─── BEFORE/AFTER SLIDER ───────────────────────────────── */
.ba-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.ba-slider img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.ba-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ba-before img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    cursor: ew-resize;
}

.ba-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.ba-label {
    position: absolute;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 4;
    pointer-events: none;
}

.ba-label-before {
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    backdrop-filter: blur(4px);
}

.ba-label-after {
    right: 12px;
    background: var(--primary);
    color: #fff;
}

/* ─── FLOAT BUTTON STACK CONTAINER ───────────────────── */
#float-stack {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ─── WHATSAPP FLOAT ────────────────────────────────────── */
.whatsapp-float {
    position: static;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: float-shake 4s ease-in-out 2s 3, wa-pulse 2.5s ease-in-out 8s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) !important;
    animation: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* Mobile sticky CTA offset – no longer needed with stack container */
@media (max-width: 768px) {
    #float-stack {
        bottom: 20px;
        right: 16px;
    }
}


/* ─── ICON CONTAINERS (for SVG icons) ───────────────────── */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-glow);
    color: var(--primary);
    flex-shrink: 0;
}

.icon-box svg {
    width: 22px;
    height: 22px;
}

.icon-box-sm {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.icon-box-sm svg {
    width: 18px;
    height: 18px;
}

/* ─── PRICE CHIP ────────────────────────────────────────── */
.price-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.price-chip .price-from {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.price-chip .price-value {
    font-size: var(--font-size-xl);
    color: var(--text);
    letter-spacing: -0.02em;
}

.price-chip .price-unit {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
}

/* ─── MOBILE STICKY CTA ────────────────────────────────── */
@media (max-width: 768px) {
    .mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: var(--z-sticky);
        background: rgba(250, 251, 252, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
        padding: var(--space-md) var(--space-lg);
        transform: translateY(100%);
        transition: transform var(--transition);
    }

    .mobile-sticky-cta.visible {
        transform: translateY(0);
    }

    .mobile-sticky-cta .btn {
        width: 100%;
    }

    /* Offset WhatsApp button above sticky CTA */
    .mobile-sticky-cta.visible ~ .whatsapp-float {
        bottom: 88px;
    }
}

/* ─── RESPONSIVE COMPONENTS ─────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compare-table {
        font-size: var(--font-size-xs);
    }

    .compare-table th,
    .compare-table td {
        padding: var(--space-sm) var(--space-md);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .stat-card {
        padding: var(--space-md) var(--space-sm);
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .trust-bar {
        gap: var(--space-md);
    }
}

/* ─── EXIT-INTENT POPUP ─────────────────────────────────── */
.exit-popup {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s var(--ease-out);
}

.exit-popup.active {
    opacity: 1;
    visibility: visible;
}

.exit-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 19, 24, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.exit-popup-content {
    position: relative;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-xl);
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s var(--ease-spring);
    z-index: 2;
}

.exit-popup.active .exit-popup-content {
    transform: scale(1) translateY(0);
}

.exit-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.exit-popup-close:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.exit-popup-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.exit-popup-content h3 {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
    color: var(--text);
}

.exit-popup-content p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.whatsapp-tooltip {
    display: none;
}

