/* ============================================================
   Featured Product Banner - featured-banner.css
   Diagonal panel + accent edge + wavy pattern
   ============================================================ */

/* Carousel outer wrap: arrows are absolutely positioned over the track */
.fpb-carousel-wrap {
    position: relative;
    margin: 0;
}

/* Grid wrapper / carousel track */
.fpb-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

/* Carousel nav buttons (distinct from .fpb-arrow, the inline CTA chevron) */
.fpb-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0px solid #ddd;
    border-radius: 50%;
    background:#ed1c24!important;
    color: #ffffff!important;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity:0.7;
}

.fpb-carousel-arrow:hover{
    opacity:1!important;
}

.fpb-carousel-arrow-prev {
    left: -4px;
}

.fpb-carousel-arrow-next {
    right:-4px;
}

.fpb-carousel-arrow:hover:not(:disabled) {
    background: #fff;
}

.fpb-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Hide arrows entirely when the track doesn't overflow (all cards fit) */
.fpb-carousel-wrap.fpb-no-overflow .fpb-carousel-arrow {
    display: none;
}

/* No arrows means no need to reserve side space - let cards use the full width */
.fpb-carousel-wrap.fpb-no-overflow .fpb-grid {
    padding-left: 0;
    padding-right: 0;
}

/* Card wrapper */
.fpb-card {
    --fpb-top: 0%;
    --fpb-bot: 15%;

    position: relative;
    display: flex;
    align-items: stretch;
    background-color: #e8eef1;
    border-radius: 14px;
    overflow: hidden;
    min-height: 230px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    scroll-snap-align: start;
}


@media(min-width:1281px){
    /* Desktop column counts differ by context */
.fpb-context-archive .fpb-card {
    flex: 0 0 calc((100% - 30px) / 3); /* 3 per row: 2 gaps of 15px each */
    max-width: calc((100% - 30px) / 3);
}

.fpb-context-other .fpb-card {
    flex: 0 0 calc((100% - 45px) / 4); /* 4 per row: 3 gaps of 15px each */
    max-width: calc((100% - 45px) / 4);
}
}
@media (min-width: 561px) and (max-width: 1280px) {
    /* Desktop column counts differ by context */
    .fpb-context-archive .fpb-card {
        flex: 0 0 350px !important;
        max-width: 350px !important;
    }

    .fpb-context-other .fpb-card {
        flex: 0 0 350px !important;
        max-width: 350px !important;
    }
}

.fpb-card:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

/* ============================================================
   Background layers — TWO stacked diagonals
   .fpb-bg-edge  → darker accent (sits behind, offset left)
   .fpb-bg-main  → main panel with optional wavy pattern
============================================================ */
.fpb-bg-edge,
.fpb-bg-main {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 74%;
    pointer-events: none;
    clip-path: polygon(
        var(--fpb-top) 0,
        100% 0,
        100% 100%,
        var(--fpb-bot) 100%
    );
}

.fpb-bg-edge {
    background-color: #1d8ea0;
    transform: translateX(-6px);
    z-index: 1;
}

.fpb-bg-main {
    background-color: #2bbcd4;
    z-index: 2;
}

/* Wavy line pattern overlay */
.fpb-has-pattern .fpb-bg-main {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 400' preserveAspectRatio='none'><g fill='none' stroke='%23ffffff' stroke-opacity='0.18' stroke-width='1.5'><path d='M -50,420 Q 200,300 650,360'/><path d='M -50,360 Q 200,240 650,300'/><path d='M -50,300 Q 200,180 650,240'/><path d='M -50,240 Q 200,120 650,180'/><path d='M -50,180 Q 200,60 650,120'/><path d='M -50,120 Q 200,0 650,60'/><path d='M -50,60 Q 200,-60 650,0'/><path d='M -50,0 Q 200,-120 650,-60'/></g></svg>");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* Discount Badge */
.fpb-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 20;
    background-color: #e8284a;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 7px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(232, 40, 74, 0.40);
}

/* Image Column */
.fpb-image-wrap {
    flex: 0 0 34%;
    max-width: 34%;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.fpb-product-img {
    display: block;
    width: 45px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.20));
    transition: transform 0.4s ease;
}

.fpb-card:hover .fpb-product-img {
    transform: scale(1.04);
}

/* Content Column */
.fpb-content {
    flex: 1 1 auto;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 24px 20px 24px 25px;
}

/* Title */
.fpb-card .fpb-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.22;
    margin: 0 0 6px !important;
    padding: 0 !important;
}

/* Description */
.fpb-card .fpb-desc {
    color: #e4f5f8;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    margin: 0 0 10px !important;
    padding: 0 !important;
}

/* CTA Button */
.fpb-card .fpb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    letter-spacing: 0.2px;
    align-self: flex-end;
    transition: color 0.25s ease, gap 0.25s ease, opacity 0.25s ease;
}

.fpb-card .fpb-btn:hover {
    opacity: 0.85;
    gap: 12px;
    text-decoration: none !important;
}

.fpb-arrow {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.fpb-card .fpb-btn:hover .fpb-arrow {
    transform: translateX(5px);
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet ≤ 768px */
@media (max-width: 768px) {
    .fpb-carousel-wrap .fpb-card {
        min-height: 200px;
        --fpb-top: 0%;
        --fpb-bot: 12%;
        flex: 0 0 320px;
        width: 320px;
        max-width: 320px;
    }

    .fpb-product-img {
        width: 65px;
        max-width: 140px;
    }

    .fpb-card .fpb-title { font-size: 20px !important; }
    .fpb-card .fpb-desc  { font-size: 13px !important; }

    .fpb-content { padding: 18px 18px 18px 8px; }
}

/* Mobile ≤ 560px - one card at a time, stacked internally */
@media (max-width: 560px) {
    .fpb-carousel-arrow {
        width: 32px;
        height: 32px;
    }

    .fpb-carousel-arrow-prev {
        left: -8px;
    }

    .fpb-carousel-arrow-next {
        right: -8px;
    }

    .fpb-grid {
        gap: 16px;
    }

    .fpb-carousel-wrap .fpb-card {
        flex: 0 0 100%;
        max-width: 260px;
        flex-direction: column;
        min-height: unset;
    }

    .fpb-bg-edge,
    .fpb-bg-main {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 60%;
        clip-path: polygon(0 0%, 100% 15%, 100% 100%, 0 100%);
    }

    .fpb-bg-edge {
        transform: translateY(-5px);
    }

    .fpb-badge {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 5px 9px;
    }

    .fpb-image-wrap {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        padding: 36px 20px 0;
    }

    .fpb-product-img {
        width: 65px;
        max-width: 130px;
    }

    .fpb-content {
        flex: 0 0 auto;
        width: 100%;
        align-items: center;
        text-align: center;
        padding: 20px 22px 24px;
    }

    .fpb-card .fpb-btn { align-self: center; }
    .fpb-card .fpb-title { font-size: 19px !important; }
    .fpb-card .fpb-desc  { font-size: 13px !important; }
}

/* Extra-small ≤ 360px */
@media (max-width: 360px) {
    .fpb-card .fpb-title { font-size: 17px !important; }
    .fpb-card .fpb-desc  { font-size: 12px !important; }
    .fpb-product-img { width: 55px; max-width: 110px; }
}

.fpb-carousel-wrap.fpb-context-archive{
    padding:15px 0px!important;
}
