/*
 * MCTK Emerald Cyber Luxury — Category / Shop Archive (v3.8.0)
 * Loaded CONDITIONALLY only on Shop / Product Category / Tag archives (0 bytes elsewhere).
 * Clean Category Header Banner + Left Filter Sidebar + Right Product Grid + Bottom SEO/FAQ.
 */

/* Hide Flatsome's redundant shop sidebar/title wrapper when Emerald Archive is active */
body.mctk-archive-emerald .shop-page-title .flex-right,
body.mctk-archive-emerald .shop-page-title .woocommerce-result-count,
body.mctk-archive-emerald .shop-page-title .woocommerce-ordering{
  display:none!important;
}
body.mctk-archive-emerald .shop-page-title{
  padding-top:12px;
  padding-bottom:0;
}
body.mctk-archive-emerald .category-page-row{
  max-width:1320px;
  margin-left:auto;
  margin-right:auto;
  padding-top:10px;
}
body.mctk-archive-emerald .category-page-row > .col.large-3,
body.mctk-archive-emerald #shop-sidebar{
  display:none!important;
}
body.mctk-archive-emerald .category-page-row > .col.large-9,
body.mctk-archive-emerald .category-page-row > .col.large-12{
  max-width:100%!important;
  flex-basis:100%!important;
  width:100%!important;
}

.mcx-archive-wrap{
  width:100%;
  font-family:var(--mcx-body);
  color:var(--mcx-ink);
}

