:root{
  --fl-bg:#ffffff;
  --fl-card:#fff;
  --fl-ink:#0f172a;
  --fl-ink-muted:#6b7280;
  --fl-border:#e5e7eb;
  --fl-brand:#84cc16;
  --fl-brand-dark:#5ea100;
  --fl-pill:#f3f4f6;
}
*{box-sizing:border-box}
body .fl-shop *{font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif}

.fl-dim{position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:opacity .25s;z-index:9998}
.fl-dim.is-show{opacity:1;pointer-events:auto}

.fl-shop{max-width:1320px;margin:0 auto;padding:16px;display:grid;grid-template-columns:320px 1fr;gap:24px;color:var(--fl-ink)}
@media (max-width:1024px){.fl-shop{grid-template-columns:1fr}}

.fl-filter-trigger{display:none;align-items:center;gap:8px;border:none;background:var(--fl-brand);color:#fff;border-radius:999px;padding:10px 16px;font-weight:600;cursor:pointer;box-shadow:0 6px 14px rgba(132,204,22,.25)}
.fl-filter-trigger:hover{background:var(--fl-brand-dark)}
@media (max-width:1024px){.fl-filter-trigger{display:inline-flex}}

.fl-filters{background:var(--fl-card);border:1px solid var(--fl-border);border-radius:16px;padding:16px;position:sticky;top:12px;overflow:auto;box-shadow:0 6px 16px rgba(15,23,42,.06)}
.fl-filters-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.fl-close{display:none;border:1px solid var(--fl-border);background:#fff;border-radius:10px;padding:6px 10px;cursor:pointer}
@media (max-width:1024px){
  .fl-filters{position:fixed;inset:0 auto 0 0;transform:translateX(-105%);transition:transform .25s;width:min(88vw,380px);max-width:380px;border-radius:0;top:0;z-index:9999}
  .fl-filters.is-open{transform:translateX(0)}
  .fl-close{display:inline-flex}
}
.fl-filter{margin-bottom:16px}
.fl-filter label{display:flex;justify-content:space-between;align-items:center;font-weight:700;margin-bottom:8px;color:#111827}
.fl-filter input[type="text"],.fl-filter input[type="number"],.fl-filter select{width:100%;border:1px solid var(--fl-border);border-radius:12px;padding:12px 14px;font-size:14px;background:#fff}

/* Price */
.fl-price .fl-range{position:relative;height:28px;margin:8px 4px}
.fl-price .fl-range input[type="range"]{-webkit-appearance:none;appearance:none;position:absolute;width:100%;height:4px;top:12px;background:#e5e7eb;border-radius:999px;pointer-events:none}
.fl-price .fl-range input[type="range"]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;background:var(--fl-brand);border-radius:999px;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.15);pointer-events:auto;cursor:pointer}
.fl-price .fl-range-inputs{display:flex;gap:8px;margin-top:8px}
.fl-price .fl-range-inputs .box{display:flex;align-items:center;gap:6px;border:1px solid var(--fl-border);border-radius:12px;padding:10px 12px;flex:1;background:#fff}
.fl-price .fl-range-inputs .box span{color:#6b7280}
.fl-price .hint{display:block;margin-top:6px;color:#6b7280;font-size:12px}

/* Attributes */
.fl-attr-group{border-top:1px dashed var(--fl-border);margin-top:12px;padding-top:6px}
.fl-attr-summary{list-style:none;display:flex;align-items:center;gap:8px;font-size:14px;padding:8px 0;cursor:pointer}
.fl-attr-summary .meta{margin-left:auto;color:var(--fl-ink-muted);font-size:12px}
.fl-attr-terms{overflow:auto;padding:8px;border:1px solid #f3f4f6;border-radius:12px;background:#fafafa}
.fl-term{display:flex;align-items:center;gap:10px;font-size:14px;margin:6px 0}
.fl-term input[type="checkbox"]{width:18px;height:18px;border:1px solid #cbd5e1;border-radius:6px;appearance:none;background:#fff;position:relative;cursor:pointer}
.fl-term input[type="checkbox"]:checked{background:var(--fl-brand);border-color:var(--fl-brand)}
.fl-term input[type="checkbox"]:checked::after{content:"";position:absolute;left:5px;top:1px;width:5px;height:10px;border:2px solid #fff;border-top:none;border-left:none;transform:rotate(45deg)}
.fl-term-count{margin-left:auto;color:var(--fl-ink-muted);font-size:12px}

/* Apply/Reset */
.fl-actions{display:flex;gap:8px;margin-top:10px}
.fl-actions .apply{flex:1;background:var(--fl-brand);border:1px solid var(--fl-brand);color:#fff;font-weight:800;padding:12px 14px;border-radius:12px;box-shadow:0 8px 18px rgba(132,204,22,.25)}
.fl-actions .apply:hover{background:var(--fl-brand-dark);border-color:var(--fl-brand-dark);color:#fff}
.fl-actions .reset{flex:1;display:inline-flex;align-items:center;justify-content:center;border:1px dashed var(--fl-border);border-radius:12px;color:#334155;background:#fff;text-decoration:none}

/* Topbar */
.fl-topbar{display:flex;align-items:center;gap:16px;margin-bottom:10px}
.fl-count{color:#6b7280}
.fl-controls{margin-left:auto;display:flex;align-items:center;gap:12px}
.fl-controls .sort select{border:1px solid var(--fl-border);border-radius:999px;padding:8px 12px;background:#fff}
.fl-clearall{border:1px dashed var(--fl-border);border-radius:999px;padding:8px 12px;text-decoration:none;color:#334155;background:#fff}

/* Subcategories carousel */
.fl-subcats{margin:6px 0 16px;position:relative;overflow:hidden}
.fl-subcats-row{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:8px 48px;scrollbar-width:thin}
.fl-subcats-row::-webkit-scrollbar{height:8px}
.fl-subcats-row::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:999px}
.fl-subcat{border:1px solid #eef2f7;border-radius:16px;overflow:hidden;background:#fff;cursor:pointer;transition:box-shadow .2s,border-color .2s;flex:0 0 200px;scroll-snap-align:start}
.fl-subcat:hover{box-shadow:0 8px 24px rgba(16,24,40,.08)}
.fl-subcat.is-active{border-color:var(--fl-brand)}
.fl-subcat .img{background:#f6f7f9;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center}
.fl-subcat img{max-width:100%;object-fit:contain}
.fl-subcat .name{font-size:13px;font-weight:700;padding:8px 10px;color:#344b09}
.fl-subcat .count{font-size:12px;padding:0 10px 10px;color:#6b7280}
.fl-subcat .ph{color:#9ca3af}
.fl-subcat-nav{position:absolute;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:999px;border:1px solid var(--fl-border);background:#fff;box-shadow:0 2px 8px rgba(16,24,40,.08);display:flex;align-items:center;justify-content:center;cursor:pointer}
.fl-subcat-nav.prev{left:8px}
.fl-subcat-nav.next{right:8px}
.fl-subcat-nav:disabled{opacity:.4;cursor:default}

/* Product card polish (no grid enforced) */
.fl-grid ul.products li.product{display:flex;flex-direction:column;border:1px solid var(--fl-border);border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:box-shadow .2s, transform .2s}
.fl-grid ul.products li.product:hover{box-shadow:0 12px 24px rgba(16,24,40,.10);transform:translateY(-2px)}
.fl-grid ul.products li.product a.woocommerce-LoopProduct-link{display:block;padding:10px 10px 0}
.fl-grid ul.products li.product .woocommerce-loop-product__title{
  display:block !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  word-break:break-word;
  hyphens:auto;
  font-size:15px;line-height:1.35;font-weight:700;padding:8px 10px 0;height:auto;
}
.fl-grid ul.products li.product .price{padding:6px 10px 0;color: var(--fl-brand);font-weight:800}
/* CTA bar */
.fl-grid ul.products li.product .fl-cta{margin-top:auto;display:flex;gap:10px;align-items:center;justify-content:space-between;padding:10px;border-top:1px solid var(--fl-border);background:#fff}
.fl-grid ul.products li.product .fl-cta .button{flex:1;text-align:center;border-radius:12px;padding:10px 12px;background:var(--fl-brand);border:1px solid var(--fl-brand);color:#fff !important;font-weight:800;box-shadow:0 8px 18px rgba(132,204,22,.25)}
.fl-grid ul.products li.product .fl-cta .button:hover{background:var(--fl-brand-dark);border-color:var(--fl-brand-dark);color:#fff !important}
.fl-grid ul.products li.product .fl-cta .fl-view{flex:1;text-align:center;border:1px solid var(--fl-border);border-radius:12px;padding:10px 12px;text-decoration:none;color:#111827;background:#fff}
.fl-grid ul.products li.product .fl-cta .fl-view:hover{border-color:#cbd5e1}

/* Hide compare/wishlist/quick-view strongly */
body ul.products li.product a[href*="compare"],
body ul.products li.product .compare,
body ul.products li.product a.compare,
body ul.products li.product .yith-wcqv-button,
body ul.products li.product [class*="compare"],
body ul.products li.product .yith-woocompare-open,
body ul.products li.product .yith-woocompare-widget,
body ul.products li.product .yith-woocompare-button,
body ul.products li.product .yith-wcwl-add-to-wishlist,
body ul.products li.product .tinvwl-add-to-wishlist{display:none !important}

/* Load more */
.fl-loadmore-btn{display:block;margin:16px auto;border:1px solid var(--fl-border);background:#fff;border-radius:999px;padding:10px 18px;font-size:14px;cursor:pointer}
.fl-loadmore-btn:hover{border-color:#cbd5e1}
.fl-empty{text-align:center;padding:40px;color:#6b7280}


/* === FL FINAL: CTA alignment, subcats responsive, arrows, close, REF label === */
.fl-grid ul.products li.product .fl-cta{ gap:12px; margin-top:auto }
.fl-grid ul.products li.product .fl-cta .button,
.fl-grid ul.products li.product .fl-cta .added_to_cart,
.fl-grid ul.products li.product .fl-cta .fl-view{
  display:flex; align-items:center; justify-content:center;
  height:44px; line-height:1; padding:0 14px; border-radius:12px;
  flex:1; min-width:0;
}
.fl-grid ul.products li.product .fl-cta .button,
.fl-grid ul.products li.product .fl-cta .added_to_cart{
  background:var(--fl-brand)!important; color:#fff!important; font-weight:800;
  border:1px solid var(--fl-brand)!important;
}
.fl-grid ul.products li.product .fl-cta .button:hover,
.fl-grid ul.products li.product .fl-cta .added_to_cart:hover{
  background:var(--fl-brand-dark)!important; border-color:var(--fl-brand-dark)!important;
}
.fl-grid ul.products li.product .fl-cta .fl-view{
  background:#fff; color:#111827; border:1px solid var(--fl-border);
}
.fl-grid ul.products li.product .fl-cta .fl-view:hover{ border-color:#cbd5e1 }

/* sku 'Ref:' look */
.fl-grid ul.products li.product .fl-sku{ margin-top:4px; color:#334155; font-size:12px }
.fl-grid ul.products li.product .fl-sku b{ font-weight:700; margin-right:4px }
.fl-grid ul.products li.product .fl-sku span{ font-weight:600 }

/* mobile: force 1 column to avoid second card peeking */
@media (max-width:600px){
  .fl-grid ul.products{ display:grid; grid-template-columns:1fr; gap:16px }
  .fl-grid ul.products li.product{ width:100%!important; margin:0!important; float:none!important }
  .fl-subcats-row{ padding:8px 40px; gap:10px }
  .fl-subcat{ flex:0 0 clamp(120px, 42vw, 170px) }
}

/* subcat arrows */
.fl-subcat-nav{
  width:36px; height:36px; border-radius:999px; border:none;
  background:var(--fl-brand); color:#fff;
  box-shadow:0 4px 14px rgba(16,24,40,.12);
  display:flex; align-items:center; justify-content:center; font-size:0;
}
.fl-subcat-nav:hover{ background:var(--fl-brand-dark) }
.fl-subcat-nav:disabled{ opacity:.45 }
.fl-subcat-nav.prev::after{ content:"\2039"; font-size:18px; line-height:36px }
.fl-subcat-nav.next::after{ content:"\203A"; font-size:18px; line-height:36px }

/* close button polish */
.fl-close{ border:1px solid var(--fl-border); border-radius:10px; background:#fff; color:#111827 }
.fl-close:hover{ border-color:#cbd5e1 }



/* === FL RESCUE2 (2025-08-17): CSS-only layout & styling === */
.fl-subcat-nav{ display:none !important; }
.fl-subcats { position: relative; overflow:hidden; margin:6px 0 16px; }
.fl-subcats-row{ display:flex; gap:12px; overflow-x:auto; overflow-y:hidden; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity; padding:8px 16px; }
.fl-subcats-row::-webkit-scrollbar{ height:8px; }
.fl-subcats-row::-webkit-scrollbar-thumb{ background:var(--fl-border); border-radius:9999px; }
.fl-subcats-row{ scrollbar-width:thin; scrollbar-color:var(--fl-border) transparent; }
.fl-subcat{ flex:0 0 clamp(140px, 42vw, 190px); scroll-snap-align:start; }
@media (min-width:768px){ .fl-subcat{ flex-basis: clamp(170px, 18vw, 240px); } }
.fl-subcat .img{ width:100%; } .fl-subcat img{ max-width:100%; height:auto; object-fit:contain; }
@media (min-width:1024px){ .fl-shop{ align-items:start; } #flFilters.fl-filters{ position: sticky; top: var(--fl-sticky-top, 16px); max-height: calc(100vh - var(--fl-sticky-top, 16px) - 8px); overflow:auto; overscroll-behavior:contain; } }
@media (max-width:600px){ .fl-grid ul.products{ display:grid !important; grid-template-columns: repeat(2, minmax(0,1fr)) !important; grid-auto-flow: row dense; gap:16px; } .fl-grid ul.products > li.product{ grid-column:auto / span 1 !important; width:auto !important; margin:0 !important; float:none !important; clear:none !important; max-width:100% !important; } }
.fl-grid ul.products::before, .fl-grid ul.products::after{ content:none !important; display:none !important; }
#flFilters .fl-close, #flFilters .fl-filter-close, #flFilters .fl-drawer-close, #flFilters .fl-offcanvas-close{ background:#111827 !important; color:#fff !important; border:1px solid #111827 !important; transition: background .15s ease, border-color .15s ease, transform .12s ease; }
#flFilters .fl-close:hover, #flFilters .fl-filter-close:hover, #flFilters .fl-drawer-close:hover, #flFilters .fl-offcanvas-close:hover{ background:var(--fl-brand, #84cc16) !important; border-color:var(--fl-brand, #84cc16) !important; color:#fff !important; transform:translateY(-1px); }
/* pointer cursor for subcat tiles */
.fl-subcats .fl-subcat{ cursor:pointer; }



/* === FL RESCUE2: Brand sale % badge — 2025-08-17 === */
.fl-grid ul.products li.product .sale-price-off,
.woocommerce div.product .sale-price-off{
  position:absolute; top:8px; right:10px; z-index:12;
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 10px; border-radius:9999px; text-transform:uppercase;
  font: 800 12px/1.1 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:#fff;
  background:linear-gradient(180deg, var(--fl-brand,#84cc16), var(--fl-brand-dark,#5ea100));
  border:1px solid rgba(0,0,0,.08); box-shadow:0 8px 18px rgba(132,204,22,.25);
}
.fl-grid ul.products li.product:hover .sale-price-off{ transform: translateY(-1px); }
.woocommerce div.product .sale-price-off{ top:10px; right:12px; }
@media (max-width:600px){ .sale-price-off{ padding:5px 8px; font-size:11px; top:6px; right:8px; } }



/* === FL RESCUE2: Brand styling for wishlist/love heart — 2025-08-17 === */
/* Base color for hearts (most plugins) */
.fl-grid ul.products li.product .tinvwl_add_to_wishlist_button,
.fl-grid ul.products li.product .tinvwl_add_to_wishlist_button .tinvwl-icon-heart,
.fl-grid ul.products li.product .yith-wcwl-add-to-wishlist a,
.fl-grid ul.products li.product .yith-wcwl-icon,
.fl-grid ul.products li.product .woosw-btn,
.fl-grid ul.products li.product .wlfmc-btn-wishlist,
.fl-grid ul.products li.product .wlfmc-icon-heart,
.fl-grid ul.products li.product [class*="wishlist"] svg {
  color: var(--fl-brand, #84cc16) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  transition: color .15s ease, transform .12s ease;
}
/* Hover to darker brand */
.fl-grid ul.products li.product .tinvwl_add_to_wishlist_button:hover,
.fl-grid ul.products li.product .yith-wcwl-add-to-wishlist a:hover,
.fl-grid ul.products li.product .woosw-btn:hover,
.fl-grid ul.products li.product .wlfmc-btn-wishlist:hover,
.fl-grid ul.products li.product [class*="wishlist"] svg:hover {
  color: var(--fl-brand-dark, #5ea100) !important;
  transform: translateY(-1px);
}
/* Added/active states */
.fl-grid ul.products li.product .tinvwl_add_to_wishlist_button.tinvwl-product-in-list,
.fl-grid ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistaddedbrowse a,
.fl-grid ul.products li.product .yith-wcwl-add-to-wishlist .yith-wcwl-wishlistexistsbrowse a,
.fl-grid ul.products li.product .woosw-btn.woosw-btn-added,
.fl-grid ul.products li.product .wlfmc-btn-wishlist.wlfmc-added {
  color: var(--fl-brand-dark, #5ea100) !important;
}
/* If plugin draws a circle background, tint its border */
.fl-grid ul.products li.product .tinvwl_add_to_wishlist_button,
.fl-grid ul.products li.product .yith-wcwl-add-to-wishlist a,
.fl-grid ul.products li.product .woosw-btn,
.fl-grid ul.products li.product .wlfmc-btn-wishlist{
  border-color: var(--fl-brand, #84cc16) !important;
}



/* === FL RESCUE2: Precise wishlist (WLFMC) brand styling — 2025-08-17 === */
.fl-grid ul.products li.product .wlfmc_add_to_wishlist,
.fl-grid ul.products li.product .wlfmc_add_to_wishlist .wlfmc-icon-heart-regular-2 {
  color: var(--fl-brand, #84cc16) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  transition: color .15s ease, transform .12s ease;
}
.fl-grid ul.products li.product .wlfmc_add_to_wishlist:hover,
.fl-grid ul.products li.product .wlfmc_add_to_wishlist:hover .wlfmc-icon-heart-regular-2 {
  color: var(--fl-brand-dark, #5ea100) !important;
  transform: translateY(-1px);
}
/* Active/added state (plugin usually toggles a class on parent or link; cover common cases) */
.fl-grid ul.products li.product .wlfmc-add-button.wlfmc-added .wlfmc_add_to_wishlist,
.fl-grid ul.products li.product .wlfmc_add_to_wishlist.wlfmc-added {
  color: var(--fl-brand-dark, #5ea100) !important;
}



/* === FL RESCUE2: Wishlist ADDED state brand color (WLFMC) — 2025-08-17 === */
.fl-grid ul.products li.product .wlfmc-add-button.wlfmc-added .wlfmc_add_to_wishlist,
.fl-grid ul.products li.product .wlfmc-add-button.wlfmc-added [class*="wlfmc-icon-heart"],
.fl-grid ul.products li.product .wlfmc_add_to_wishlist.wlfmc-added,
.fl-grid ul.products li.product .wlfmc_add_to_wishlist.wlfmc-added [class*="wlfmc-icon-heart"],
.fl-grid ul.products li.product .wlfmc-add-button .wlfmc_add_to_wishlist.wlfmc-product-in-list,
.fl-grid ul.products li.product .wlfmc-add-button .wlfmc_add_to_wishlist.wlfmc-product-in-list [class*="wlfmc-icon-heart"]{
  color: var(--fl-brand, #84cc16) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}
/* Guard against theme orange override */
.fl-grid ul.products li.product .wlfmc-add-button.wlfmc-added .wlfmc_add_to_wishlist,
.fl-grid ul.products li.product .wlfmc_add_to_wishlist.wlfmc-added{
  background: transparent !important;
  border-color: currentColor !important;
}




/* =======================
   Cross‑Category Normalization (Paineis‑style)
   Safe: does not force grid layout; only visuals.
   Tweak the brand color below.
======================= */
:root { --fl-brand: var(--e-global-color-primary, var(--ast-global-color-0, var(--primary, var(--accent, var(--wd-primary-color, var(--theme-accent-color, var(--global-palette1, #00AEEF)))))))); /* TODO: replace with your brand hex */
  --fl-text: #1f2937;
  --fl-muted: #6b7280;
  --fl-border: #e5e7eb;
  --fl-card-bg: #ffffff;
}
/* spacing between cards on all product-category archives */
body.tax-product_cat ul.products { gap: 24px; }
/* product card shell */
body.tax-product_cat ul.products li.product {
  background: var(--fl-card-bg);
  border: 1px solid var(--fl-border);
  border-radius: 16px;
  padding: 14px;
  transition: box-shadow .2s ease, transform .15s ease;
}
body.tax-product_cat ul.products li.product:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  transform: translateY(-2px);
}
/* image ratio + fit */
body.tax-product_cat ul.products li.product a img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}
/* title clamp + tidy */
body.tax-product_cat .woocommerce-loop-product__title,
body.tax-product_cat .wc-block-grid__product-title {
  color: var(--fl-text);
  font-size: 16px;
  line-height: 1.3;
  display: block;              /* allow natural height */
  overflow: visible;           /* show full title */
  min-height: 0;               /* no fixed clamp height */
  margin-top: 10px;
}
/* price emphasis */
body.tax-product_cat .price {
  color: var(--fl-brand);
  font-weight: 600;
  margin: 8px 0 10px;
}
/* CTA button (add to cart / select options) */
body.tax-product_cat ul.products li.product .button,
body.tax-product_cat .add_to_cart_button,
body.tax-product_cat a.product_type_variable,
body.tax-product_cat a.product_type_simple {
  background: var(--fl-brand);
  color: #fff !important;
  border-radius: 999px;
  padding: 10px 14px;
  border: 0;
  text-transform: none;
  letter-spacing: 0;
}
body.tax-product_cat ul.products li.product .button:hover,
body.tax-product_cat .add_to_cart_button:hover,
body.tax-product_cat a.product_type_variable:hover,
body.tax-product_cat a.product_type_simple:hover {
  filter: brightness(.92);
}
/* ratings tint */
body.tax-product_cat .star-rating span::before { color: var(--fl-brand); }
/* wishlist — default + active states (WLFMC plugin) */
.wlfmc-add-button .wlfmc_add_to_wishlist { 
  color: var(--fl-brand) !important;
  border-color: var(--fl-brand) !important;
}
.wlfmc-add-button .wlfmc_add_to_wishlist:hover {
  filter: brightness(.92);
}
.wlfmc-add-button.wlfmc-added .wlfmc_add_to_wishlist,
.wlfmc-add-button .wlfmc_add_to_wishlist.added,
.wlfmc-add-button .wlfmc_add_to_wishlist.wlfmc-added {
  background: var(--fl-brand) !important;
  color: #fff !important;
  border-color: var(--fl-brand) !important;
}
/* hide stray compare buttons just in case */
a.compare, .woosc-btn, .woosw-btn { display:none !important; }
/* small fixes for blocks grid too */
.wc-block-grid__products { gap: 24px; }
.wc-block-grid__product { border: 1px solid var(--fl-border); border-radius: 16px; padding: 14px; }


/* === Stronger brand enforcement === */
body.tax-product_cat ul.products li.product .button,
body.tax-product_cat .add_to_cart_button,
body.tax-product_cat a.product_type_variable,
body.tax-product_cat a.product_type_simple {
  background: var(--fl-brand) !important;
  border-color: var(--fl-brand) !important;
  color: #fff !important;
}

.wlfmc-add-button .wlfmc_add_to_wishlist {
  color: var(--fl-brand) !important;
  border-color: var(--fl-brand) !important;
}
.wlfmc-add-button .wlfmc_add_to_wishlist:hover {
  filter: brightness(.92);
}
.wlfmc-add-button.wlfmc-added .wlfmc_add_to_wishlist,
.wlfmc-add-button .wlfmc_add_to_wishlist.added,
.wlfmc-add-button .wlfmc_add_to_wishlist.wlfmc-added {
  background: var(--fl-brand) !important;
  color: #fff !important;
  border-color: var(--fl-brand) !important;
}


/* =============================
   Subcategories responsiveness
   - Prevent overflow in boxed layouts
   - Wrap on desktop, scroll on mobile
============================= */
.fl-subcats, .fl-subcats-row, #flSubcatsRow { max-width: 100%; width: 100%; box-sizing: border-box; }
#flSubcatsRow, .fl-subcats-row { min-width: 0; display:flex; gap:14px; flex-wrap: wrap; overflow-x: hidden; padding: 8px 16px; }
.fl-subcat { flex: 0 0 clamp(140px, 25vw, 220px); }

/* On small screens, use a horizontal scroll row for better UX */
@media (max-width: 768px){
  #flSubcatsRow, .fl-subcats-row { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; }
  .fl-subcat { scroll-snap-align: start; }
}

/* Safety: make main archive flex areas respect boxed wrapper */
.fl-shop, .fl-shop > main, .fl-shop .fl-main { min-width: 0; max-width: 100%; }


/* =============================
   Hello Elementor: Boxed wrapper
   - Internal container to clamp archive width when theme has no wrapper
============================= */
:root { --fl-container-max: 1280px; } /* adjust if needed */
.fl-container {
  max-width: var(--fl-container-max, 1200px);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* Ensure subcategories respect the container and never overflow */
.fl-container .fl-subcats,
.fl-container .fl-subcats-row,
.fl-container #flSubcatsRow { max-width: 100%; }


/* =============================================
   Subcategories: single-row horizontal scroller
   (no wrap on any screen; use scrollbar to slide)
   ============================================= */
#flSubcatsRow, .fl-subcats-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  gap: 14px;
  min-width: 0;
  scroll-snap-type: x proximity;
  padding: 8px 16px;
}

/* snap items nicely while scrolling */
#flSubcatsRow > .fl-subcat,
.fl-subcats-row > .fl-subcat { scroll-snap-align: start; }

/* reasonable fixed-ish card width so scrollbar is meaningful */
.fl-subcat { flex: 0 0 clamp(160px, 22vw, 240px) !important; }

/* Show a thin scrollbar; style where supported */
#flSubcatsRow, .fl-subcats-row { scrollbar-width: thin; }
#flSubcatsRow::-webkit-scrollbar, .fl-subcats-row::-webkit-scrollbar { height: 8px; }
#flSubcatsRow::-webkit-scrollbar-track, .fl-subcats-row::-webkit-scrollbar-track { background: rgba(0,0,0,.06); border-radius: 8px; }
#flSubcatsRow::-webkit-scrollbar-thumb, .fl-subcats-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,.25); border-radius: 8px; }


/* =============================
   Mobile spacing tune (tight gutters)
   - Reduce container padding, grid gap, and card padding
   - Make CTA full-width and slightly smaller for compact look
============================= */
@media (max-width: 768px){
  .fl-container{ padding-left:12px; padding-right:12px; }
  body.tax-product_cat ul.products{ gap:12px; }
  body.tax-product_cat ul.products li.product{ padding:12px; border-radius:14px; }
  .fl-subcats-row, #flSubcatsRow{ padding:6px 10px; gap:10px; }
}
@media (max-width: 480px){
  .fl-container{ padding-left:8px; padding-right:8px; }
  body.tax-product_cat ul.products{ gap:8px; }
  body.tax-product_cat ul.products li.product{ padding:10px; border-radius:12px; }
  body.tax-product_cat .woocommerce-loop-product__title{ font-size:15px; }
  body.tax-product_cat .price{ font-size:14px; }
  body.tax-product_cat ul.products li.product .button,
  body.tax-product_cat .add_to_cart_button,
  body.tax-product_cat a.product_type_variable,
  body.tax-product_cat a.product_type_simple{
    width:100%;
    padding:10px 12px;
    font-size:14px;
  }
}


/* Remove padding on mobile for the main shop wrapper */
@media (max-width: 768px){
  .fl-shop{ padding: 0 !important; }
}


/* Zero-result terms: dim + disable */
.fl-term.is-zero { opacity: .45; filter: grayscale(1); }
.fl-term.is-zero input[type="checkbox"] { pointer-events: none; }

/* Ensure price and its amounts use brand green */
.price, .price .amount, .price ins .amount, .price del .amount { color: var(--fl-brand) !important; }


/* FL Pagination styles */
.woocommerce-pagination ul {display:flex; gap:8px; list-style:none; padding:0; margin:24px 0; flex-wrap:wrap}
.woocommerce-pagination li a, .woocommerce-pagination li span {
  display:inline-block; padding:8px 12px; border:1px solid #ddd; border-radius:6px; text-decoration:none;
}
.woocommerce-pagination li span.current {background:#111; color:#fff; border-color:#111}
.woocommerce-pagination li a:hover {border-color:#111}


/* Footer fallback pagination container */
.fl-footer-pagination nav.woocommerce-pagination ul {display:flex; gap:8px; list-style:none; padding:0; margin:24px 0; flex-wrap:wrap}
.fl-footer-pagination nav.woocommerce-pagination li a,
.fl-footer-pagination nav.woocommerce-pagination li span {display:inline-block; padding:8px 12px; border:1px solid #ddd; border-radius:6px; text-decoration:none}
.fl-footer-pagination nav.woocommerce-pagination li span.current {background:#111; color:#fff; border-color:#111}
