/* ===================================
   SHOP PAGE STYLES
   =================================== */

/* ----------------------------- */
/*    CATEGORIES GALLERY VIEW     */
/* ----------------------------- */

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce .products ul::before,
.woocommerce .products ul::after {
    content: none !important;
    display: none !important;
}

.categories-shop-view-wrapper {
    position: relative;
    margin: 40px 0 60px 0;
    padding: 0;
}

.categories-shop-view-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.categories-shop-view {
    display: flex;
    gap: 0; /* No spacing between categories */
    overflow-x: auto;
    /* scroll-behavior: smooth; Removed to avoid conflict with JS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    scroll-snap-type: x mandatory;
    padding: 0;
}

.categories-shop-view::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Category Column - Square Gallery Style */
.category-column {
    flex: 0 0 auto;
    width: 200px;
    height: 200px;
    position: relative;
    scroll-snap-align: start;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.category-column:hover {
    transform: scale(1.05);
    z-index: 10;
    filter: brightness(1.1);
}

.category-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.category-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.category-column:hover .category-link img {
    transform: scale(1.1);
}

/* ----------------------------- */
/*    SHOP PAGE HEADER            */
/* ----------------------------- */

.woocommerce-products-header {
    margin-bottom: 30px;
}

.woocommerce-products-header__title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 0.3px;
}


/* Product Loop Container */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px;
    list-style: none !important;
    padding: 0 !important;
    margin: 40px 0;
    padding-inline-start: 0 !important; /* Fix for RTL padding */
}

/* Scroll Buttons */
.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; /* Smaller button */
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scroll-button.left {
    position: absolute; 
    left: 0 !important;
    opacity: 1 !important;
}

.scroll-button.right {
    position: absolute; 
    right: 0 !important;
    opacity: 1 !important;
}

/* Override WooCommerce default column classes */
ul.products li.product,
ul.products li.product-category {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    margin: 0 !important;
}

/* ----------------------------- */
/*    SHOP FILTERS & SORTING      */
/* ----------------------------- */

.woocommerce-ordering {
    margin-bottom: 20px;
}

.woocommerce-result-count {
    color: var(--text-color);
    font-size: 1rem;
}

/* ----------------------------- */
/*    RESPONSIVE BREAKPOINTS      */
/* ----------------------------- */

/* Large Desktop - 5 columns */
@media (min-width: 1400px) {
    ul.products {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }
    
    .category-column {
        width: 220px;
        height: 220px;
    }
}

/* Desktop - 4 columns */
@media (max-width: 1399px) and (min-width: 1200px) {
    ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Laptop - 3 columns */
@media (max-width: 1199px) and (min-width: 992px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    
    .category-column {
        width: 180px;
        height: 180px;
    }
}

/* Tablet - 2 columns */
@media (max-width: 991px) and (min-width: 576px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .category-column {
        width: 160px;
        height: 160px;
    }
    
    .woocommerce-products-header__title {
        font-size: 1.25rem;
    }
}

/* Mobile - 2 columns (smaller) */
@media (max-width: 575px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        padding: 12px;
        border-radius: 16px;
        gap: 12px;
    }
    
    .product-action-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .category-column {
        width: 140px;
        height: 140px;
    }

    .woocommerce-products-header__title {
        font-size: 1.15rem;
    }
}

/* Extra Small Mobile - Stack single column if needed */
@media (max-width: 380px) {
    .category-column {
        width: 120px;
        height: 120px;
    }
}

/* ----------------------------- */
/*    LOADING & EMPTY STATES      */
/* ----------------------------- */

/* WooCommerce messages now handled by JavaScript notification system */
/* Old message styles removed - see notification-manager.js */

/* No products found */
.woocommerce-no-products-found {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-color);
    font-size: 1.2rem;
}

/* ----------------------------- */
/*    PAGINATION                  */
/* ----------------------------- */

.woocommerce-pagination {
    margin-top: 50px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.woocommerce-pagination li {
    margin: 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border: 2px solid var(--third-color);
    border-radius: 12px;
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.woocommerce-pagination a:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.woocommerce-pagination span.current {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}
