/* Category master v5 (Claude, 6 Nov). Loaded only on category pages. Undo: remove the link in head.tpl. Prices, hooks and filters untouched. */
html body#category { background: #fff !important; }
html body#category #wrapper, html body#category #content-wrapper, html body#category .lm-listing-products { background: #fff !important; }
html body#category .breadcrumb-wrapper, html body#category .breadcrumb { margin: 0 !important; padding: 6px 0 !important; background: transparent !important; font-size: 12px !important; }

/* Title strip */
html body#category .lm-category-header { margin: 0 0 8px !important; }
html body#category .lm-category-hero { display: block !important; min-height: 0 !important; padding: 2px 0 0 !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
html body#category .lm-category-hero .lm-category-image { display: none !important; }
html body#category .lm-category-copy { padding: 0 !important; max-width: 760px; }
html body#category h1.page-heading { margin: 0 0 4px !important; font: 800 26px/1.15 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; letter-spacing: -.02em; color: #18232c; text-align: left !important; }
html body#category .lp-v4-category-intro { margin: 0 !important; font: 400 14px/1.45 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; color: #5b6670; text-align: left !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Chips */
.lp-cat-chips { display: flex; gap: 8px; margin: 10px -12px 0; padding: 0 12px 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lp-cat-chips::-webkit-scrollbar { display: none; }
.lp-cat-chips a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #dfe3e6; border-radius: 999px; background: #fff; color: #18232c !important; font: 600 13.5px/1 "Laporsa Manrope", "Segoe UI", Arial, sans-serif; text-decoration: none !important; white-space: nowrap; }
.lp-cat-chips a.is-on { background: #18232c; border-color: #18232c; color: #fff !important; }

/* Filter and sort bar: sticks under the header */
html body#category #js-product-list-top { position: sticky; top: var(--lp-sticky-top, 0px); z-index: 20; display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px; min-height: 0 !important; margin: 0 -12px 12px !important; padding: 8px 12px !important; background: rgba(255, 255, 255, .97) !important; border: 0 !important; border-bottom: 1px solid #e6e8ea !important; box-shadow: none !important; }
html body#category .lm-products-count { margin: 0 !important; padding: 0 !important; }
html body#category .lm-products-count .lm-eyebrow { display: none !important; }
html body#category .lm-products-count strong { font: 600 13px/1 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; color: #5b6670; white-space: nowrap; }
html body#category .lm-products-actions { display: flex !important; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 !important; padding: 0 !important; min-width: 0; }
html body#category .lm-filter-button { min-height: 42px !important; padding: 0 14px !important; border-radius: 10px !important; font: 700 14px/1 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; width: auto !important; }
html body#category .products-sort-order { min-width: 0; margin: 0 !important; flex: 0 1 auto; }
html body#category .products-sort-order .select-title, html body#category .products-sort-order button { min-height: 42px !important; max-width: 172px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 10px !important; font-size: 13.5px !important; }

/* Grid */
html body#category .products.product-list-wrapper { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px 10px !important; margin: 0 !important; }
@media (min-width: 768px) { html body#category .products.product-list-wrapper { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 26px 16px !important; } }
@media (min-width: 1200px) { html body#category .products.product-list-wrapper { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
html body#category .products .product-miniature { width: auto !important; max-width: none !important; flex: none !important; margin: 0 !important; padding: 0 !important; }

/* Card */
html body#category .lp-card__inner { display: flex !important; flex-direction: column; height: 100%; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible !important; }
html body#category .lp-card__media { position: relative; aspect-ratio: 1 / 1; margin: 0 0 8px !important; padding: 0 !important; overflow: hidden !important; border-radius: 10px; background: #f4f2ee !important; }
html body#category .lp-card__media .product-thumbnail, html body#category .lp-card__media .product-cover-link { display: block; width: 100%; height: 100%; }
html body#category .lp-card__media img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; transition: transform .25s ease; transform-origin: center; }
html body#category .lp-card__media img.lp-whole { object-fit: contain; }
html body#category .product-flag.new { display: none !important; }
html body#category .product-flags { top: 8px !important; left: 8px !important; }
html body#category .lp-card__body { display: flex !important; flex: 1; flex-direction: column; padding: 0 !important; text-align: left !important; }
html body#category .lp-card__title { margin: 0 0 4px !important; min-height: 0 !important; text-align: left !important; font: 600 14px/1.3 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; }
html body#category .lp-card__title a { color: #18232c !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-card-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.lp-card-chips span { padding: 3px 7px; border-radius: 5px; background: #f2f3f4; color: #46525c; font: 600 11.5px/1.2 "Laporsa Manrope", "Segoe UI", Arial, sans-serif; }
html body#category .lp-card__stock { margin: 0 0 6px !important; text-align: left !important; }
html body#category .lp-card__stock .lp-stock { display: inline-flex !important; align-items: center; gap: 5px; width: auto !important; padding: 0 !important; border: 0 !important; background: none !important; color: #15703f !important; font: 600 12px/1.2 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; }
html body#category .lp-card__stock .lp-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1b8a4b; }
html body#category .lp-card__foot { margin-top: auto !important; padding: 0 !important; border: 0 !important; display: block !important; }
html body#category .product-price-and-shipping { display: block !important; margin: 0 0 8px !important; text-align: left !important; }
html body#category .lp-sqm-price { font: 800 19px/1.15 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; color: #18232c !important; text-align: left !important; }
html body#category .lp-per-tile-price .first-prices { display: block !important; margin: 1px 0 0 !important; }
html body#category .lp-per-tile-price .product-price, html body#category .lp-per-tile-price .product-price .lp-tile-unit { font: 500 12.5px/1.3 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; color: #5b6670 !important; }
html body#category .lp-per-tile-price .third-prices { display: none !important; }
html body#category .product-price-and-shipping:not(.lp-per-tile-price) .product-price { font: 800 19px/1.15 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; color: #18232c !important; }
html body#category .product-list-reviews:has(.grade-stars:empty) { display: none !important; }
html body#category .buttons-sections { margin: 0 !important; padding: 0 !important; }
html body#category .buttons-sections .btn { display: flex !important; align-items: center; justify-content: center; width: 100% !important; min-height: 42px !important; padding: 0 8px !important; border-radius: 10px !important; font: 700 13.5px/1 "Laporsa Manrope", "Segoe UI", Arial, sans-serif !important; }
html body#category .buttons-sections .lp-choose-quantity { background: #fff !important; border: 1.5px solid #18232c !important; color: #18232c !important; }
@media (hover: hover) { html body#category .lp-card:hover .lp-card__media img { filter: none; } html body#category .lp-card:hover .lp-card__title a { text-decoration: underline; } }

/* Toolbar wrapper carries the sticky so it holds for the whole list */
html body#category .lp-listing__toolbar { position: sticky; top: var(--lp-sticky-top, 0px); z-index: 20; margin: 0 -12px 12px !important; padding: 0 !important; background: #fff !important; border: 0 !important; }
html body#category #js-product-list-top { position: static; margin: 0 !important; }
html body#category #js-active-search-filters:empty { display: none !important; margin: 0 !important; }
html body#category #js-product-list-top .sort-label, html body#category .lm-view-switch, html body#category .products-view, html body#category .grid-list, html body#category .view-switcher { display: none !important; }
html body#category #wrapper { padding-top: 0 !important; }
html body#category .breadcrumb-wrapper { padding: 0 !important; }
@media (max-width: 767.98px) {
  html body#category .lp-v4-category-intro { -webkit-line-clamp: 1; }
  html body#category h1.page-heading { font-size: 24px !important; margin-bottom: 2px !important; }
  html body#category .lp-cat-chips { margin-top: 8px; padding-bottom: 2px; }
  html body#category .lm-category-header { margin-bottom: 0 !important; }
}
@media (min-width: 992px) {
  html body#category .lp-listing__toolbar { margin: 0 0 16px !important; }
  html body#category h1.page-heading { font-size: 32px !important; }
  .lp-cat-chips { margin-left: 0; margin-right: 0; padding-left: 0; }
}

html body#category .lp-card__title, html body#category .lp-card__title a, html body#category .lp-card__body, html body#category .second-block, html body#category .third-block-left { text-align: left !important; justify-content: flex-start !important; align-items: stretch !important; }
html body#category .lp-card-chips { justify-content: flex-start; }
html body#category #js-product-list-top [class*="view"], html body#category #js-product-list-top .form-control-label { display: none !important; }
html body#category .lm-products-actions { flex-wrap: nowrap !important; }
html body#category .lp-card__media img { background: #fff; }

html body#category .lp-listing__toolbar { position: sticky !important; }
html body#category .second-block, html body#category .third-block-left, html body#category .lp-card__foot, html body#category .buttons-sections, html body#category .lp-card__title, html body#category .product-price-and-shipping, html body#category .first-prices, html body#category .lp-card__stock { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
html body#category .lp-card__title a { display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; white-space: normal !important; }
html body#category .lp-per-tile-price .product-price { padding: 0 !important; margin: 0 !important; }
html body#category .buttons-sections { margin-top: auto !important; }
html body#category .lp-listing__toolbar { top: var(--lp-sticky-top, 0px) !important; align-self: flex-start; width: calc(100% + 24px); }
html body#category #products { display: block !important; }
@media (min-width: 992px) { html body#category .lp-listing__toolbar { width: 100%; } }
html body#category .lp-listing__toolbar { z-index: 60 !important; background: #fff !important; }
html body#category #js-product-list-top { background: #fff !important; }
html body#category #js-product-list { position: relative; z-index: 1; }
html body#category .lm-category-hero::before, html body#category .lm-category-hero::after, html body#category .lm-category-copy::before, html body#category .lm-category-copy::after, html body#category .lm-category-header::before, html body#category .lm-category-header::after { display: none !important; content: none !important; }
html body#category .lp-card-chips { margin-left: 0 !important; padding-left: 0 !important; }

/* FM-036 (h): category photo on each chip */
.lp-cat-chips a:has(.lp-cat-chips__img) { padding-left: 6px; gap: 8px; }
.lp-cat-chips__img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #f1f3f4; }
