/* ==========================================================================
   Featured Grid Carousel Styles (Double Hover Arrow, Sale & SoldOut Badges)
   ========================================================================== */

.featured-grid {
    padding: 80px 0;
    width: 100%;
    background-color: #f8f6ee;
    overflow: hidden;
}

.featured-grid__header {
    margin-bottom: 48px;
    width: 100%;
}

.featured-grid__heading {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    max-width: 960px;
    width: 100%;
    gap: 0px;
}

.featured-grid__title-line {
    font-family: 'Poppins', sans-serif;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: #000000;
    letter-spacing: -1px;
    display: block;
    width: 100%;
}

.featured-grid__title-line--1 {
    font-size: 56px;
    text-align: left;
}

.featured-grid__title-line--2 {
    font-size: 56px;
    text-align: right;
    margin-left: 0;
}

/* Product Carousel Wrapper */
.featured-grid__carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.featured-grid__carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    cursor: grab;
    user-select: none;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.featured-grid__carousel::-webkit-scrollbar {
    display: none;
}

.featured-grid__carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

/* Desktop Columns Config: 4 Products per view */
.featured-grid.desktop-cols-4 .featured-grid__item {
    flex: 0 0 calc(25% - 18px);
    min-width: 260px;
}

/* Desktop Columns Config: 3 Products per view */
.featured-grid.desktop-cols-3 .featured-grid__item {
    flex: 0 0 calc(33.333% - 16px);
    min-width: 320px;
}

.featured-grid__item {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.featured-grid__card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    text-decoration: none;
}

/* Badges: Sale & Sold Out Tags (Top-Left on Image - Matching Images 2 & 3) */
.featured-grid__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 4px;
    transform: rotate(-5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    line-height: 1.2;
    pointer-events: none;
    letter-spacing: -0.2px;
}

.featured-grid__badge--sale {
    background: linear-gradient(135deg, #e94057 0%, #f27121 100%);
    color: #ffffff;
}

.featured-grid__badge--soldout {
    background: #ffffff;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.featured-grid__product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.25, 1);
}

.featured-grid__product-image--primary {
    position: relative;
    z-index: 1;
    opacity: 1;
}

.featured-grid__product-image--secondary {
    position: absolute;
    margin: auto;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

/* Hover state: reveal secondary image, hide primary image, NO bounce up */
.featured-grid__card-media:hover .featured-grid__product-image--primary {
    opacity: 0;
}

.featured-grid__card-media:hover .featured-grid__product-image--secondary {
    opacity: 1;
}

.featured-grid__card-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
}

.featured-grid__product-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 6px 0;
    line-height: 1.35;
    text-transform: uppercase;
    max-width: 95%;
}

.featured-grid__product-title a {
    color: inherit;
    text-decoration: none;
}

/* Price Styling: Regular, Sale (Red), Compare-at (Struck-through) */
.featured-grid__price {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.featured-grid__price-regular {
    color: #444444;
}

.featured-grid__price-sale {
    font-size: 15px;
    font-weight: 700;
    color: #e94057;
    /* Red sale price as in Image 2 */
}

.featured-grid__price-compare {
    font-size: 14px;
    font-weight: 500;
    color: #888888;
    text-decoration: line-through;
}

/* Button & Sold Out state */
.featured-grid__button-wrapper {
    position: relative;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-grid__button-wrapper .product-showcase__plus-btn {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
}

.featured-grid__button-wrapper .product-showcase__plus-btn:hover {
    transform: none;
}

/* Sold Out Button: Normal state full opacity (opacity: 1), hover state faded opacity (opacity: 0.65) & unclickable */
.product-showcase__plus-btn.is-soldout {
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.product-showcase__plus-btn.is-soldout:hover {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
}

/* Featured Grid Controls Row (Minimal design matching user images 1 & 2) */
.featured-grid__controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    width: 100%;
}

/* BLACK MODE (Image 1) */
.featured-grid__controls-container.controls-color-black {
    --fg-controls-color: #000000;
    --fg-controls-track: rgba(0, 0, 0, 0.2);
}

.featured-grid__controls-container.controls-color-black .featured-grid__controls-arrow {
    color: #000000;
}

.featured-grid__controls-container.controls-color-black .featured-grid__controls-arrow.js-carousel-prev {
    color: #666666;
}

/* WHITE MODE (Image 2) */
.featured-grid__controls-container.controls-color-white {
    --fg-controls-color: #ffffff;
    --fg-controls-track: rgba(255, 255, 255, 0.35);
}

.featured-grid__controls-container.controls-color-white .featured-grid__controls-arrow {
    color: #ffffff;
}

.featured-grid__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 520px;
    width: 100%;
}

.featured-grid__controls-arrow {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
}

.featured-grid__controls-arrow .arrow-single {
    width: 22px;
    height: 22px;
}

.featured-grid__controls-arrow .arrow-double {
    width: 18px;
    height: 18px;
    display: none;
}

.featured-grid__controls-arrow:hover .arrow-double {
    display: block;
}

/* Double Arrow Wrapper & Hover Slide-in */
.arrow-double-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.chevron-arrow {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.25, 1);
}

.chevron-arrow--main {
    width: 22px;
    height: 22px;
    z-index: 2;
}

.chevron-arrow--sub {
    width: 18px;
    height: 18px;
    max-width: 0;
    opacity: 0;
    margin: 0;
    transform: scale(0.75);
    z-index: 1;
    transition: max-width 0.3s cubic-bezier(0.25, 1, 0.25, 1), opacity 0.25s ease, transform 0.3s ease, margin 0.3s ease;
}

/* Prev arrow hover: 2nd arrow slides in tightly to the left */
.featured-grid__controls-arrow.js-carousel-prev:hover .chevron-arrow--sub {
    max-width: 18px;
    opacity: 1;
    margin-right: -25px;
    transform: scale(0.9);
}

/* Next arrow hover: 2nd arrow slides in tightly to the right */
.featured-grid__controls-arrow.js-carousel-next:hover .chevron-arrow--sub {
    max-width: 18px;
    opacity: 1;
    margin-left: -25px;
    transform: scale(0.9);
}

.featured-grid__controls-arrow:hover {
    opacity: 0.95;
    transform: scale(1.08);
}

.featured-grid__controls-progress {
    flex: 1;
    max-width: 200px;
}

.featured-grid__controls-progress-track {
    position: relative;
    width: 100%;
    height: 3px;
    background: var(--fg-controls-track, rgba(0, 0, 0, 0.2));
    border-radius: 2px;
    overflow: hidden;
}

.featured-grid__progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 25%;
    background: var(--fg-controls-color, #000000);
    border-radius: 2px;
    transition: left 0.15s linear, width 0.15s linear;
}

@media (max-width: 989px) {

    .featured-grid.desktop-cols-4 .featured-grid__item,
    .featured-grid.desktop-cols-3 .featured-grid__item {
        flex: 0 0 calc(50% - 12px);
        min-width: 240px;
    }

    .featured-grid__title-line--1 {
        font-size: 38px;
    }

    .featured-grid__title-line--2 {
        font-size: 40px;
    }
}

@media (max-width: 575px) {

    .featured-grid.desktop-cols-4 .featured-grid__item,
    .featured-grid.desktop-cols-3 .featured-grid__item {
        flex: 0 0 85%;
        min-width: 220px;
    }

    .featured-grid__title-line--1 {
        font-size: 32px;
    }

    .featured-grid__title-line--2 {
        font-size: 32px;
    }
}