/* ===== 1. CATEGORY HEADER BANNER (SINGLE H1 + LIVE STATS) ===== */
.mcx-archive-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px 24px;
  padding:22px 24px;
  margin:0 0 20px;
  border-radius:18px;
  border:1px solid var(--mcx-line);
  background:#fff;
  box-shadow:var(--mcx-shadow-sm);
}
.mcx-archive-hero-copy{
  flex:1 1 420px;
  min-width:0;
}
.mcx-archive-title{
  margin:0;
  font-family:var(--mcx-heading);
  font-size:clamp(24px,2.5vw,32px);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.2;
  color:var(--mcx-ink);
}
.mcx-archive-intro{
  margin:8px 0 0;
  font-size:14px;
  line-height:1.65;
  color:var(--mcx-muted);
  max-width:740px;
}
.mcx-archive-stats{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--mcx-emerald-100);
  background:var(--mcx-emerald-50);
}
.mcx-archive-stat{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:4px 10px;
}
.mcx-archive-stat + .mcx-archive-stat{
  border-left:1px solid var(--mcx-emerald-200);
}
.mcx-archive-stat-ico{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:9px;
  background:#fff;
  color:var(--mcx-green);
  border:1px solid var(--mcx-emerald-100);
}
.mcx-archive-stat-ico svg{width:17px;height:17px}
.mcx-archive-stat-ico--gold{color:var(--mcx-gold)}
.mcx-archive-stat-ico--sold{color:#ea580c;background:#fff7ed;border-color:#fed7aa}
.mcx-archive-stat-txt{
  display:flex;
  flex-direction:column;
  line-height:1.2;
}
.mcx-archive-stat-txt strong{
  font-family:var(--mcx-heading);
  font-size:15px;
  font-weight:800;
  color:var(--mcx-ink);
}
.mcx-archive-stat-txt span{
  font-size:11px;
  color:var(--mcx-muted);
  margin-top:2px;
}

/* ===== 2. TWO-COLUMN ARCHIVE LAYOUT (256px FILTER SIDEBAR + GRID) ===== */
.mcx-archive-layout{
  display:grid;
  grid-template-columns:256px minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.mcx-archive-sidebar{
  position:sticky;
  top:calc(var(--mcx-header-offset, 118px));
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:18px;
  padding:18px 16px;
  box-shadow:var(--mcx-shadow-sm);
}
.mcx-filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding-bottom:12px;
  margin-bottom:12px;
  border-bottom:1px solid var(--mcx-soft);
}
.mcx-filter-title{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:var(--mcx-heading);
  font-size:14.5px;
  font-weight:800;
  color:var(--mcx-ink);
}
.mcx-filter-title svg{width:16px;height:16px;color:var(--mcx-green)}
.mcx-filter-reset{
  font-size:12px;
  font-weight:600;
  color:var(--mcx-green-dark);
}
.mcx-filter-reset:hover{text-decoration:underline}
.mcx-filter-close{display:none}

.mcx-filter-form{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
}
.mcx-filter-group{
  border-bottom:1px solid var(--mcx-soft);
  padding-bottom:12px;
}
.mcx-filter-group:last-of-type{
  border-bottom:0;
  padding-bottom:4px;
}
.mcx-filter-group > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-family:var(--mcx-heading);
  font-size:13px;
  font-weight:700;
  color:var(--mcx-ink);
  cursor:pointer;
  list-style:none;
}
.mcx-filter-group > summary::-webkit-details-marker{display:none}
.mcx-filter-group > summary svg{
  width:15px;
  height:15px;
  color:var(--mcx-green);
  transition:transform .16s;
}
.mcx-filter-group[open] > summary svg{transform:rotate(180deg)}
.mcx-filter-body{
  margin-top:10px;
}
.mcx-filter-body input[type="search"],
.mcx-filter-body input[type="number"]{
  width:100%;
  height:38px;
  margin:0;
  padding:6px 10px;
  border:1.5px solid var(--mcx-line-strong);
  border-radius:9px;
  background:#fff;
  color:var(--mcx-ink);
  font-size:13px;
  box-shadow:none;
}
.mcx-filter-body input:focus{
  border-color:var(--mcx-green);
  box-shadow:0 0 0 3px rgba(5,150,105,.14);
  outline:none;
}
.mcx-price-inputs{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:6px;
}
.mcx-price-sep{
  color:var(--mcx-subtle);
  font-weight:700;
}
.mcx-price-presets{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:9px;
}
.mcx-price-preset{
  padding:5px 7px;
  border-radius:8px;
  border:1px solid var(--mcx-line);
  background:var(--mcx-canvas);
  color:var(--mcx-ink-2);
  font-family:var(--mcx-body);
  font-size:11.5px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s,background .15s,color .15s;
}
.mcx-price-preset:hover,
.mcx-price-preset.is-active{
  border-color:var(--mcx-green);
  background:var(--mcx-emerald-50);
  color:var(--mcx-green-dark);
}
.mcx-filter-cat-links{
  display:flex;
  flex-direction:column;
  gap:3px;
  max-height:220px;
  overflow-y:auto;
}
.mcx-filter-cat-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 8px;
  border-radius:8px;
  font-size:12.5px;
  font-weight:500;
  color:var(--mcx-ink-2);
  text-decoration:none;
  transition:background .15s,color .15s;
}
.mcx-filter-cat-link:hover,
.mcx-filter-cat-link.is-current{
  background:var(--mcx-emerald-50);
  color:var(--mcx-green-dark);
  font-weight:700;
}
.mcx-filter-checks{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:210px;
  overflow-y:auto;
}
.mcx-filter-check{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-size:13px;
  font-weight:500;
  color:var(--mcx-ink-2);
  cursor:pointer;
}
.mcx-filter-check input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--mcx-green);
}
.mcx-filter-check-name{flex:1;min-width:0}
.mcx-filter-check-cnt{
  font-size:11.5px;
  color:var(--mcx-subtle);
}
.mcx-filter-submit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:42px;
  padding:9px 14px;
  border:0;
  border-radius:10px;
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark));
  color:#fff!important;
  font-family:var(--mcx-heading);
  font-size:13px;
  font-weight:700;
  box-shadow:var(--mcx-shadow-emerald);
  cursor:pointer;
  transition:filter .16s;
}
.mcx-filter-submit:hover{filter:brightness(1.06)}

/* ===== 3. TOOLBAR (COUNT + QUICK SORT PILLS + VIEW SWITCHER) ===== */
.mcx-archive-main{min-width:0}
.mcx-archive-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px 14px;
  padding:12px 16px;
  margin:0 0 18px;
  border-radius:14px;
  border:1px solid var(--mcx-line);
  background:#fff;
  box-shadow:var(--mcx-shadow-sm);
}
.mcx-toolbar-left,
.mcx-toolbar-right{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.mcx-arch-count{
  font-family:var(--mcx-heading);
  font-size:14px;
  font-weight:800;
  color:var(--mcx-ink);
}
.mcx-mobile-filter-btn{
  display:none;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:9px;
  border:1px solid var(--mcx-emerald-200);
  background:var(--mcx-emerald-50);
  color:var(--mcx-green-dark);
  font-family:var(--mcx-heading);
  font-size:12.5px;
  font-weight:700;
}
.mcx-mobile-filter-btn svg{width:15px;height:15px}
.mcx-sort-pills{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}
.mcx-sort-label{
  font-size:12.5px;
  color:var(--mcx-subtle);
  font-weight:600;
}
.mcx-sort-pill{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 12px;
  border-radius:9px;
  border:1px solid var(--mcx-line);
  background:#fff;
  color:var(--mcx-ink-2);
  font-family:var(--mcx-heading);
  font-size:12px;
  font-weight:700;
  transition:border-color .15s,background .15s,color .15s;
}
.mcx-sort-pill:hover{
  border-color:var(--mcx-green);
  color:var(--mcx-green-dark);
}
.mcx-sort-pill.is-active{
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark));
  border-color:var(--mcx-green);
  color:#fff!important;
}

