/* ============================
   Category Buttons & Carousel
============================ */

.category-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0 10px 7px;
    /* 7px left space */
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

.category-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 50px;
    background: white;
    color: black;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    min-width: fit-content;
    max-width: 100%;
    user-select: none;
    touch-action: manipulation;
}

.category-btn:hover {
    box-shadow: 0 0 5px rgba(0, 0, 255, 0.4);
    transform: scale(1.05);
}

.category-btn.active {
    border-color: #007bff;
    font-weight: bold;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.5);
}

/* ============================
            Product Grid
   ============================ */

/* Re-enable Grid to enforce 7px gap and handle extracted columns */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    /* User requested 7px spacing */
}

/* Force Flatsome columns to respect our Grid */
.product-grid .col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    /* Remove padding as we use gap */
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* ============================
         Product Cards
============================ */

/* Product styles removed to use theme defaults */

/* ============================
       Fade-Up Animation
============================ */

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
    Advanced Features
============================ */

/* 1. Sticky Category Bar */
.category-carousel {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #eee;
}

/* 2. Skeleton Loading */
.skeleton-loader {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
}

.skeleton-card {
    height: 300px;
    background: #f0f0f0;
    border-radius: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

@media (max-width: 1024px) {
    .skeleton-loader {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* 3. Quick View - Force Hide (User Request) */
.quick-view,
.yith-wcqv-button,
.box-image .quick-view {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

/* 6. Carousel Navigation Pills (Desktop Only) */
.category-carousel-wrapper {
    position: relative;
    /* Masking for blur effect at edges if needed */
    /* overflow: hidden; - Removed to allow buttons to sit nicely if outside, but we put them inside wrapper */
}

/* Nav Buttons Styles */
.fcs-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    /* Pill/Circle */
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    color: #555;
    transition: all 0.2s ease;
    display: none;
    /* JS will toggle flex/block based on logic */
}

.fcs-nav-btn:hover {
    background: #f1f1f1;
    color: #000;
}

.fcs-nav-btn.prev {
    left: 0;
    /* Blur effect bg behind button if desired, or we can add a pseudo element */
}

.fcs-nav-btn.next {
    right: 0;
}

/* Blur/Fade Mask on Edges (Desktop) */
@media (min-width: 850px) {

    /* Flatsome Desktop Breakpoint */
    .category-carousel-wrapper::before,
    .category-carousel-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 50px;
        z-index: 5;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    /* Left Fade */
    .category-carousel-wrapper::before {
        left: 0;
        background: linear-gradient(to right, rgba(255, 255, 255, 0.9), transparent);
        opacity: 0;
        /* Hidden by default */
    }

    .category-carousel-wrapper.show-left::before {
        opacity: 1;
    }

    /* Right Fade */
    .category-carousel-wrapper::after {
        right: 0;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
        opacity: 0;
    }

    .category-carousel-wrapper.show-right::after {
        opacity: 1;
    }

    /* Show buttons on desktop if needed */
    .fcs-nav-btn {
        /* JS will handle display, but we ensure style is ready */
    }
}

/* Hide on Mobile */
@media (max-width: 849px) {
    .fcs-nav-btn {
        display: none !important;
    }

    .category-carousel-wrapper::before,
    .category-carousel-wrapper::after {
        display: none;
    }
}

/* Hide Default Flatsome Badges if possible (may need stronger selector based on theme) */
.badge-container,
.onsale {
    display: none !important;
}

.fcs-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 4px 8px;
    border-radius: 0 0 4px 0;
    /* Corner radius style */
    color: white;
    font-weight: bold;
    font-size: 12px;
    z-index: 20;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.fcs-badge.discount {
    background: #ff4444;
}

.fcs-badge.hot {
    background: #ff9900;
}

.fcs-badge.trending {
    background: #9c27b0;
}

.fcs-badge.limited {
    background: #2196f3;
}

/* 5. Social Proof - REMOVED */