/**
 * Featured Products 2 — Standalone CSS
 * No dependency on featured-products.css for section-specific styles.
 */

/* ── Section ─────────────────────────────── */
.fp2-section {
    width: 100%;
    padding: var(--fp2-padding-v, 60px) 0;
}

/* ── Banner Header ───────────────────────── */
.fp2-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--fp2-banner-bg, #ff3b3b);
    padding: 6px 14px;
    border-radius: 6px;
    margin: 0 10px 20px 10px;
}

.fp2-banner-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.5px;
}

/* ── Carousel Arrows ─────────────────────── */
.fp2-arrows {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.fp2-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.fp2-arrow svg {
    display: block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    pointer-events: none;
}

.fp2-arrow:hover {
    opacity: 0.7;
}

/* ── Carousel Grid ───────────────────────── */
.fp2-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 10px;
    margin: 0 10px;
    padding: 0;

    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fp2-grid::-webkit-scrollbar {
    display: none;
}

/* 5 items visible — 4 gaps of 10px = 40px total gap */
.fp2-grid .fp-product-card {
    flex: 0 0 calc((100% - 40px) / 5);
    scroll-snap-align: start;
    min-width: 0;
}

/* ── Discount Badge ──────────────────────── */
.fp2-discount-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--fp2-discount-bg, #ff3b3b);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

/* ── Footer / View All Button ────────────── */
.fp2-footer {
    text-align: center;
    padding: 20px 0 0;
}

.fp2-btn-all {
    display: inline-block;
    padding: 6px 20px;
    background: var(--fp2-btn-bg, #ff3b3b);
    color: #fff;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.fp2-btn-all.has-loading.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ── Responsive ──────────────────────────── */
/* Tablet: 3 items — 2 gaps of 10px = 20px */
@media (max-width: 1023px) {
    .fp2-grid .fp-product-card {
        flex: 0 0 calc((100% - 20px) / 3);
    }
}

@media (max-width: 767px) {
    .fp2-banner {
        margin-left: 5px;
        margin-right: 5px;
        padding: 4px 10px;
    }

    .fp2-banner-title {
        font-size: 14px;
    }

    .fp2-arrow {
        width: 24px;
        height: 24px;
    }

    .fp2-arrow svg {
        width: 18px;
        height: 18px;
    }

    .fp2-grid {
        margin: 0 5px;
        padding: 0;
        gap: 8px;
    }

    /* Mobile: 2 items — 1 gap of 8px */
    .fp2-grid .fp-product-card {
        flex: 0 0 calc((100% - 8px) / 2);
    }
}
