/* =========================================================
   /san-pham/ products.html spacing fidelity
   ========================================================= */

/* Kill Astra shells that wrap custom shop template */
html body.jade-design-active.woocommerce-shop #content,
html body.jade-design-active.woocommerce-shop #content.site-content,
html body.jade-design-active.woocommerce-shop .site-content,
html body.jade-design-active.woocommerce-shop .ast-container,
html body.jade-design-active.woocommerce-shop #primary,
html body.jade-design-active.woocommerce-shop .content-area,
html body.jade-design-active.woocommerce-shop .site-main,
html body.jade-design-active.woocommerce-shop .ast-woocommerce-container,
html body.jade-design-active.jade-products-design #content,
html body.jade-design-active.jade-products-design .ast-container,
html body.jade-design-active.jade-products-design #primary {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body.jade-design-active #jade-shop-main,
html body.jade-design-active .jade-shop-main {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #FAFAF7 !important;
}

/* Hide leftover default WooCommerce shop chrome if theme still prints it */
html body.jade-design-active.woocommerce-shop .woocommerce-products-header,
html body.jade-design-active.woocommerce-shop .woocommerce-result-count,
html body.jade-design-active.woocommerce-shop .woocommerce-ordering,
html body.jade-design-active.woocommerce-shop .woocommerce-notices-wrapper:empty,
html body.jade-design-active.woocommerce-shop .storefront-sorting,
html body.jade-design-active.jade-products-design .woocommerce-result-count,
html body.jade-design-active.jade-products-design .woocommerce-ordering {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Re-assert products page spacing from prototype */
html body.jade-design-active .jade-shop-main .page-hero {
  padding: 56px 0 64px !important;
  margin: 0 !important;
}
html body.jade-design-active .jade-shop-main .page-hero {
  padding: 56px 0 64px !important;
}
html body.jade-design-active .jade-shop-main .section {
  padding: 72px 0 !important;
  margin: 0 !important;
}
html body.jade-design-active .jade-shop-main .section.bg-gray,
html body.jade-design-active .jade-shop-main .section.bg-white {
  padding: 72px 0 !important;
}
html body.jade-design-active .jade-shop-main .cta-band {
  padding: 56px 0 !important;
  margin: 0 !important;
}
html body.jade-design-active .jade-shop-main .container {
  width: 100% !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
}

/* Filter bar */
html body.jade-design-active .jade-shop-main .filter-bar {
  padding: 16px 18px !important;
  margin: 0 0 28px !important;
  gap: 14px !important;
}
html body.jade-design-active .jade-shop-main .search-box input {
  padding: 11px 14px 11px 40px !important;
  margin: 0 !important;
}
html body.jade-design-active .jade-shop-main .filter-chips {
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .chip {
  padding: 6px 12px !important;
  margin: 0 !important;
}

/* Product grid / cards */
html body.jade-design-active .jade-shop-main .product-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .product-card {
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .product-img {
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .product-body {
  padding: 18px 18px 20px !important;
  margin: 0 !important;
  gap: 8px !important;
}
html body.jade-design-active .jade-shop-main .product-meta {
  margin-top: 6px !important;
  padding-top: 12px !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
html body.jade-design-active .jade-shop-main .product-body h3,
html body.jade-design-active .jade-shop-main .product-body p {
  margin: 0 !important;
}
html body.jade-design-active .jade-shop-main .tag {
  margin: 0 !important;
  padding: 4px 10px !important;
}

/* Category overview */
html body.jade-design-active .jade-shop-main .section-head {
  margin: 0 0 36px !important;
  padding: 0 !important;
  gap: 20px !important;
}
html body.jade-design-active .jade-shop-main .cat-overview {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .cat-row {
  padding: 18px !important;
  margin: 0 !important;
  gap: 24px !important;
}
html body.jade-design-active .jade-shop-main .cat-row-img {
  height: 100px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .cat-row h3 {
  margin: 0 0 4px !important;
  padding: 0 !important;
}
html body.jade-design-active .jade-shop-main .cat-row p {
  margin: 0 !important;
  padding: 0 !important;
}

/* Empty state */
html body.jade-design-active .jade-shop-main [data-filter-empty] {
  margin-top: 28px !important;
}

/* Responsive — match prototype */
@media (max-width: 1100px) {
  html body.jade-design-active .jade-shop-main .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 920px) {
  html body.jade-design-active .jade-shop-main .section {
    padding: 52px 0 !important;
  }
  html body.jade-design-active .jade-shop-main .page-hero,
  html body.jade-design-active .jade-shop-main .page-hero {
    padding: 44px 0 52px !important;
  }
  html body.jade-design-active .jade-shop-main .cat-row {
    grid-template-columns: 100px 1fr !important;
    gap: 16px !important;
  }
}
@media (max-width: 600px) {
  html body.jade-design-active .jade-shop-main .section {
    padding: 40px 0 !important;
  }
  html body.jade-design-active .jade-shop-main .page-hero,
  html body.jade-design-active .jade-shop-main .page-hero {
    padding: 36px 0 44px !important;
  }
  html body.jade-design-active .jade-shop-main .product-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  html body.jade-design-active .jade-shop-main .filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px !important;
  }
  html body.jade-design-active .jade-shop-main .cta-band {
    padding: 40px 0 !important;
  }
  html body.jade-design-active .jade-shop-main .cat-row {
    grid-template-columns: 1fr !important;
    padding: 16px !important;
  }
}

/* Real product thumbnails: hide prototype can placeholder ::before */
html body.jade-design-active .product-img.has-image::before,
html body.jade-design-active .jade-shop-main .product-img.has-image::before,
html body.jade-design-active .product-card .product-img.has-image::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  box-shadow: none !important;
  background: none !important;
}
html body.jade-design-active .product-img.has-image,
html body.jade-design-active .jade-shop-main .product-img.has-image {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
/* If inline background-image exists without class (fallback) */
html body.jade-design-active .product-img[style*="background-image"]::before {
  content: none !important;
  display: none !important;
}
/* =========================================================
   Shop search input — products.html fidelity
   ========================================================= */
html body.jade-design-active .jade-shop-main .filter-bar,
html body.jade-design-active.woocommerce-shop .filter-bar {
  background: #FFFFFF !important;
  border: 1px solid #E2E7EA !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 0 28px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

html body.jade-design-active .jade-shop-main .search-box,
html body.jade-design-active .jade-shop-main .jade-product-search {
  flex: 1 1 240px !important;
  min-width: 200px !important;
  max-width: 100% !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.jade-design-active .jade-shop-main .search-box > i,
html body.jade-design-active .jade-shop-main .jade-product-search > i {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #6B7280 !important;
  font-size: 0.9rem !important;
  line-height: 1 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Reset UA / theme / Woo search styles */
html body.jade-design-active .jade-shop-main .search-box input[type="search"],
html body.jade-design-active .jade-shop-main .search-box input.jade-product-search-input,
html body.jade-design-active .jade-shop-main .jade-product-search input,
html body.jade-design-active.woocommerce-shop .search-box input[type="search"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 11px 14px 11px 40px !important;
  border: 1.5px solid #E2E7EA !important;
  border-radius: 10px !important;
  background: #F3F5F6 !important;
  color: #1F1F1F !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, Helvetica, sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}

html body.jade-design-active .jade-shop-main .search-box input[type="search"]::placeholder,
html body.jade-design-active .jade-shop-main .jade-product-search input::placeholder {
  color: #6B7280 !important;
  opacity: 1 !important;
}

html body.jade-design-active .jade-shop-main .search-box input[type="search"]:hover,
html body.jade-design-active .jade-shop-main .jade-product-search input:hover {
  border-color: #d5dbe0 !important;
  background: #F7F8F9 !important;
}

html body.jade-design-active .jade-shop-main .search-box input[type="search"]:focus,
html body.jade-design-active .jade-shop-main .jade-product-search input:focus {
  border-color: #F5822A !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(245, 130, 42, 0.12) !important;
  outline: none !important;
}

/* Remove native clear button weirdness on WebKit search inputs */
html body.jade-design-active .jade-shop-main .search-box input[type="search"]::-webkit-search-decoration,
html body.jade-design-active .jade-shop-main .search-box input[type="search"]::-webkit-search-cancel-button,
html body.jade-design-active .jade-shop-main .search-box input[type="search"]::-webkit-search-results-button,
html body.jade-design-active .jade-shop-main .search-box input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

/* Chips remain tidy next to search */
html body.jade-design-active .jade-shop-main .filter-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
}
html body.jade-design-active .jade-shop-main .filter-chips .chip {
  padding: 6px 12px !important;
  border-radius: 999px !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  background: #F3F5F6 !important;
  color: #6B7280 !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
}
html body.jade-design-active .jade-shop-main .filter-chips .chip:hover,
html body.jade-design-active .jade-shop-main .filter-chips .chip.active {
  background: #FFF4EB !important;
  color: #E56F18 !important;
  border-color: rgba(245, 130, 42, 0.25) !important;
}

@media (max-width: 600px) {
  html body.jade-design-active .jade-shop-main .filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px !important;
    gap: 12px !important;
  }
  html body.jade-design-active .jade-shop-main .search-box,
  html body.jade-design-active .jade-shop-main .jade-product-search {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }
}
/* unified page-hero */
html body.jade-design-active .jade-shop-main .page-hero{padding:56px 0 64px!important;}
html body.jade-design-active .jade-shop-main .page-hero.page-hero-sm{padding:56px 0 64px!important;}

/* unified page-hero for shop */
html body.jade-design-active .jade-shop-main .page-hero,
html body.jade-design-active .jade-shop-main .page-hero.page-hero-sm{padding:56px 0 64px!important;}
@media(max-width:920px){html body.jade-design-active .jade-shop-main .page-hero,html body.jade-design-active .jade-shop-main .page-hero.page-hero-sm{padding:44px 0 52px!important;}}
@media(max-width:600px){html body.jade-design-active .jade-shop-main .page-hero,html body.jade-design-active .jade-shop-main .page-hero.page-hero-sm{padding:36px 0 44px!important;}}