/* ===== 4. PRODUCT LOOP CARDS & PAGINATION (OVERRIDES LEGACY style.css & compat.css) ===== */
body.mctk-archive-emerald .products.row{
  margin-left:-8px;
  margin-right:-8px;
}
body.mctk-archive-emerald .products.row > .product-small{
  padding:0 8px 16px;
}
body.mctk-archive-emerald .product-small .badge-container .badge-inner{
  background:linear-gradient(135deg,#ef4444,#dc2626)!important;
  border-radius:999px!important;
  font-family:var(--mcx-heading);
  font-size:11px;
  font-weight:800;
  padding:4px 9px;
}
body.mctk-archive-emerald .product-small .ktk-grid-social-proof{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex-wrap:wrap!important;
  gap:4px 8px!important;
  margin:5px 0 7px!important;
  font-size:12px!important;
  color:var(--mcx-muted)!important;
}
body.mctk-archive-emerald .product-small .ktk-grid-rating-wrap{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
body.mctk-archive-emerald .product-small .ktk-grid-rating{
  margin-right:0!important;
  padding-left:0!important;
  font-weight:700!important;
  color:var(--mcx-ink)!important;
}
body.mctk-archive-emerald .product-small .ktk-grid-review-count{
  color:var(--mcx-subtle)!important;
  font-size:11.5px!important;
}
body.mctk-archive-emerald .product-small .ktk-grid-sold{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  margin-left:0!important;
  color:var(--mcx-muted)!important;
  font-size:11.5px!important;
  font-weight:600!important;
}
body.mctk-archive-emerald .product-small .ktk-sp-ico--sold{
  width:12px!important;
  height:12px!important;
  color:#ea580c!important;
}
body.mctk-archive-emerald .product-small .price::before{
  content:none!important;
  display:none!important;
}
body.mctk-archive-emerald .product-small .price-wrapper .price,
body.mctk-archive-emerald .product-small .price{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:baseline!important;
  gap:4px 8px!important;
  font-family:var(--mcx-heading)!important;
  font-size:16.5px!important;
  font-weight:800!important;
  line-height:1.25!important;
}
body.mctk-archive-emerald .product-small .price > .amount,
body.mctk-archive-emerald .product-small .price ins,
body.mctk-archive-emerald .product-small .price ins .amount{
  color:#dc2626!important;
  font-size:16.5px!important;
  font-weight:800!important;
}
body.mctk-archive-emerald .product-small .price del,
body.mctk-archive-emerald .product-small .price del .amount{
  display:inline-block!important;
  width:auto!important;
  flex-basis:auto!important;
  margin-top:0!important;
  color:#94a3b8!important;
  font-size:12.5px!important;
  font-weight:500!important;
}
body.mctk-archive-emerald .product-small .add-to-cart-button,
body.mctk-archive-emerald .product-small .grid-tools{
  display:none!important;
}
body.mctk-archive-emerald .mcx-loop-actions{
  display:flex!important;
  align-items:stretch!important;
  gap:7px!important;
  margin-top:10px!important;
  width:100%!important;
}
body.mctk-archive-emerald .product-small .mcx-loop-buy{
  flex:1 1 auto!important;
  width:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:38px!important;
  padding:8px 12px!important;
  border-radius:9px!important;
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark))!important;
  color:#fff!important;
  font-family:var(--mcx-heading)!important;
  font-size:12.5px!important;
  font-weight:700!important;
  text-decoration:none!important;
  transition:filter .15s,transform .15s;
}
body.mctk-archive-emerald .product-small .mcx-loop-buy:hover{
  filter:brightness(1.06);
  transform:translateY(-1px);
  color:#fff!important;
}
body.mctk-archive-emerald .product-small .mcx-loop-cart{
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  min-height:38px!important;
  padding:0!important;
  margin:0!important;
  border-radius:9px!important;
  border:1px solid var(--mcx-emerald-200)!important;
  background:var(--mcx-emerald-50)!important;
  color:var(--mcx-green-dark)!important;
  transition:background .15s,border-color .15s;
}
body.mctk-archive-emerald .product-small .mcx-loop-cart:hover{
  background:var(--mcx-emerald-100)!important;
  border-color:var(--mcx-green)!important;
  color:var(--mcx-green-dark)!important;
}
body.mctk-archive-emerald .product-small .mcx-loop-cart svg{width:17px;height:17px}
body.mctk-archive-emerald nav.woocommerce-pagination ul.page-numbers{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  margin:14px 0 6px;
}
body.mctk-archive-emerald nav.woocommerce-pagination ul.page-numbers li a,
body.mctk-archive-emerald nav.woocommerce-pagination ul.page-numbers li span{
  display:inline-grid;
  place-items:center;
  min-width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid var(--mcx-line);
  background:#fff;
  color:var(--mcx-ink);
  font-family:var(--mcx-heading);
  font-weight:700;
}
body.mctk-archive-emerald nav.woocommerce-pagination ul.page-numbers li span.current{
  background:linear-gradient(135deg,var(--mcx-green),var(--mcx-green-dark));
  border-color:var(--mcx-green);
  color:#fff;
}
.mcx-empty-filter-reset{
  margin:14px 0 24px;
  max-width:300px;
}

