/* ══════════════════════════════════════════════════════════
   Facebook Promoted Carousel
   ══════════════════════════════════════════════════════════ */

/* ── Section container ── */
.fb-carousel-section {
    background: var(--ae-surface);
    border: 1px solid var(--ae-border);
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1.5rem;
}

/* ── Header row ── */
.fb-carousel-header {
    gap: .75rem;
}

/* ── Header ── */
.fb-carousel-header--centered {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.fb-carousel-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    flex-wrap: wrap;
    text-align: left;
    margin-bottom: .5rem;
}

.fb-carousel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ae-text);
    margin: 0;
}

.fb-carousel-header--centered .fb-carousel-title {
    font-size: 1.5rem;
    line-height: 1.25;
}

/* Subtitle under title */
.fb-carousel-subtitle {
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--ae-muted);
    margin: .35rem auto 0;
    max-width: 620px;
    line-height: 1.55;
}

/* Attention hook ("Te grăbești să vinzi?") */
.fb-carousel-hook {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ae-text);
    margin-bottom: .15rem;
}

/* Inline orange highlight ("distribuite extern") */
.fb-carousel-hook-orange {
    color: #ff6b35;
    font-weight: 700;
}

/* Benefit bullets */
.fb-carousel-benefits {
    list-style: none;
    padding: 0;
    margin: .9rem 0 0;
    display: inline-flex;
    flex-direction: column;
    gap: .3rem;
    text-align: left;
}

.fb-carousel-benefits li {
    font-size: .88rem;
    font-weight: 600;
    color: var(--ae-text);
    display: flex;
    align-items: center;
    gap: .45rem;
}

.fb-benefit-check {
    flex-shrink: 0;
}

/* Highlight line from promotion page */
.fb-carousel-highlight {
    font-size: .9rem;
    font-style: italic;
    font-weight: 600;
    color: var(--ae-text);
    margin: .9rem auto 0;
    max-width: 600px;
    line-height: 1.5;
}

/* Differentiator */
.fb-carousel-diff {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: .9rem auto 0;
    max-width: 620px;
    font-size: .82rem;
    line-height: 1.45;
}

.fb-diff-normal {
    color: var(--ae-muted);
}

.fb-diff-promoted {
    color: var(--ae-text);
    font-weight: 700;
}

/* CTA button */
.fb-carousel-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin-top: 1rem;
    padding: .55rem 1.4rem;
    font-size: .9rem;
    font-weight: 600;
    color: #fff !important;
    background: #ff6b35;
    border: 1px solid #e85a2a;
    border-radius: .6rem;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 107, 53, .28);
    transition: background .15s, transform .12s, box-shadow .12s;
}

.fb-carousel-cta-link:hover {
    background: #e85a2a;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, .32);
}

.fb-carousel-cta-link:active {
    transform: translateY(0);
}

.fb-carousel-cta-link .fb-cta-strong {
    font-weight: 700;
    color: #fff;
}

/* Facebook icon link */
.fb-carousel-fb-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform .15s;
}

.fb-carousel-fb-link:hover {
    transform: scale(1.15);
}

/* Subtitle text under carousel title */
.fb-carousel-page-link {
    font-size: .75rem;
    font-weight: 500;
    color: var(--ae-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

/* ── Info tooltip ── */
.fb-carousel-info-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.fb-carousel-info-btn {
    background: none;
    border: none;
    color: var(--ae-muted);
    font-size: .95rem;
    padding: 0 2px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.fb-carousel-info-btn:hover {
    color: var(--ae-primary);
}

.fb-carousel-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--ae-surface);
    border: 1px solid var(--ae-border);
    border-radius: .6rem;
    padding: .75rem 1rem;
    font-size: .78rem;
    line-height: 1.5;
    color: var(--ae-text);
    width: 270px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    z-index: 300;
}

.fb-carousel-info-wrap:hover .fb-carousel-tooltip,
.fb-carousel-info-wrap.tooltip-open .fb-carousel-tooltip {
    display: block;
}

/* ── CTA Button ── */
.btn-fb-cta {
    background: #ff6b35;
    color: #fff !important;
    border: 1px solid #e85a2a;
    border-radius: .6rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem .9rem;
    white-space: nowrap;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: background .15s, transform .12s, box-shadow .12s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, .28);
}

.btn-fb-cta:hover {
    background: #e85a2a;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, .32);
}

.btn-fb-cta:active {
    transform: translateY(0);
}

/* ── Carousel outer wrapper ── */
.fb-carousel-wrapper {
    position: relative;
    padding: 0 52px;
}

/* ── Scrollable track (single row) ── */
.fb-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    justify-content: center;
}

.fb-carousel-track::-webkit-scrollbar {
    display: none;
}

/* When overflowing (JS adds this class), allow scroll and left-align */
.fb-carousel-track.is-scrollable {
    overflow-x: auto;
    justify-content: flex-start;
}

/* ── Card slots — show max 4 per row ── */
.fb-carousel-item {
    flex: 0 0 calc((100% - 3rem) / 4);
    min-width: 170px;
    max-width: 280px;
}

/* Make the card inside fill the slot */
.fb-carousel-item .card {
    height: 100%;
}

/* ── Arrow buttons — same style as .cat-arrow ── */
.fb-carousel-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
    transition: box-shadow .15s, transform .12s;
    color: inherit;
    font-size: 1rem;
    padding: 0;
}

.fb-carousel-arrow.visible {
    display: inline-flex;
}

.fb-carousel-arrow:hover {
    box-shadow: 0 12px 26px rgba(0,0,0,.18);
    transform: translateY(-50%) scale(1.05);
}

.fb-carousel-arrow--prev {
    left: 6px;
}

.fb-carousel-arrow--next {
    right: 6px;
}

/* Mobile ── */
@media (max-width: 767.98px) {
    .fb-carousel-wrapper {
        padding: 0 6px;
    }
    .fb-carousel-header--centered .fb-carousel-title {
        font-size: 1.2rem;
    }
    .fb-carousel-subtitle {
        font-size: .86rem;
    }
    .fb-carousel-track {
        overflow-x: auto;
        justify-content: flex-start;
        gap: .6rem;
    }
    /* Show 2 ads at a time */
    .fb-carousel-item {
        flex: 0 0 calc((100% - .6rem) / 2);
        min-width: 0;
        max-width: none;
    }
    /* Arrows overlap the ads, so make them more visible */
    .fb-carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        background: rgba(255, 255, 255, .92);
        border-color: rgba(0, 0, 0, .2);
        box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    }
    .fb-carousel-arrow--prev {
        left: 2px;
    }
    .fb-carousel-arrow--next {
        right: 2px;
    }
    /* Anchor tooltip to the button's right edge so it opens leftward and stays on screen */
    .fb-carousel-tooltip {
        left: auto;
        right: 0;
    }
}

/* ── Facebook badge on card ── */
.listing-badge-facebook {
    background: #ff6b35;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .25rem .4rem;
    border-radius: .3rem;
    position: absolute;
    top: .4rem;
    right: .4rem;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
