/* NDTechs Commerce UI Foundation v1 — draft only */
:root{
  --nd-commerce-border:#e6e9ef;
  --nd-commerce-muted:#6b7280;
  --nd-commerce-ink:#171a21;
  --nd-commerce-soft:#f6f7f9;
  --nd-commerce-shadow:0 10px 30px rgba(17,24,39,.07);
}

/* Search-first header */
.wd-header-search-form .searchform{
  min-height:46px;
  border:1px solid var(--nd-commerce-border);
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 10px rgba(17,24,39,.03);
}
.wd-header-search-form .searchform input.s{
  min-height:44px;
  font-size:14px;
}
.wd-header-search-form .searchform:focus-within{
  border-color:var(--wd-primary-color);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--wd-primary-color) 12%,transparent);
}

/* Product-card foundation */
.wd-products .wd-product{
  align-self:stretch;
}
.wd-products .wd-product-wrapper{
  height:100%;
  padding:0;
  overflow:hidden;
  border:1px solid var(--nd-commerce-border);
  border-radius:14px;
  background:#fff;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
@media (hover:hover){
  .wd-products .wd-product:hover .wd-product-wrapper{
    border-color:color-mix(in srgb,var(--wd-primary-color) 35%,var(--nd-commerce-border));
    box-shadow:var(--nd-commerce-shadow);
    transform:translateY(-2px);
  }
}
.wd-products .wd-product-thumb{
  overflow:hidden;
  border-radius:14px 14px 0 0;
  background:#fff;
}
.wd-products .wd-product-img-link{
  display:block;
  aspect-ratio:1/1;
}
.wd-products .wd-product-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.wd-products .wd-product-cats{
  margin-top:10px;
  color:#8a9099;
  font-size:12px;
  line-height:1.35;
}
.wd-products .wd-loop-prod-title,
.wd-products .wd-entities-title{
  color:var(--nd-commerce-ink);
}
.wd-products .wd-loop-prod-title{
  --wd-line-count:2 !important;
  min-height:42px;
  margin-top:5px;
  font-size:15px;
  line-height:1.4;
  font-weight:650;
}

/* Data-driven highlights; generated from WooCommerce attributes */
.nd-card-specs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:9px 0 8px;
}
.nd-card-spec{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  min-height:27px;
  padding:4px 8px;
  border:1px solid #e8ebf0;
  border-radius:7px;
  background:var(--nd-commerce-soft);
  color:#4d5562;
  font-size:11px;
  line-height:1.25;
}
.nd-card-spec b{
  margin-right:4px;
  color:#2b313b;
  font-weight:650;
}
.wd-products .wd-loop-prod-price{
  margin-top:0;
}
.wd-products .price{
  color:var(--wd-primary-color);
  font-weight:750;
}
.wd-products .price del{
  margin-right:5px;
  color:#9aa0aa;
  font-size:12px;
  font-weight:500;
}
.wd-products .woocommerce-price-suffix{
  color:#7b818b;
  font-size:11px;
  font-weight:500;
}
.wd-products .product-label.onsale{
  min-width:44px;
  border-radius:999px;
  font-weight:750;
}
.wd-products .add_to_cart_button,
.wd-products .ndtechs-quote-button{
  border-radius:9px;
}

/* Footer: fix oversized logo and tighten commerce trust area */
.wd-footer .wp-block-wd-image:not(.wd-custom-width) img{
  width:auto !important;
  max-width:180px !important;
  height:auto !important;
}
.wd-footer .main-footer{
  padding-top:38px;
}
.wd-footer .wp-block-wd-title{
  font-weight:750;
}
.wd-footer .wd-custom-width img{
  max-width:100%;
  height:auto;
}

/* Mobile density without tiny tap targets */
@media (max-width:768.98px){
  .wd-header-search-form .searchform{
    min-height:42px;
    border-radius:10px;
  }
  .wd-products .wd-product-wrapper{
    padding:0;
    border-radius:11px;
  }
  .wd-products .wd-loop-prod-title{
    min-height:38px;
    font-size:13px;
  }
  .nd-card-specs{
    gap:4px;
    margin:7px 0;
  }
  .nd-card-spec{
    min-height:24px;
    padding:3px 6px;
    font-size:10px;
  }
  .wd-footer .wp-block-wd-image:not(.wd-custom-width) img{
    max-width:135px !important;
  }
  .wd-footer .main-footer{
    padding-top:28px;
  }
}