/* ===== 5. BOTTOM SEO SECTION (CATEGORY DESCRIPTION + CLASSIC CATEGORY FAQ) ===== */
.mcx-cat-seo-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:20px;
  margin:28px 0 12px;
  align-items:start;
}
.mcx-cat-seo-grid--split{
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
}
.mcx-cat-desc-card{
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:18px;
  padding:24px 26px;
  box-shadow:var(--mcx-shadow-sm);
  font-size:14px;
  line-height:1.8;
  color:var(--mcx-ink-2);
}
.mcx-cat-desc-card .term-description{
  margin:0;
}
.mcx-cat-desc-card h2{
  position:relative;
  padding-left:14px;
  margin:0 0 12px;
  font-family:var(--mcx-heading);
  font-size:20px;
  font-weight:800;
  color:var(--mcx-ink);
}
.mcx-cat-desc-card h2::before{
  content:"";
  position:absolute;
  left:0;
  top:3px;
  bottom:3px;
  width:4px;
  border-radius:4px;
  background:var(--mcx-green);
}
.mcx-cat-desc-card p{
  margin:0 0 12px;
}
.mcx-cat-desc-card p:last-child{margin-bottom:0}

/* Reuse clean FAQ accordion style inside Category SEO block */
.mcx-cat-faq-card .mcx-pfaq{
  background:#fff;
  border:1px solid var(--mcx-line);
  border-radius:18px;
  padding:24px 26px;
  box-shadow:var(--mcx-shadow-sm);
}
.mcx-cat-faq-card .mcx-pfaq-head{margin:0 0 14px}
.mcx-cat-faq-card .mcx-pfaq-title{
  position:relative;
  padding-left:14px;
  margin:0;
  font-family:var(--mcx-heading);
  font-size:20px;
  font-weight:800;
  color:var(--mcx-ink);
}
.mcx-cat-faq-card .mcx-pfaq-title::before{
  content:"";
  position:absolute;
  left:0;
  top:3px;
  bottom:3px;
  width:4px;
  border-radius:4px;
  background:var(--mcx-green);
}
.mcx-cat-faq-card .mcx-pfaq-list{display:flex;flex-direction:column;gap:9px}
.mcx-cat-faq-card .mcx-pfaq-item{
  border:1px solid var(--mcx-line);
  border-radius:12px;
  background:var(--mcx-canvas);
  overflow:hidden;
}
.mcx-cat-faq-card .mcx-pfaq-item[open]{
  background:#fff;
  border-color:var(--mcx-emerald-200);
}
.mcx-cat-faq-card .mcx-pfaq-q{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 15px;
  font-family:var(--mcx-heading);
  font-size:14px;
  font-weight:700;
  color:var(--mcx-ink);
  cursor:pointer;
  list-style:none;
}
.mcx-cat-faq-card .mcx-pfaq-q::-webkit-details-marker{display:none}
.mcx-cat-faq-card .mcx-faq-chev{display:inline-flex;color:var(--mcx-green);transition:transform .18s}
.mcx-cat-faq-card .mcx-pfaq-item[open] > .mcx-pfaq-q .mcx-faq-chev{transform:rotate(180deg)}
.mcx-cat-faq-card .mcx-pfaq-a{padding:0 15px 14px;font-size:13.5px;line-height:1.72;color:var(--mcx-muted)}
.mcx-cat-faq-card .mcx-pfaq-a p{margin:0 0 8px}
.mcx-cat-faq-card .mcx-pfaq-a p:last-child{margin-bottom:0}

