/**
 * ==========================================================================
 * HELENERIU.FR — fixes-category.css
 * ==========================================================================
 * Category page specific fixes.
 * Loaded ONLY on page_name == 'category'.
 * ==========================================================================
 */

/* Hide duplicate category name card */
#js-product-list-header + .block-category,
.category-top-menu {
  display: none;
}

/* ==========================================================================
   LAYOUT: Hide empty sidebar, full-width product grid
   ========================================================================== */

/* Hide left sidebar (sub-category menu already hidden above) */
#category #left-column,
#products #left-column {
  display: none !important;
}

/* Content wrapper takes full width when sidebar hidden */
#category #content-wrapper,
#products #content-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* ==========================================================================
   PRODUCT GRID: CSS Grid responsive columns
   ========================================================================== */

/* Override Bootstrap .row flex with CSS Grid */
#js-product-list .products.row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset Bootstrap column padding on grid items */
#js-product-list .products .js-product {
  max-width: 100% !important;
  flex: none !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Tablet: 3 columns */
@media (min-width: 768px) {
  #js-product-list .products.row {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Desktop: 4 columns */
@media (min-width: 1200px) {
  #js-product-list .products.row {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Mobile: reduce whitespace */
@media (max-width: 767.98px) {
  #category #main .block-category {
    padding: 0.5rem 0 !important;
    margin: 0 !important;
  }
  #category h1,
  .category-top h1 {
    font-size: 1.5rem !important;
    margin: 0.5rem 0 !important;
    padding: 0 !important;
  }
  #js-product-list-header {
    margin-bottom: 0.5rem !important;
  }
  .products-sort-order {
    margin-bottom: 0.5rem !important;
  }
}

/* Hide EverBlog on category pages */
#category .columns_everblog_wrapper.category_wrapper,
#products .columns_everblog_wrapper.category_wrapper,
.category-page .columns_everblog_wrapper.category_wrapper,
section#main .columns_everblog_wrapper.category_wrapper {
  display: none !important;
}