/* Phase B — Homepage Commerce Dashboard */
.home .wd-01f7260a,
.home .wd-1e29c985,
.home .wd-64571d79{
  display:none !important;
}

.nd-home-commerce{
  margin:22px 0 54px;
  padding:26px;
  border:1px solid var(--nd-commerce-border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 36px rgba(17,24,39,.045);
}

.nd-home-commerce-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}

.nd-home-commerce-head h2{
  margin:3px 0 0;
  color:var(--nd-commerce-ink);
  font-size:28px;
  line-height:1.2;
  font-weight:760;
}

.nd-home-eyebrow{
  display:block;
  color:var(--wd-primary-color);
  font-size:12px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.nd-home-view-all{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 16px;
  border:1px solid var(--nd-commerce-border);
  border-radius:999px;
  color:var(--nd-commerce-ink);
  background:#fff;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
  transition:border-color .2s ease,color .2s ease,background .2s ease;
}

.nd-home-view-all:hover{
  border-color:var(--wd-primary-color);
  color:var(--wd-primary-color);
  background:color-mix(in srgb,var(--wd-primary-color) 5%,#fff);
}

.nd-home-chip-row{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 0 10px;
  scrollbar-width:thin;
}

.nd-home-chip{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:6px 12px;
  border:1px solid #e6e8ec;
  border-radius:999px;
  background:#f7f8fa;
  color:#353b45;
  font-size:12px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
}

.nd-home-chip:hover{
  border-color:var(--wd-primary-color);
  color:var(--wd-primary-color);
  background:#fff;
}

.nd-home-brand-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:1px 0 19px;
  padding:11px 0 0;
  border-top:1px solid #eef0f3;
}

.nd-home-chip-label{
  flex:0 0 auto;
  padding-top:8px;
  color:#737b87;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.nd-home-brand-row .nd-home-chip-row{
  flex:1 1 auto;
  padding-bottom:3px;
}

.nd-home-brand-row .nd-home-chip{
  background:#fff;
}

.nd-home-product-grid{
  margin-top:2px;
}

.nd-home-product-grid .products{
  margin-bottom:0 !important;
}

.nd-home-commerce .wd-products .wd-product-wrapper,
.nd-home-commerce .products .product{
  background:#fff;
}

.nd-home-commerce .wd-product-thumb:has(img.woocommerce-placeholder){
  position:relative;
  min-height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f4f6f8;
}

.nd-home-commerce .wd-product-thumb:has(img.woocommerce-placeholder)::after{
  content:"Hình ảnh đang cập nhật";
  position:absolute;
  left:12px;
  right:12px;
  bottom:14px;
  color:#89919d;
  font-size:10px;
  font-weight:650;
  text-align:center;
}

.nd-home-commerce img.woocommerce-placeholder{
  opacity:.22;
  transform:scale(.72);
}

.nd-home-network{
  margin-top:36px;
  margin-bottom:34px;
  background:linear-gradient(180deg,#fbfcff 0%,#fff 100%);
}

.nd-home-network .nd-home-commerce-head{
  padding-bottom:14px;
  border-bottom:1px solid #eaedf2;
}

/* Reduce dead vertical space around legacy homepage blocks while retaining content */
.home .wd-e1bfe4f3{
  margin-top:34px !important;
}

.home .wd-eb9fae98{
  margin-bottom:34px !important;
}

@media (max-width:1024px){
  .nd-home-commerce{
    padding:20px;
    margin-bottom:42px;
  }
  .nd-home-commerce-head h2{
    font-size:24px;
  }
}

@media (max-width:768.98px){
  .nd-home-commerce{
    margin:14px 0 32px;
    padding:15px 12px;
    border-radius:14px;
  }
  .nd-home-commerce-head{
    align-items:center;
    gap:12px;
    margin-bottom:13px;
  }
  .nd-home-commerce-head h2{
    font-size:20px;
  }
  .nd-home-eyebrow{
    font-size:10px;
  }
  .nd-home-view-all{
    min-height:44px;
    padding:9px 13px;
    font-size:11px;
  }
  .nd-home-chip-row{
    gap:6px;
    margin-right:-12px;
    padding-right:12px;
  }
  .nd-home-chip{
    min-height:44px;
    padding:8px 12px;
    font-size:11px;
  }
  .nd-home-brand-row{
    display:block;
    margin-bottom:14px;
  }
  .nd-home-chip-label{
    display:block;
    padding-top:0;
    margin-bottom:5px;
  }
  .nd-home-product-grid{
    margin-right:-12px;
  }
  .nd-home-product-grid .products,
  .nd-home-product-grid .wd-products{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:10px !important;
    overflow-x:auto;
    overflow-y:hidden;
    padding-right:12px;
    padding-bottom:8px;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
  }
  .nd-home-product-grid .product,
  .nd-home-product-grid .wd-product{
    flex:0 0 72% !important;
    width:72% !important;
    max-width:72% !important;
    scroll-snap-align:start;
  }
  .nd-home-commerce .wd-product-thumb:has(img.woocommerce-placeholder){
    min-height:180px;
  }
  .nd-home-network{
    margin-top:22px;
  }
}

/* Phase C — Catalog UX / category-aware filters */
.nd-catalog-filter-panel{
  margin:0 0 22px;
  padding:18px;
  border:1px solid var(--nd-commerce-border);
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 26px rgba(17,24,39,.045);
}

.nd-catalog-filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-bottom:13px;
  border-bottom:1px solid #edf0f3;
}

.nd-catalog-filter-head > div{
  display:flex;
  align-items:baseline;
  gap:9px;
}

.nd-catalog-eyebrow{
  color:var(--wd-primary-color);
  font-size:11px;
  font-weight:750;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.nd-catalog-filter-head strong{
  color:var(--nd-commerce-ink);
  font-size:15px;
}

.nd-catalog-clear{
  color:#6e7580;
  font-size:12px;
  font-weight:650;
  text-decoration:underline;
  text-underline-offset:3px;
}

.nd-catalog-filter-group{
  display:grid;
  grid-template-columns:118px minmax(0,1fr);
  gap:14px;
  align-items:start;
  padding-top:13px;
}

.nd-catalog-filter-label{
  padding-top:7px;
  color:#626a76;
  font-size:12px;
  font-weight:750;
}

.nd-catalog-filter-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.nd-catalog-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:5px 10px;
  border:1px solid #e5e8ed;
  border-radius:999px;
  background:#f7f8fa;
  color:#363d47;
  font-size:12px;
  font-weight:650;
  line-height:1.15;
  transition:border-color .18s ease,color .18s ease,background .18s ease;
}

.nd-catalog-chip small{
  color:#626a76;
  font-size:10px;
  font-weight:650;
}

.nd-catalog-chip:hover{
  border-color:var(--wd-primary-color);
  color:var(--wd-primary-color);
  background:#fff;
}

.nd-catalog-chip.is-active{
  border-color:var(--wd-primary-color);
  background:color-mix(in srgb,var(--wd-primary-color) 18%,#fff);
  color:#1f2937;
}

.nd-catalog-chip.is-active small{
  color:#4b5563;
}

.tax-product_cat .wd-644fe2e9{
  border:1px solid var(--nd-commerce-border);
  background:#fff !important;
  box-shadow:0 8px 26px rgba(17,24,39,.035);
}

.tax-product_cat .widget-title{
  margin-bottom:12px;
  color:var(--nd-commerce-ink);
  font-size:15px;
  font-weight:750;
}

.tax-product_cat .widget_product_categories .product-categories{
  max-height:460px;
  overflow:auto;
  padding-right:4px;
}

.tax-product_cat .widget_product_categories .cat-item{
  padding:4px 0;
}

.tax-product_cat .widget_product_categories .count{
  color:#9aa0aa;
  font-size:11px;
}

.tax-product_cat .wd-shop-product .wd-loop-prod-title{
  --wd-line-count:2 !important;
  min-height:42px;
  line-height:1.38;
}

.tax-product_cat .wd-shop-product img.woocommerce-placeholder{
  opacity:.23;
}

.tax-product_cat .wd-shop-product .wd-product-thumb:has(img.woocommerce-placeholder){
  position:relative;
  min-height:190px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f7f9;
}

.tax-product_cat .wd-shop-product .wd-product-thumb:has(img.woocommerce-placeholder)::after{
  content:"Hình ảnh đang cập nhật";
  position:absolute;
  left:12px;
  right:12px;
  bottom:14px;
  color:#626a76;
  font-size:10px;
  font-weight:650;
  text-align:center;
}

.tax-product_cat .wd-shop-product img.woocommerce-placeholder{
  opacity:.22;
  transform:scale(.72);
}

@media (max-width:1024px){
  .nd-catalog-filter-panel{
    margin-top:4px;
  }
}

@media (max-width:768.98px){
  .nd-catalog-filter-panel{
    margin:0 0 16px;
    padding:13px 12px;
    border-radius:13px;
  }
  .nd-catalog-filter-head{
    padding-bottom:10px;
  }
  .nd-catalog-filter-head > div{
    display:block;
  }
  .nd-catalog-eyebrow{
    display:block;
    margin-bottom:2px;
    font-size:10px;
  }
  .nd-catalog-filter-head strong{
    font-size:14px;
  }
  .nd-catalog-filter-group{
    display:block;
    padding-top:11px;
  }
  .nd-catalog-filter-label{
    display:block;
    padding:0;
    margin-bottom:7px;
    font-size:11px;
  }
  .nd-catalog-filter-chips{
    flex-wrap:nowrap;
    overflow-x:auto;
    margin-right:-12px;
    padding-right:12px;
    padding-bottom:4px;
    scrollbar-width:thin;
  }
  .nd-catalog-chip{
    flex:0 0 auto;
    min-height:44px;
    padding:8px 12px;
    font-size:11px;
  }
}

/* Phase D — Product Detail + Trust UX */
.single-product .product_title{
  margin-bottom:10px;
  color:var(--nd-commerce-ink);
  font-size:30px;
  line-height:1.22;
  font-weight:760;
}

.single-product .wd-single-meta{
  margin-bottom:12px;
  color:#7a818b;
  font-size:12px;
}

.nd-product-commerce-panel{
  margin:4px 0 18px;
  padding:16px;
  border:1px solid var(--nd-commerce-border);
  border-radius:15px;
  background:#fff;
  box-shadow:0 8px 26px rgba(17,24,39,.04);
}

.nd-product-panel-label{
  display:block;
  margin-bottom:9px;
  color:var(--wd-primary-color);
  font-size:11px;
  font-weight:750;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.nd-product-spec-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}

.nd-product-spec-item,
.nd-product-trust-item{
  min-width:0;
  padding:10px 11px;
  border:1px solid #e8ebef;
  border-radius:10px;
  background:#f8f9fb;
}

.nd-product-spec-item small,
.nd-product-trust-item small{
  display:block;
  margin-bottom:3px;
  color:#626a76;
  font-size:10px;
  font-weight:650;
}

.nd-product-spec-item strong,
.nd-product-trust-item strong{
  display:block;
  overflow-wrap:anywhere;
  color:#2a3039;
  font-size:12px;
  line-height:1.35;
  font-weight:700;
}

.nd-product-trust-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding-top:12px;
  border-top:1px solid #edf0f3;
}

.single-product .wd-single-price .price{
  color:var(--wd-primary-color);
  font-size:28px;
  line-height:1.2;
  font-weight:800;
}

.single-product .wd-single-price .price del{
  margin-right:7px;
  color:#9ba1aa;
  font-size:15px;
  font-weight:500;
}

.single-product .wd-single-price .woocommerce-price-suffix{
  color:#777f89;
  font-size:12px;
  font-weight:550;
}

.single-product .wd-single-add-cart{
  margin-top:12px;
}

.single-product .wd-single-add-cart .single_add_to_cart_button,
.single-product .wd-single-add-cart .wd-buy-now-btn,
.single-product .ndtechs-quote-button{
  min-height:46px;
  border-radius:10px;
  font-weight:750;
}

.single-product .woocommerce-product-attributes{
  overflow:hidden;
  border:1px solid var(--nd-commerce-border);
  border-radius:12px;
}

.single-product .woocommerce-product-attributes th,
.single-product .woocommerce-product-attributes td{
  padding:10px 12px;
}

.single-product .woocommerce-product-attributes tr:nth-child(even){
  background:#f8f9fb;
}

.single-product .wd-single-content{
  color:#3f4650;
  font-size:15px;
  line-height:1.72;
}

.single-product .wd-single-content h2,
.single-product .wd-single-content h3{
  color:var(--nd-commerce-ink);
  line-height:1.3;
}

@media (max-width:768.98px){
  .single-product .product_title{
    font-size:23px;
  }
  .nd-product-commerce-panel{
    padding:12px;
    border-radius:12px;
  }
  .nd-product-spec-grid,
  .nd-product-trust-grid{
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .nd-product-spec-item,
  .nd-product-trust-item{
    padding:9px;
  }
  .single-product .wd-single-price .price{
    font-size:24px;
  }
}