/* ===== RESPONSIVE & MOBILE FILTER DRAWER ===== */
@media(max-width:1024px){
  .mcx-archive-layout{
    grid-template-columns:1fr;
  }
  .mcx-mobile-filter-btn{
    display:inline-flex;
  }
  .mcx-archive-sidebar{
    display:none;
    position:fixed;
    inset:0 auto 0 0;
    z-index:9999;
    width:min(320px,88vw);
    max-height:100vh;
    overflow-y:auto;
    border-radius:0 18px 18px 0;
    box-shadow:0 24px 48px rgba(15,23,42,.28);
  }
  .mcx-archive-sidebar.is-open{
    display:block;
  }
  .mcx-filter-close{
    display:inline-grid;
    place-items:center;
    width:32px;
    height:32px;
    border-radius:8px;
    border:1px solid var(--mcx-line);
    background:#fff;
    color:var(--mcx-ink);
    font-size:20px;
    line-height:1;
    cursor:pointer;
  }
  .mcx-cat-seo-grid--split{
    grid-template-columns:1fr;
  }
}
@media(max-width:767px){
  .mcx-archive-hero{
    padding:16px;
    border-radius:14px;
  }
  .mcx-archive-stats{
    width:100%;
    justify-content:space-between;
  }
  .mcx-archive-toolbar{
    padding:10px 12px;
  }
  .mcx-sort-label{display:none}
  .mcx-cat-desc-card,
  .mcx-cat-faq-card .mcx-pfaq{
    padding:18px 15px;
    border-radius:14px;
  }
}

/* =====================================================================
 * v4.0.0 — MOCKUP-ACCURATE GRID (5 cột Desktop) + CHIPS + MULTI-DEVICE RESPONSIVE
 * ===================================================================== */

/* Equal-height cards with CTA pinned to the bottom */
body.mctk-archive-emerald .mcx-archive-main .products.row::before,
body.mctk-archive-emerald .mcx-archive-main .products.row::after{display:none!important;content:none!important}
body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0!important;
}
body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view) > .product-small.col{
  width:auto!important;
  max-width:none!important;
  flex-basis:auto!important;
  padding:0!important;
  margin:0!important;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .col-inner{
  height:100%;
  display:flex;
  flex-direction:column;
  border:1px solid var(--mcx-line)!important;
  border-radius:14px!important;
  box-shadow:0 2px 10px rgba(15,23,42,.04)!important;
}
body.mctk-archive-emerald .mcx-archive-main .product-small.box{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto;
  height:100%;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image{border-radius:14px 14px 0 0!important}
body.mctk-archive-emerald .mcx-archive-main .product-small .box-text{
  flex:1 1 auto;
  display:flex!important;
  flex-direction:column!important;
  padding:11px 11px 12px!important;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .category{display:none!important}
body.mctk-archive-emerald .mcx-archive-main .product-small .title-wrapper .product-title a,
body.mctk-archive-emerald .mcx-archive-main .product-small .woocommerce-LoopProduct-link{
  font-family:var(--mcx-heading)!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.35!important;
  min-height:2.7em!important;
  color:var(--mcx-ink)!important;
}
body.mctk-archive-emerald .mcx-archive-main .mcx-loop-actions{margin-top:auto!important;padding-top:10px}

/* Chips: "12 tháng" + "1 đổi 1" */
.mcx-loop-chips{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 0}
.mcx-loop-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:3px 8px;
  border-radius:7px;
  background:var(--mcx-canvas);
  border:1px solid var(--mcx-line);
  font-size:11px;
  font-weight:600;
  line-height:1.3;
  color:var(--mcx-ink-2);
  white-space:nowrap;
}
.mcx-loop-chip svg{width:12px;height:12px;color:var(--mcx-green)}

/* Grid / List switcher (2 icons like mockup) */
.mcx-view-switch{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:10px;border:1px solid var(--mcx-line);background:#fff}
.mcx-view-switch .shop-view{display:inline-grid;place-items:center;width:32px;height:30px;border-radius:7px;color:var(--mcx-subtle)!important}
.mcx-view-switch .shop-view.current-variation{background:var(--mcx-emerald-50);color:var(--mcx-green-dark)!important;box-shadow:inset 0 0 0 1px var(--mcx-emerald-200)}

/* List view refinements */
body.mctk-archive-emerald .mcx-archive-main .products.products-list-view .mcx-loop-actions{max-width:320px}

/* Mobile filter drawer backdrop + scroll lock */
.mcx-filter-backdrop{position:fixed;inset:0;z-index:9998;background:rgba(15,23,42,.45);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.mcx-filter-backdrop[hidden]{display:none!important}
html.mcx-filter-lock,html.mcx-filter-lock body{overflow:hidden!important;touch-action:none}
html.mcx-filter-lock .mcx-archive-sidebar{touch-action:pan-y}

/* ===== Large laptop (≤1279px) ===== */
@media(max-width:1279px){
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
/* ===== Small laptop (1025–1139px, sidebar still visible) ===== */
@media(min-width:1025px) and (max-width:1139px){
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
/* ===== Tablet (≤1024px, filter becomes drawer) ===== */
@media(max-width:1024px){
  .mcx-archive-sidebar{max-height:100vh;max-height:100dvh;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))}
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:849px){
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
  .mcx-view-switch{display:none}
}
/* ===== Mobile (≤767px) ===== */
@media(max-width:767px){
  body.mctk-archive-emerald .category-page-row{padding-top:4px}
  .mcx-archive-hero{gap:12px;margin-bottom:12px}
  .mcx-archive-title{font-size:22px}
  .mcx-archive-intro{font-size:13px}
  .mcx-archive-stats{padding:8px;gap:4px;flex-wrap:nowrap}
  .mcx-archive-stat{flex:1 1 0;padding:2px 4px;gap:6px;min-width:0}
  .mcx-archive-stat-ico{width:28px;height:28px;flex:0 0 28px}
  .mcx-archive-stat-txt strong{font-size:13.5px}
  .mcx-archive-stat-txt span{font-size:10.5px}
  .mcx-archive-toolbar{flex-direction:column;align-items:stretch;gap:8px;padding:10px}
  .mcx-toolbar-left{justify-content:space-between}
  .mcx-toolbar-right{width:100%}
  .mcx-sort-pills{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px;width:100%}
  .mcx-sort-pills::-webkit-scrollbar{display:none}
  .mcx-sort-pill{flex:0 0 auto;white-space:nowrap;min-height:34px}
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.mctk-archive-emerald .mcx-archive-main .product-small .box-text{padding:9px!important}
  body.mctk-archive-emerald .mcx-archive-main .product-small .title-wrapper .product-title a{font-size:13px!important}
  body.mctk-archive-emerald .product-small .price > .amount,
  body.mctk-archive-emerald .product-small .price ins .amount{font-size:15px!important}
  .mcx-loop-chip{font-size:10.5px;padding:2px 6px}
  body.mctk-archive-emerald .product-small .mcx-loop-buy{min-height:36px!important;font-size:12px!important;padding:7px 8px!important}
  body.mctk-archive-emerald .product-small .mcx-loop-cart{flex-basis:36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;min-height:36px!important}
  .mcx-filter-body input[type="search"],.mcx-filter-body input[type="number"]{font-size:16px;height:42px}
  .mcx-filter-check{min-height:30px}
}
/* ===== Small phones (≤359px) ===== */
@media(max-width:359px){
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){gap:8px!important}
  .mcx-loop-chips .mcx-loop-chip:nth-child(n+2){display:none}
}

/* =====================================================================
 * v4.1.0 — FIX: product images missing in category grid + crisp uniform thumbs
 * Flatsome `.box-image{margin:0 auto}` inside a flex column disables stretch → width 0.
 * ===================================================================== */
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image{
  position:relative!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  aspect-ratio:16/10;
  overflow:hidden!important;
  background:#f1f5f9;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > div,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > div > a,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > a{
  position:absolute!important;
  inset:0;
  display:block!important;
  width:100%!important;
  height:100%!important;
  padding:0!important;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image img{
  position:absolute!important;
  inset:0;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  object-fit:cover;
  object-position:center;
  margin:0!important;
}
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image .back-image,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image .show-on-hover{display:none!important}
body.mctk-archive-emerald .mcx-archive-main .products-list-view .product-small .box-image{aspect-ratio:auto;width:220px!important;flex:0 0 220px;min-height:140px}
@media(max-width:767px){
  body.mctk-archive-emerald .mcx-archive-main .products-list-view .product-small .box-image{width:120px!important;flex-basis:120px;min-height:90px}
}

/* =====================================================================
 * v4.1.0 — FIX: filter checkboxes clipped on the left + crisp custom checkbox
 * ===================================================================== */
.mcx-filter-checks{padding:2px 4px 2px 3px;margin-left:-3px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.mcx-filter-check{align-items:flex-start;gap:9px;padding:3px 0;line-height:1.4;user-select:none;-webkit-user-select:none}
.mcx-filter-check input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  flex:0 0 17px;
  width:17px!important;
  height:17px!important;
  margin:1px 0 0!important;
  padding:0!important;
  border:1.5px solid #94a3b8;
  border-radius:5px;
  background:#fff;
  display:inline-grid;
  place-content:center;
  cursor:pointer;
  box-shadow:none!important;
  transition:background .15s,border-color .15s;
}
.mcx-filter-check input[type="checkbox"]::before{
  content:"";
  width:9px;
  height:9px;
  clip-path:polygon(14% 44%,0 65%,50% 100%,100% 16%,80% 0,43% 62%);
  background:#fff;
  transform:scale(0);
  transition:transform .12s ease-in-out;
}
.mcx-filter-check input[type="checkbox"]:checked{background:var(--mcx-green);border-color:var(--mcx-green)}
.mcx-filter-check input[type="checkbox"]:checked::before{transform:scale(1)}
.mcx-filter-check input[type="checkbox"]:focus-visible{outline:2px solid #f59e0b;outline-offset:2px}
.mcx-filter-check:hover input[type="checkbox"]:not(:checked){border-color:var(--mcx-green)}
.mcx-filter-check-name{font-size:13px;color:var(--mcx-ink-2);overflow-wrap:anywhere}
.mcx-filter-check-cnt{flex:0 0 auto;margin-left:auto;padding-left:6px;font-size:11.5px;color:var(--mcx-subtle)}
.mcx-price-preset{text-transform:none!important;letter-spacing:0!important;min-height:32px}

/* =====================================================================
 * v4.3.0 — ARCHIVE MOBILE OVERFLOW & CROSS-BROWSER FALLBACKS (320px → 1920px)
 * ===================================================================== */
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > div,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > div > a,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image > a,
body.mctk-archive-emerald .mcx-archive-main .product-small .box-image img{top:0;right:0;bottom:0;left:0}
@supports not (aspect-ratio: 16/10){
  body.mctk-archive-emerald .mcx-archive-main .product-small .box-image{height:0;padding-top:62.5%}
}
.mcx-filter-backdrop{top:0;right:0;bottom:0;left:0}
@media(max-width:549px){
  .mcx-archive-stats{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    padding:10px 8px;
  }
  .mcx-archive-stat{
    flex-direction:column;
    justify-content:center;
    text-align:center;
    gap:4px;
    padding:4px 2px;
    border-left:0!important;
  }
  .mcx-archive-stat + .mcx-archive-stat{border-left:1px solid var(--mcx-emerald-200)!important}
  .mcx-archive-stat-txt{align-items:center}
  .mcx-archive-stat-txt strong{font-size:13px;white-space:nowrap}
  .mcx-archive-stat-txt span{font-size:10px;white-space:nowrap}
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){gap:8px!important}
  body.mctk-archive-emerald .product-small .mcx-loop-buy{padding:6px 6px!important;font-size:11.5px!important}
}
@media(max-width:359px){
  body.mctk-archive-emerald .mcx-archive-main .products.row:not(.products-list-view){grid-template-columns:1fr!important}
}
