/*
Theme Name: CNC Parts
Theme URI: https://example.com/
Description: Profesionalna Astra child tema za CNC delove i WooCommerce B2B katalog.
Author: CNC Parts
Template: astra
Version: 3.1.4
Text Domain: cnc-parts
*/

:root {
  --cnc-primary: #0b4f7d;
  --cnc-primary-dark: #073653;
  --cnc-accent: #ef7d00;
  --cnc-accent-dark: #c96500;
  --cnc-text: #27313a;
  --cnc-muted: #67727c;
  --cnc-border: #dfe5ea;
  --cnc-surface: #ffffff;
  --cnc-bg: #f5f7f9;
  --cnc-radius: 10px;
  --cnc-shadow: 0 6px 24px rgba(18, 38, 53, 0.08);
  --cnc-shadow-hover: 0 12px 34px rgba(18, 38, 53, 0.14);
}

body {
  color: var(--cnc-text);
  background: var(--cnc-bg);
}

a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }

.ast-container { max-width: 1280px; }

.site-header { box-shadow: 0 1px 0 rgba(20, 40, 55, .08); }
.main-header-menu > .menu-item > .menu-link { font-weight: 600; }

.ast-header-button-1 .ast-custom-button,
.cnc-button,
.woocommerce a.button.cnc-inquiry-button {
  border-radius: 6px;
  background: var(--cnc-accent);
  color: #fff;
  border: 1px solid var(--cnc-accent);
  font-weight: 700;
  padding: .8rem 1.1rem;
}

.ast-header-button-1 .ast-custom-button:hover,
.cnc-button:hover,
.woocommerce a.button.cnc-inquiry-button:hover {
  background: var(--cnc-accent-dark);
  border-color: var(--cnc-accent-dark);
  color: #fff;
}

/* Shop naslov i alatna traka */
.woocommerce-products-header,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  margin-bottom: 1.5rem;
}

.woocommerce .woocommerce-ordering select {
  min-height: 44px;
  border: 1px solid var(--cnc-border);
  border-radius: 6px;
  background: #fff;
  padding: 0 .75rem;
}

/* WooCommerce product grid */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none; }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--cnc-border);
  border-radius: var(--cnc-radius);
  background: var(--cnc-surface);
  box-shadow: var(--cnc-shadow);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--cnc-shadow-hover);
  border-color: #cbd5dc;
}

.woocommerce ul.products li.product a img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 7px;
  margin: 0 0 16px;
  transition: transform .25s ease;
}

.woocommerce ul.products li.product:hover a img { transform: scale(1.025); }

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--cnc-text);
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
  min-height: 2.85em;
  margin: 0 0 .65rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cnc-card-category {
  display: block;
  color: var(--cnc-muted);
  font-size: .82rem;
  line-height: 1.3;
  margin-bottom: .8rem;
}

.cnc-card-short-description {
  color: var(--cnc-muted);
  font-size: .92rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.woocommerce ul.products li.product .cnc-inquiry-button {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* Category cards */
.woocommerce ul.products li.product-category .woocommerce-loop-category__title {
  font-size: 1.08rem;
  color: var(--cnc-text);
  font-weight: 700;
}

.woocommerce ul.products li.product-category .count {
  color: var(--cnc-muted);
  background: transparent;
}

/* Single product */
.single-product div.product {
  padding: 24px;
  border: 1px solid var(--cnc-border);
  border-radius: var(--cnc-radius);
  background: #fff;
  box-shadow: var(--cnc-shadow);
}

.single-product .product_title {
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.15;
}

.single-product .woocommerce-product-gallery__wrapper img {
  border-radius: var(--cnc-radius);
}

.single-product .woocommerce-product-details__short-description {
  color: var(--cnc-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.cnc-product-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.cnc-product-meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cnc-border);
  color: var(--cnc-muted);
  font-size: .92rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  border-bottom: 1px solid var(--cnc-border);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  border: 0;
  background: transparent;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--cnc-primary);
  border-bottom: 3px solid var(--cnc-primary);
}

.woocommerce table.shop_attributes {
  border: 1px solid var(--cnc-border);
  border-radius: 8px;
  overflow: hidden;
}

.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
  padding: 12px 15px;
  border-color: var(--cnc-border);
}

/* Breadcrumbs */
.ast-breadcrumbs-wrapper { font-size: .9rem; color: var(--cnc-muted); }

/* Footer */
.site-footer { margin-top: 60px; }
.site-footer a:hover { color: var(--cnc-accent); }

@media (max-width: 1100px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .single-product div.product { padding: 18px; }
}

@media (max-width: 520px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .woocommerce ul.products li.product .woocommerce-loop-product__title { min-height: auto; }
  .cnc-product-actions { flex-direction: column; }
  .cnc-product-actions .cnc-button { width: 100%; text-align: center; }
}

/* ==========================================================
   CNC Parts 1.1.0 — Shop category archive improvements
   ========================================================== */

/* Compact shop heading area */
.woocommerce-shop .ast-woocommerce-container,
.tax-product_cat .ast-woocommerce-container {
  padding-top: 24px !important;
}

.woocommerce-shop .woocommerce-products-header,
.tax-product_cat .woocommerce-products-header {
  margin: 0 0 24px !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.woocommerce-shop .woocommerce-products-header__title,
.tax-product_cat .woocommerce-products-header__title {
  margin: 0 0 10px !important;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--cnc-text);
}

.cnc-shop-intro {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--cnc-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.woocommerce-shop .woocommerce-products-header + .woocommerce-notices-wrapper,
.tax-product_cat .woocommerce-products-header + .woocommerce-notices-wrapper {
  margin-top: 0 !important;
}

.woocommerce-shop ul.products,
.tax-product_cat ul.products {
  margin-top: 0 !important;
  align-items: stretch;
}

/* Category cards: image above, content below */
.woocommerce ul.products li.product-category,
.woocommerce-page ul.products li.product-category {
  padding: 0 !important;
  min-height: 0 !important;
  background: #fff;
  overflow: hidden;
}

.woocommerce ul.products li.product-category > a,
.woocommerce-page ul.products li.product-category > a {
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.woocommerce ul.products li.product-category a img,
.woocommerce-page ul.products li.product-category a img {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  height: 210px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 18px 18px 8px !important;
  background: #fff !important;
  border-radius: 0 !important;
  transform: none !important;
}

.woocommerce ul.products li.product-category .woocommerce-loop-category__title,
.woocommerce-page ul.products li.product-category .woocommerce-loop-category__title {
  position: static !important;
  inset: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  width: 100% !important;
  min-height: 118px;
  margin: 0 !important;
  padding: 12px 18px 18px !important;
  background: #fff !important;
  color: var(--cnc-text) !important;
  font-size: 1.04rem !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  text-align: center !important;
  text-transform: uppercase;
  box-shadow: none !important;
  transform: none !important;
}

.woocommerce ul.products li.product-category .count,
.woocommerce-page ul.products li.product-category .count {
  display: block !important;
  margin: 7px 0 0 !important;
  padding: 0 !important;
  color: var(--cnc-muted) !important;
  background: transparent !important;
  font-size: .86rem !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  text-transform: none;
  opacity: 1 !important;
}

.woocommerce ul.products li.product-category .count::after {
  content: "\A Pogledaj proizvode →";
  white-space: pre;
  display: block;
  margin-top: 9px;
  color: var(--cnc-primary);
  font-size: .88rem;
  font-weight: 700;
}

.woocommerce ul.products li.product-category:hover a img {
  transform: scale(1.025) !important;
}

/* Sidebar */
.woocommerce .widget-area,
.woocommerce-page .widget-area {
  font-size: .95rem;
}

.woocommerce .widget-area .widget,
.woocommerce-page .widget-area .widget {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--cnc-border);
  border-radius: var(--cnc-radius);
  background: #fff;
  box-shadow: 0 4px 18px rgba(18, 38, 53, .05);
}

.woocommerce .widget-area .widget-title,
.woocommerce-page .widget-area .widget-title {
  margin: 0 0 16px;
  color: var(--cnc-text);
  font-size: .95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.woocommerce .widget_product_categories ul,
.woocommerce-page .widget_product_categories ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce .widget_product_categories li,
.woocommerce-page .widget_product_categories li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #edf1f4;
}

.woocommerce .widget_product_categories li:last-child,
.woocommerce-page .widget_product_categories li:last-child {
  border-bottom: 0;
}

.woocommerce .widget_product_categories li a,
.woocommerce-page .widget_product_categories li a {
  display: inline-block;
  padding: 9px 0;
  color: var(--cnc-text);
  line-height: 1.4;
}

.woocommerce .widget_product_categories li a:hover,
.woocommerce-page .widget_product_categories li a:hover,
.woocommerce .widget_product_categories li.current-cat > a,
.woocommerce-page .widget_product_categories li.current-cat > a {
  color: var(--cnc-primary);
}

.woocommerce .widget_product_categories ul.children,
.woocommerce-page .widget_product_categories ul.children {
  margin: 0 0 4px 14px;
  padding-left: 12px;
  border-left: 2px solid #e9eef2;
}

.woocommerce .widget_product_categories .count,
.woocommerce-page .widget_product_categories .count {
  float: right;
  padding: 9px 0;
  color: var(--cnc-muted);
  font-size: .82rem;
}

.woocommerce .widget_product_search form,
.woocommerce-page .widget_product_search form,
.woocommerce .widget_search form,
.woocommerce-page .widget_search form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.woocommerce .widget_product_search input[type="search"],
.woocommerce-page .widget_product_search input[type="search"],
.woocommerce .widget_search input[type="search"],
.woocommerce-page .widget_search input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--cnc-border);
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
}

.woocommerce .widget_product_search button,
.woocommerce-page .widget_product_search button,
.woocommerce .widget_search button,
.woocommerce-page .widget_search button {
  min-height: 44px;
  border-radius: 6px;
  background: var(--cnc-primary);
  border-color: var(--cnc-primary);
  color: #fff;
  font-weight: 700;
}

/* Responsive category images */
@media (max-width: 1100px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .woocommerce ul.products li.product-category a img { height: 190px !important; }
}

@media (max-width: 768px) {
  .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .woocommerce ul.products li.product-category a img { height: 175px !important; }
  .woocommerce ul.products li.product-category .woocommerce-loop-category__title { min-height: 110px; padding: 10px 12px 16px !important; }
}

@media (max-width: 480px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .woocommerce ul.products li.product-category a img { height: 230px !important; }
}

/* ==========================================================
   CNC Parts 1.1.1 — Search widget and page background fixes
   ========================================================== */

/* One consistent light-grey canvas across the public site. */
html,
body,
#page,
.site,
.site-content,
.ast-separate-container,
.ast-separate-container #primary,
.ast-separate-container #secondary {
  background-color: #f6f8fb !important;
}

/* Astra can add a tinted panel behind the WooCommerce content.
   Keep the layout transparent so only cards/widgets are white. */
.ast-separate-container .ast-woocommerce-container,
.woocommerce-shop .ast-woocommerce-container,
.tax-product_cat .ast-woocommerce-container,
.post-type-archive-product .ast-woocommerce-container,
.ast-separate-container .site-main,
.ast-separate-container .site-content > .ast-container {
  background: transparent !important;
  box-shadow: none !important;
}

/* White content surfaces, matching the design preview. */
.woocommerce .widget-area .widget,
.woocommerce-page .widget-area .widget,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.single-product div.product {
  background-color: #fff !important;
}

/* Product search widget: label/input on first row, button below.
   Astra/WooCommerce markup often wraps the field in a label, so
   a two-column grid can squeeze the field and create vertical text. */
.woocommerce .widget_product_search form,
.woocommerce-page .widget_product_search form,
.woocommerce .widget_search form,
.woocommerce-page .widget_search form,
.widget_product_search .woocommerce-product-search,
.widget_search .search-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
}

.woocommerce .widget_product_search form label,
.woocommerce-page .widget_product_search form label,
.woocommerce .widget_search form label,
.woocommerce-page .widget_search form label,
.widget_product_search .woocommerce-product-search label,
.widget_search .search-form label {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.woocommerce .widget_product_search input[type="search"],
.woocommerce-page .widget_product_search input[type="search"],
.woocommerce .widget_search input[type="search"],
.woocommerce-page .widget_search input[type="search"],
.widget_product_search .search-field,
.widget_search .search-field {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}

.woocommerce .widget_product_search button,
.woocommerce-page .widget_product_search button,
.woocommerce .widget_search button,
.woocommerce-page .widget_search button,
.widget_product_search button,
.widget_search .search-submit {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  line-height: 42px !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
  text-align: center !important;
}

/* Keep the shop/sidebar aligned on the same light background. */
.woocommerce-shop .site-content,
.tax-product_cat .site-content,
.post-type-archive-product .site-content {
  padding-top: 32px;
  padding-bottom: 56px;
}

@media (max-width: 768px) {
  .woocommerce-shop .site-content,
  .tax-product_cat .site-content,
  .post-type-archive-product .site-content {
    padding-top: 20px;
    padding-bottom: 36px;
  }
}

/* ==========================================================
   CNC Parts 1.1.2 — wider category cards and consistent sidebar
   ========================================================== */

/* Three wider category cards beside the shop sidebar. */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products {
  grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
  gap: 26px !important;
}

/* Give the archive content a predictable sidebar/content ratio. */
body.woocommerce-shop.ast-left-sidebar .site-content > .ast-container,
body.post-type-archive-product.ast-left-sidebar .site-content > .ast-container,
body.tax-product_cat.ast-left-sidebar .site-content > .ast-container,
body.woocommerce-shop.ast-right-sidebar .site-content > .ast-container,
body.post-type-archive-product.ast-right-sidebar .site-content > .ast-container,
body.tax-product_cat.ast-right-sidebar .site-content > .ast-container {
  display: flex !important;
  gap: 34px !important;
  align-items: flex-start !important;
}

body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
  flex: 0 0 270px !important;
  width: 270px !important;
  max-width: 270px !important;
  padding: 0 !important;
}

body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
}

/* Category cards are horizontal-proportion cards, not tall product tiles. */
body.woocommerce-shop ul.products li.product-category,
body.post-type-archive-product ul.products li.product-category,
body.tax-product_cat ul.products li.product-category {
  min-height: 0 !important;
  height: auto !important;
  border-radius: 12px !important;
}

body.woocommerce-shop ul.products li.product-category > a,
body.post-type-archive-product ul.products li.product-category > a,
body.tax-product_cat ul.products li.product-category > a {
  display: grid !important;
  grid-template-rows: auto auto !important;
  height: auto !important;
}

/* Override Astra/WooCommerce's 150x113 category thumbnail presentation. */
body.woocommerce-shop ul.products li.product-category a img,
body.post-type-archive-product ul.products li.product-category a img,
body.tax-product_cat ul.products li.product-category a img,
body.woocommerce-shop ul.products li.product-category img.woocommerce-placeholder,
body.post-type-archive-product ul.products li.product-category img.woocommerce-placeholder,
body.tax-product_cat ul.products li.product-category img.woocommerce-placeholder {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: contain !important;
  object-position: center !important;
  padding: 14px 16px 4px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

body.woocommerce-shop ul.products li.product-category .woocommerce-loop-category__title,
body.post-type-archive-product ul.products li.product-category .woocommerce-loop-category__title,
body.tax-product_cat ul.products li.product-category .woocommerce-loop-category__title {
  min-height: 96px !important;
  padding: 14px 18px 17px !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
}

/* Sidebar typography matching the preview. */
body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary,
body.woocommerce-shop #secondary a,
body.post-type-archive-product #secondary a,
body.tax-product_cat #secondary a,
body.woocommerce-shop #secondary input,
body.post-type-archive-product #secondary input,
body.tax-product_cat #secondary input,
body.woocommerce-shop #secondary button,
body.post-type-archive-product #secondary button,
body.tax-product_cat #secondary button {
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
}

body.woocommerce-shop #secondary .widget-title,
body.post-type-archive-product #secondary .widget-title,
body.tax-product_cat #secondary .widget-title {
  font-size: .84rem !important;
  line-height: 1.25 !important;
  letter-spacing: .08em !important;
  font-weight: 800 !important;
}

body.woocommerce-shop #secondary .widget_product_categories li a,
body.post-type-archive-product #secondary .widget_product_categories li a,
body.tax-product_cat #secondary .widget_product_categories li a {
  display: block !important;
  padding: 10px 32px 10px 0 !important;
  font-size: .92rem !important;
  line-height: 1.35 !important;
  font-weight: 550 !important;
}

body.woocommerce-shop #secondary .widget_product_categories .count,
body.post-type-archive-product #secondary .widget_product_categories .count,
body.tax-product_cat #secondary .widget_product_categories .count {
  margin-top: -40px !important;
  position: relative !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

@media (max-width: 1050px) {
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: repeat(2, minmax(210px, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body.woocommerce-shop.ast-left-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-left-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-left-sidebar .site-content > .ast-container,
  body.woocommerce-shop.ast-right-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-right-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-right-sidebar .site-content > .ast-container {
    display: block !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 26px !important;
  }
}

@media (max-width: 560px) {
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================
   CNC Parts 1.1.3 — Larger category media and compact products
   ========================================================== */

/* Give the catalogue a little more horizontal room. With a sidebar
   this keeps three useful, wider cards instead of narrow columns. */
.woocommerce-shop .site-content > .ast-container,
.tax-product_cat .site-content > .ast-container,
.post-type-archive-product .site-content > .ast-container {
  max-width: 1380px !important;
}

/* Category cards use the available width and a larger square media area. */
.woocommerce-shop ul.products,
.post-type-archive-product ul.products {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 30px !important;
}

.woocommerce ul.products li.product-category a img,
.woocommerce-page ul.products li.product-category a img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  padding: 12px 18px 4px !important;
}

.woocommerce ul.products li.product-category .woocommerce-loop-category__title,
.woocommerce-page ul.products li.product-category .woocommerce-loop-category__title {
  min-height: 104px !important;
  padding-top: 10px !important;
}

/* Product archives: no excerpt under the product title. This keeps all
   cards compact and aligned even when imported short descriptions differ. */
.tax-product_cat .cnc-card-short-description,
.post-type-archive-product .cnc-card-short-description,
.woocommerce-shop .cnc-card-short-description {
  display: none !important;
}

.tax-product_cat ul.products li.product:not(.product-category),
.post-type-archive-product ul.products li.product:not(.product-category) {
  padding: 14px !important;
}

.tax-product_cat ul.products li.product:not(.product-category) a img,
.post-type-archive-product ul.products li.product:not(.product-category) a img {
  margin-bottom: 12px !important;
}

.tax-product_cat ul.products li.product:not(.product-category) .woocommerce-loop-product__title,
.post-type-archive-product ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
  min-height: 2.7em;
  margin-bottom: .55rem !important;
}

.tax-product_cat ul.products li.product:not(.product-category) .cnc-card-category,
.post-type-archive-product ul.products li.product:not(.product-category) .cnc-card-category {
  margin-bottom: .75rem !important;
}

@media (max-width: 1100px) {
  .woocommerce-shop ul.products,
  .post-type-archive-product ul.products,
  .tax-product_cat ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  .woocommerce-shop ul.products,
  .post-type-archive-product ul.products,
  .tax-product_cat ul.products {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================
   CNC Parts 1.1.4 — clean product cards and full-size media
   ========================================================== */

/* Astra can print its own linked category label above the product title.
   Keep only the CNC Parts category label rendered below the title. */
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce-page ul.products li.product .ast-woo-product-category,
.woocommerce ul.products li.product .ast-product-category,
.woocommerce-page ul.products li.product .ast-product-category,
.woocommerce ul.products li.product .astra-shop-summary-wrap > .product-category,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap > .product-category {
  display: none !important;
}

/* Our single category line belongs below the product name. */
.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
  order: 1 !important;
  margin: 0 0 7px !important;
}

.woocommerce ul.products li.product:not(.product-category) .cnc-card-category,
.woocommerce-page ul.products li.product:not(.product-category) .cnc-card-category {
  order: 2 !important;
  display: block !important;
  margin: 0 0 14px !important;
  color: #7a858f !important;
  font-size: .78rem !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
}

.woocommerce ul.products li.product:not(.product-category) .cnc-inquiry-button,
.woocommerce-page ul.products li.product:not(.product-category) .cnc-inquiry-button {
  order: 3 !important;
  margin-top: auto !important;
}

/* Product media must fill the card. The PHP markup now requests the original
   attachment instead of the 150x113 WooCommerce derivative. */
.woocommerce ul.products li.product:not(.product-category) .cnc-product-card-image,
.woocommerce-page ul.products li.product:not(.product-category) .cnc-product-card-image,
.woocommerce ul.products li.product:not(.product-category) a img.wp-post-image,
.woocommerce-page ul.products li.product:not(.product-category) a img.wp-post-image {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 0 14px !important;
  padding: 8px !important;
  background: #fff !important;
}

.woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
.woocommerce-page ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__link,
.woocommerce-page ul.products li.product:not(.product-category) .woocommerce-loop-product__link {
  width: 100% !important;
}

/* ==========================================================
   CNC Parts 1.1.5 — definitive archive grid and surfaces
   ========================================================== */

/* One neutral page background. Content containers remain transparent. */
body,
body.woocommerce,
body.woocommerce-page,
body.post-type-archive-product,
body.tax-product_cat,
.site,
.site-content,
#content,
.ast-separate-container,
.ast-separate-container .site-content {
  background-color: #f4f6f8 !important;
}

body.woocommerce .site-content > .ast-container,
body.woocommerce-page .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.woocommerce #primary,
body.woocommerce-page #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.woocommerce .ast-woocommerce-container,
body.woocommerce-page .ast-woocommerce-container,
body.post-type-archive-product .ast-woocommerce-container,
body.tax-product_cat .ast-woocommerce-container {
  background: transparent !important;
  box-shadow: none !important;
}

/* Sidebar itself is transparent; every widget is an individual white card. */
body.woocommerce #secondary,
body.woocommerce-page #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
  background: transparent !important;
}

body.woocommerce #secondary .widget,
body.woocommerce-page #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget,
body.woocommerce #secondary .widget_block,
body.woocommerce-page #secondary .widget_block,
body.post-type-archive-product #secondary .widget_block,
body.tax-product_cat #secondary .widget_block {
  display: block !important;
  margin: 0 0 20px !important;
  padding: 22px !important;
  background: #ffffff !important;
  border: 1px solid #dfe5ea !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 18px rgba(24, 45, 61, .06) !important;
  color: #27313a !important;
}

/* Product and category archives use three genuinely wide cards beside sidebar. */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.woocommerce-page.tax-product_cat ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px !important;
  align-items: stretch !important;
  width: 100% !important;
}

/* Restore the complete white card surface and border, regardless of Astra wrappers. */
body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.woocommerce ul.products li.product-category,
body.woocommerce-page ul.products li.product-category {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 16px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  border: 1px solid #dfe5ea !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 22px rgba(24, 45, 61, .07) !important;
}

body.woocommerce ul.products li.product:hover,
body.woocommerce-page ul.products li.product:hover,
body.woocommerce ul.products li.product-category:hover,
body.woocommerce-page ul.products li.product-category:hover {
  border-color: #cbd5dc !important;
  box-shadow: 0 12px 30px rgba(24, 45, 61, .12) !important;
}

/* The image link/wrapper must use the entire card width. */
body.woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
body.woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap,
body.woocommerce ul.products li.product .woocommerce-loop-product__link,
body.woocommerce-page ul.products li.product .woocommerce-loop-product__link,
body.woocommerce ul.products li.product-category > a,
body.woocommerce-page ul.products li.product-category > a {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

/* Product images: a large square media area, never the old 150x113 visual box. */
body.woocommerce ul.products li.product:not(.product-category) img,
body.woocommerce-page ul.products li.product:not(.product-category) img,
body.post-type-archive-product ul.products li.product:not(.product-category) img,
body.tax-product_cat ul.products li.product:not(.product-category) img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 0 15px !important;
  padding: 10px !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 8px !important;
}

/* Category images use the same wide square presentation. */
body.woocommerce ul.products li.product-category img,
body.woocommerce-page ul.products li.product-category img,
body.post-type-archive-product ul.products li.product-category img,
body.tax-product_cat ul.products li.product-category img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  background: #ffffff !important;
}

/* Astra summary wrapper must stay transparent inside our white card. */
body.woocommerce .astra-shop-summary-wrap,
body.woocommerce-page .astra-shop-summary-wrap {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
}

/* One category label only, below the product title. */
body.woocommerce ul.products li.product .ast-woo-product-category,
body.woocommerce-page ul.products li.product .ast-woo-product-category,
body.woocommerce ul.products li.product .ast-product-category,
body.woocommerce-page ul.products li.product .ast-product-category,
body.woocommerce ul.products li.product .product-category:not(.cnc-card-category),
body.woocommerce-page ul.products li.product .product-category:not(.cnc-card-category) {
  display: none !important;
}

body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  order: 1 !important;
  min-height: 2.65em !important;
  margin: 0 0 7px !important;
  color: #27313a !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.32 !important;
  font-weight: 700 !important;
}

body.woocommerce ul.products li.product .cnc-card-category,
body.woocommerce-page ul.products li.product .cnc-card-category {
  order: 2 !important;
  display: block !important;
  margin: 0 0 15px !important;
  color: #77838e !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: .78rem !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
}

body.woocommerce ul.products li.product .cnc-inquiry-button,
body.woocommerce-page ul.products li.product .cnc-inquiry-button {
  order: 3 !important;
  margin-top: auto !important;
}

/* Search widget: stable horizontal field and button, no vertical text. */
body.woocommerce #secondary form.woocommerce-product-search,
body.woocommerce-page #secondary form.woocommerce-product-search,
body.woocommerce #secondary .wp-block-search__inside-wrapper,
body.woocommerce-page #secondary .wp-block-search__inside-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  width: 100% !important;
}

body.woocommerce #secondary input[type="search"],
body.woocommerce-page #secondary input[type="search"] {
  min-width: 0 !important;
  width: 100% !important;
  height: 42px !important;
  padding: 0 12px !important;
  white-space: normal !important;
}

body.woocommerce #secondary button,
body.woocommerce-page #secondary button,
body.woocommerce #secondary input[type="submit"],
body.woocommerce-page #secondary input[type="submit"] {
  width: auto !important;
  min-width: 86px !important;
  height: 42px !important;
  padding: 0 14px !important;
  writing-mode: horizontal-tb !important;
  white-space: nowrap !important;
}

@media (max-width: 1120px) {
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.woocommerce-page.tax-product_cat ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.woocommerce-page.tax-product_cat ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================
   CNC Parts 1.1.5 — Compact sidebar product search
   ========================================================== */

/* The field is self-explanatory, so remove the repeated widget heading. */
body.woocommerce #secondary .widget_product_search .widget-title,
body.woocommerce-page #secondary .widget_product_search .widget-title,
body.woocommerce #secondary .wp-block-search__label,
body.woocommerce-page #secondary .wp-block-search__label {
  display: none !important;
}

body.woocommerce #secondary .widget_product_search,
body.woocommerce-page #secondary .widget_product_search {
  padding: 16px !important;
}

body.woocommerce #secondary form.woocommerce-product-search.cnc-product-search,
body.woocommerce-page #secondary form.woocommerce-product-search.cnc-product-search {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

body.woocommerce #secondary .cnc-product-search .search-field,
body.woocommerce-page #secondary .cnc-product-search .search-field {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 52px 0 15px !important;
  border: 1px solid #d5dde3 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #27313a !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: 13px !important;
  line-height: 48px !important;
  font-weight: 500 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body.woocommerce #secondary .cnc-product-search .search-field::placeholder,
body.woocommerce-page #secondary .cnc-product-search .search-field::placeholder {
  color: #7a8791 !important;
  opacity: 1 !important;
}

body.woocommerce #secondary .cnc-product-search .search-field:focus,
body.woocommerce-page #secondary .cnc-product-search .search-field:focus {
  border-color: var(--cnc-primary) !important;
  box-shadow: 0 0 0 3px rgba(11, 79, 125, .12) !important;
  outline: none !important;
}

body.woocommerce #secondary .cnc-product-search .cnc-search-submit,
body.woocommerce-page #secondary .cnc-product-search .cnc-search-submit {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: var(--cnc-primary) !important;
  color: #ffffff !important;
  font-size: 0 !important;
  line-height: 1 !important;
  writing-mode: horizontal-tb !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

body.woocommerce #secondary .cnc-product-search .cnc-search-submit:hover,
body.woocommerce-page #secondary .cnc-product-search .cnc-search-submit:hover {
  background: var(--cnc-primary-dark) !important;
}

body.woocommerce #secondary .cnc-product-search .cnc-search-submit svg,
body.woocommerce-page #secondary .cnc-product-search .cnc-search-submit svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

/* ==========================================================
   CNC Parts 2.0 — unified sidebar product search
   ========================================================== */
#secondary .cnc-modern-search-widget,
.widget-area .cnc-modern-search-widget {
  padding-top: 0 !important;
}

#secondary .cnc-modern-search,
.widget-area .cnc-modern-search,
#secondary .woocommerce-product-search,
.widget-area .woocommerce-product-search,
#secondary .wp-block-search__inside-wrapper,
.widget-area .wp-block-search__inside-wrapper {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

#secondary .cnc-modern-search input[type="search"],
#secondary .cnc-modern-search input[name="s"],
.widget-area .cnc-modern-search input[type="search"],
.widget-area .cnc-modern-search input[name="s"],
#secondary .woocommerce-product-search .search-field,
.widget-area .woocommerce-product-search .search-field,
#secondary .wp-block-search__input,
.widget-area .wp-block-search__input {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 54px 0 16px !important;
  border: 1px solid #d7e0e7 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: var(--cnc-text) !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 52px !important;
  box-shadow: none !important;
}

#secondary .cnc-modern-search input::placeholder,
.widget-area .cnc-modern-search input::placeholder,
#secondary .woocommerce-product-search .search-field::placeholder,
.widget-area .woocommerce-product-search .search-field::placeholder,
#secondary .wp-block-search__input::placeholder,
.widget-area .wp-block-search__input::placeholder {
  color: #7a8791 !important;
  opacity: 1 !important;
}

#secondary .cnc-modern-search input:focus,
.widget-area .cnc-modern-search input:focus,
#secondary .woocommerce-product-search .search-field:focus,
.widget-area .woocommerce-product-search .search-field:focus,
#secondary .wp-block-search__input:focus,
.widget-area .wp-block-search__input:focus {
  border-color: var(--cnc-primary) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(11, 79, 125, .12) !important;
}

#secondary .cnc-modern-search .cnc-search-submit,
.widget-area .cnc-modern-search .cnc-search-submit,
#secondary .woocommerce-product-search .cnc-search-submit,
.widget-area .woocommerce-product-search .cnc-search-submit,
#secondary .wp-block-search__button,
.widget-area .wp-block-search__button {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important;
  bottom: auto !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: var(--cnc-primary) !important;
  color: #fff !important;
  font-size: 0 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer;
}

#secondary .cnc-search-submit:hover,
.widget-area .cnc-search-submit:hover,
#secondary .wp-block-search__button:hover,
.widget-area .wp-block-search__button:hover {
  background: var(--cnc-primary-dark) !important;
}

#secondary .cnc-search-submit svg,
.widget-area .cnc-search-submit svg,
#secondary .wp-block-search__button svg,
.widget-area .wp-block-search__button svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#secondary .cnc-modern-search-widget .widget-title,
.widget-area .cnc-modern-search-widget .widget-title,
#secondary .cnc-modern-search-widget .wp-block-heading,
.widget-area .cnc-modern-search-widget .wp-block-heading,
#secondary .wp-block-search__label,
.widget-area .wp-block-search__label {
  display: none !important;
}


/* ==========================================================
   CNC Parts 2.0.1 — integrated search icon and refined category list
   ========================================================== */

/* Search: icon sits inside the field without a visible button box. */
body.woocommerce #secondary .cnc-modern-search-widget,
body.woocommerce-page #secondary .cnc-modern-search-widget,
body.woocommerce #secondary .widget_product_search,
body.woocommerce-page #secondary .widget_product_search,
body.woocommerce #secondary .widget_search,
body.woocommerce-page #secondary .widget_search,
body.woocommerce #secondary .wp-block-search,
body.woocommerce-page #secondary .wp-block-search {
  padding: 18px !important;
}

#secondary .cnc-modern-search,
#secondary .woocommerce-product-search,
#secondary .wp-block-search__inside-wrapper,
.widget-area .cnc-modern-search,
.widget-area .woocommerce-product-search,
.widget-area .wp-block-search__inside-wrapper {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}

#secondary .cnc-modern-search input[type="search"],
#secondary .cnc-modern-search input[name="s"],
#secondary .woocommerce-product-search .search-field,
#secondary .wp-block-search__input,
.widget-area .cnc-modern-search input[type="search"],
.widget-area .cnc-modern-search input[name="s"],
.widget-area .woocommerce-product-search .search-field,
.widget-area .wp-block-search__input {
  height: 50px !important;
  padding: 0 48px 0 15px !important;
  border: 1px solid #d7e0e7 !important;
  border-radius: 9px !important;
  background: #fff !important;
  font-size: 13px !important;
  line-height: 50px !important;
}

#secondary .cnc-modern-search .cnc-search-submit,
#secondary .woocommerce-product-search .cnc-search-submit,
#secondary .wp-block-search__button,
.widget-area .cnc-modern-search .cnc-search-submit,
.widget-area .woocommerce-product-search .cnc-search-submit,
.widget-area .wp-block-search__button {
  position: absolute !important;
  top: 50% !important;
  right: 13px !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #41515e !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

#secondary .cnc-modern-search .cnc-search-submit:hover,
#secondary .woocommerce-product-search .cnc-search-submit:hover,
#secondary .wp-block-search__button:hover,
.widget-area .cnc-modern-search .cnc-search-submit:hover,
.widget-area .woocommerce-product-search .cnc-search-submit:hover,
.widget-area .wp-block-search__button:hover {
  background: transparent !important;
  color: var(--cnc-primary) !important;
  transform: translateY(-50%) scale(1.06) !important;
}

#secondary .cnc-search-submit svg,
#secondary .wp-block-search__button svg,
.widget-area .cnc-search-submit svg,
.widget-area .wp-block-search__button svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 2.15 !important;
}

/* Category widget: clean list, clear hierarchy, no distracting counts. */
body.woocommerce #secondary .widget_product_categories,
body.woocommerce-page #secondary .widget_product_categories {
  padding: 20px 20px 14px !important;
}

body.woocommerce #secondary .widget_product_categories .widget-title,
body.woocommerce-page #secondary .widget_product_categories .widget-title {
  margin-bottom: 10px !important;
  font-size: .82rem !important;
  letter-spacing: .075em !important;
}

body.woocommerce #secondary .widget_product_categories ul.product-categories,
body.woocommerce-page #secondary .widget_product_categories ul.product-categories {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce #secondary .widget_product_categories li,
body.woocommerce-page #secondary .widget_product_categories li {
  position: relative !important;
  border-bottom: 1px solid #edf1f4 !important;
}

body.woocommerce #secondary .widget_product_categories li:last-child,
body.woocommerce-page #secondary .widget_product_categories li:last-child {
  border-bottom: 0 !important;
}

body.woocommerce #secondary .widget_product_categories li > a,
body.woocommerce-page #secondary .widget_product_categories li > a {
  display: block !important;
  padding: 12px 24px 12px 0 !important;
  color: #34414b !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: .92rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
}

body.woocommerce #secondary .widget_product_categories li > a:hover,
body.woocommerce-page #secondary .widget_product_categories li > a:hover,
body.woocommerce #secondary .widget_product_categories li.current-cat > a,
body.woocommerce-page #secondary .widget_product_categories li.current-cat > a,
body.woocommerce #secondary .widget_product_categories li.current-cat-parent > a,
body.woocommerce-page #secondary .widget_product_categories li.current-cat-parent > a {
  color: var(--cnc-primary) !important;
}

body.woocommerce #secondary .widget_product_categories li.cat-parent::after,
body.woocommerce-page #secondary .widget_product_categories li.cat-parent::after {
  content: "›";
  position: absolute;
  top: 10px;
  right: 2px;
  color: #8a98a3;
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
}

body.woocommerce #secondary .widget_product_categories ul.children,
body.woocommerce-page #secondary .widget_product_categories ul.children {
  margin: 0 0 8px !important;
  padding: 0 0 0 14px !important;
  border-left: 2px solid #e8edf1 !important;
}

body.woocommerce #secondary .widget_product_categories ul.children li,
body.woocommerce-page #secondary .widget_product_categories ul.children li {
  border-bottom: 0 !important;
}

body.woocommerce #secondary .widget_product_categories ul.children li > a,
body.woocommerce-page #secondary .widget_product_categories ul.children li > a {
  padding: 7px 18px 7px 0 !important;
  color: #66737d !important;
  font-size: .86rem !important;
  font-weight: 500 !important;
}

body.woocommerce #secondary .widget_product_categories .count,
body.woocommerce-page #secondary .widget_product_categories .count {
  display: none !important;
}


/* ==========================================================
   CNC Parts 2.0.2 — exact placeholder and universal category widget
   ========================================================== */

/* Leave enough room for the icon, but keep the placeholder fully visible. */
#secondary .cnc-modern-search input[type="search"],
#secondary .cnc-modern-search input[name="s"],
#secondary .woocommerce-product-search .search-field,
#secondary .wp-block-search__input,
.widget-area .cnc-modern-search input[type="search"],
.widget-area .cnc-modern-search input[name="s"],
.widget-area .woocommerce-product-search .search-field,
.widget-area .wp-block-search__input {
  padding-right: 43px !important;
  text-overflow: clip !important;
}

/* Universal category widget class added by cnc-parts-ui.js. */
#secondary .cnc-category-list-widget,
.widget-area .cnc-category-list-widget {
  padding: 20px 20px 14px !important;
  background: #fff !important;
}

#secondary .cnc-category-list-widget .widget-title,
#secondary .cnc-category-list-widget .wp-block-heading,
.widget-area .cnc-category-list-widget .widget-title,
.widget-area .cnc-category-list-widget .wp-block-heading {
  margin: 0 0 10px !important;
  color: var(--cnc-text) !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: .82rem !important;
  font-weight: 800 !important;
  letter-spacing: .075em !important;
  line-height: 1.3 !important;
  text-transform: uppercase !important;
}

#secondary .cnc-category-list-widget ul,
#secondary .wc-block-product-categories-list,
#secondary .wp-block-woocommerce-product-categories ul,
.widget-area .cnc-category-list-widget ul,
.widget-area .wc-block-product-categories-list,
.widget-area .wp-block-woocommerce-product-categories ul {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#secondary .cnc-category-list-widget li,
#secondary .wc-block-product-categories-list-item,
.widget-area .cnc-category-list-widget li,
.widget-area .wc-block-product-categories-list-item {
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1f4 !important;
  list-style: none !important;
}

#secondary .cnc-category-list-widget li:last-child,
#secondary .wc-block-product-categories-list-item:last-child,
.widget-area .cnc-category-list-widget li:last-child,
.widget-area .wc-block-product-categories-list-item:last-child {
  border-bottom: 0 !important;
}

#secondary .cnc-category-list-widget li > a,
#secondary .wc-block-product-categories-list-item > a,
.widget-area .cnc-category-list-widget li > a,
.widget-area .wc-block-product-categories-list-item > a {
  display: block !important;
  width: 100% !important;
  padding: 12px 26px 12px 0 !important;
  color: #34414b !important;
  font-family: "Inter", "Segoe UI", Arial, sans-serif !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
}

#secondary .cnc-category-list-widget li > a:hover,
#secondary .cnc-category-list-widget li.current-cat > a,
#secondary .cnc-category-list-widget li.current-cat-parent > a,
#secondary .wc-block-product-categories-list-item > a:hover,
.widget-area .cnc-category-list-widget li > a:hover,
.widget-area .cnc-category-list-widget li.current-cat > a,
.widget-area .cnc-category-list-widget li.current-cat-parent > a,
.widget-area .wc-block-product-categories-list-item > a:hover {
  color: var(--cnc-primary) !important;
}

#secondary .cnc-category-list-widget li.cnc-has-children::after,
#secondary .wc-block-product-categories-list-item:has(> ul)::after,
.widget-area .cnc-category-list-widget li.cnc-has-children::after,
.widget-area .wc-block-product-categories-list-item:has(> ul)::after {
  content: "›" !important;
  position: absolute !important;
  top: 11px !important;
  right: 2px !important;
  color: #8997a2 !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

#secondary .cnc-category-list-widget li > ul,
#secondary .wc-block-product-categories-list-item > ul,
.widget-area .cnc-category-list-widget li > ul,
.widget-area .wc-block-product-categories-list-item > ul {
  margin: 0 0 8px !important;
  padding: 0 0 0 14px !important;
  border-left: 2px solid #e8edf1 !important;
}

#secondary .cnc-category-list-widget li > ul > li,
#secondary .wc-block-product-categories-list-item > ul > li,
.widget-area .cnc-category-list-widget li > ul > li,
.widget-area .wc-block-product-categories-list-item > ul > li {
  border-bottom: 0 !important;
}

#secondary .cnc-category-list-widget li > ul > li > a,
#secondary .wc-block-product-categories-list-item > ul > li > a,
.widget-area .cnc-category-list-widget li > ul > li > a,
.widget-area .wc-block-product-categories-list-item > ul > li > a {
  padding: 7px 18px 7px 0 !important;
  color: #66737d !important;
  font-size: .86rem !important;
  font-weight: 500 !important;
}

/* Counts can be emitted as spans, block-specific spans, or plain text wrappers. */
#secondary .cnc-category-list-widget .count,
#secondary .cnc-category-list-widget [class*="count"],
#secondary .wc-block-product-categories-list-item-count,
.widget-area .cnc-category-list-widget .count,
.widget-area .cnc-category-list-widget [class*="count"],
.widget-area .wc-block-product-categories-list-item-count {
  display: none !important;
}

/* ==========================================================
   CNC Parts 3.1.4 — single-product gallery foundation
   ========================================================== */

/* IMPORTANT: do not force width/display/float/transform on
   .woocommerce-product-gallery__image or on the gallery wrapper.
   WooCommerce FlexSlider writes those values inline for every slide. */
body.single-product div.product .woocommerce-product-gallery {
  min-width: 0 !important;
}

/* ==========================================================
   CNC Parts 2.0.4 — B2B single-product layout with sidebar
   ========================================================== */

/* Astra normally removes the sidebar from product pages. The PHP layout
   filter restores it; these rules create the same calm catalogue layout
   used on product archives. */
body.single-product .site-content {
  background: var(--cnc-bg) !important;
}

body.single-product.ast-left-sidebar .site-content > .ast-container {
  max-width: 1380px !important;
  display: grid !important;
  grid-template-columns: 270px minmax(0, 1fr) !important;
  gap: 34px !important;
  align-items: start !important;
  padding-top: 28px !important;
  padding-bottom: 56px !important;
}

body.single-product.ast-left-sidebar #secondary {
  grid-column: 1 !important;
  width: 100% !important;
  margin: 0 !important;
}

body.single-product.ast-left-sidebar #primary {
  grid-column: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Breadcrumb belongs above the white product panel, not inside a crowded
   product summary. */
body.single-product .woocommerce-breadcrumb,
body.single-product .ast-breadcrumbs-wrapper {
  margin: 0 0 16px !important;
  padding: 0 !important;
  font-size: .86rem !important;
  line-height: 1.5 !important;
  color: #78848d !important;
}

body.single-product .woocommerce-breadcrumb a,
body.single-product .ast-breadcrumbs-wrapper a {
  color: var(--cnc-primary) !important;
  text-decoration: none !important;
}

/* Main product panel. */
body.single-product div.product {
  display: grid !important;
  grid-template-columns: minmax(340px, 44%) minmax(0, 1fr) !important;
  column-gap: 42px !important;
  row-gap: 34px !important;
  align-items: start !important;
  margin: 0 !important;
  padding: 30px !important;
  background: #fff !important;
  border: 1px solid var(--cnc-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 28px rgba(18, 38, 53, .07) !important;
}

body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product .summary {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* Correct gallery geometry. WooCommerce's zoom layer can otherwise offset the
   visible image inside a flex-centred anchor. */
body.single-product .woocommerce-product-gallery__wrapper {
  margin: 0 !important;
}

body.single-product .woocommerce-product-gallery__image {
  position: relative !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
}

/* FlexSlider owns the slide width and horizontal position.  Style only the
   clickable image frame, never the slide itself. */
body.single-product .woocommerce-product-gallery__image > a {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 18px !important;
  background: #fff !important;
  border: 1px solid var(--cnc-border) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  line-height: 0 !important;
  box-sizing: border-box !important;
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery__wrapper img,
body.single-product .woocommerce-product-gallery__image .wp-post-image {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 470px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  transform: none !important;
}

/* Remove any leftover zoom overlay from layout calculations. */
body.single-product .woocommerce-product-gallery__image img.zoomImg {
  display: none !important;
}

/* More breathing room in the information column. */
body.single-product div.product .summary {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

body.single-product div.product .summary > * {
  margin-top: 0 !important;
  margin-bottom: 18px !important;
}

body.single-product div.product .summary .product_title {
  margin-bottom: 14px !important;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -.025em !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description {
  margin-bottom: 22px !important;
  color: #4f5c66 !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
}

/* Delivery/payment notices from Astra or Woo extensions should read as calm
   information cards rather than run into the title and description. */
body.single-product div.product .summary [class*="shipping"],
body.single-product div.product .summary [class*="delivery"],
body.single-product div.product .summary [class*="payment"],
body.single-product div.product .summary [class*="bank"],
body.single-product div.product .summary .ast-shipping-text,
body.single-product div.product .summary .wc-block-components-notice-banner {
  margin: 0 0 18px !important;
  padding: 13px 15px !important;
  border: 1px solid #e1e8ed !important;
  border-radius: 9px !important;
  background: #f8fafb !important;
  color: #42515c !important;
  line-height: 1.55 !important;
}

body.single-product div.product .summary .product_meta {
  display: grid !important;
  gap: 8px !important;
  margin: 4px 0 24px !important;
  padding: 16px 18px !important;
  border-top: 1px solid #e7ecef !important;
  border-bottom: 1px solid #e7ecef !important;
  color: #6b7780 !important;
  font-size: .9rem !important;
  line-height: 1.55 !important;
}

body.single-product div.product .summary .product_meta > span {
  display: block !important;
}

body.single-product div.product .summary .product_meta a {
  color: var(--cnc-primary) !important;
  font-weight: 600 !important;
}

body.single-product div.product .summary .cnc-inquiry-button,
body.single-product div.product .summary .button {
  align-self: flex-start !important;
  min-width: 190px !important;
  margin-top: 4px !important;
}

/* Tabs and related products span the full white panel beneath the two-column
   presentation. */
body.single-product div.product .woocommerce-tabs,
body.single-product div.product .related,
body.single-product div.product .upsells {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin-top: 4px !important;
}

@media (max-width: 1080px) {
  body.single-product.ast-left-sidebar .site-content > .ast-container {
    grid-template-columns: 235px minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  body.single-product div.product {
    grid-template-columns: 1fr !important;
    padding: 24px !important;
  }
}

@media (max-width: 921px) {
  body.single-product.ast-left-sidebar .site-content > .ast-container {
    display: block !important;
    padding-top: 20px !important;
  }

  body.single-product.ast-left-sidebar #secondary {
    margin-bottom: 24px !important;
  }

  body.single-product div.product {
    padding: 20px !important;
  }
}



/* ==========================================================
   CNC Parts 2.0.5 — shared Shop sidebar on product pages
   ========================================================== */

/* Astra product layout must stay on No Sidebar. This custom wrapper renders
   the exact same widget area as the Shop and keeps the breadcrumb in the main
   column above the product panel. */
body.single-product .site-content > .ast-container,
body.single-product #content > .ast-container {
  display: block !important;
  max-width: 1380px !important;
  padding-top: 28px !important;
  padding-bottom: 56px !important;
}

body.single-product #primary,
body.single-product .content-area {
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.single-product #secondary {
  display: none !important;
}

body.single-product .cnc-single-catalogue-layout {
  display: grid !important;
  grid-template-columns: 270px minmax(0, 1fr) !important;
  gap: 34px !important;
  align-items: start !important;
  width: 100% !important;
}

body.single-product .cnc-catalogue-sidebar {
  grid-column: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.single-product .cnc-single-product-column {
  grid-column: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
}

/* Reuse the visual language of the archive sidebar even when widgets are
   rendered outside Astra's #secondary element. */
body.single-product .cnc-catalogue-sidebar .widget {
  margin: 0 0 22px !important;
  padding: 22px !important;
  background: #fff !important;
  border: 1px solid var(--cnc-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 20px rgba(18, 38, 53, .06) !important;
}

body.single-product .cnc-catalogue-sidebar .widget-title,
body.single-product .cnc-catalogue-sidebar h2,
body.single-product .cnc-catalogue-sidebar h3 {
  margin: 0 0 14px !important;
  color: var(--cnc-text) !important;
  font-family: Inter, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

body.single-product .cnc-catalogue-sidebar ul,
body.single-product .cnc-catalogue-sidebar .product-categories {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.single-product .cnc-catalogue-sidebar li {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #edf1f4 !important;
  list-style: none !important;
}

body.single-product .cnc-catalogue-sidebar li:last-child {
  border-bottom: 0 !important;
}

body.single-product .cnc-catalogue-sidebar li > a {
  display: block !important;
  padding: 10px 2px !important;
  color: #33414b !important;
  font-family: Inter, sans-serif !important;
  font-size: .93rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
}

body.single-product .cnc-catalogue-sidebar li > a:hover,
body.single-product .cnc-catalogue-sidebar li.current-cat > a,
body.single-product .cnc-catalogue-sidebar li.current-cat-parent > a {
  color: var(--cnc-primary) !important;
}

body.single-product .cnc-catalogue-sidebar .children {
  margin: 0 0 7px 13px !important;
  padding-left: 12px !important;
  border-left: 1px solid #dde5ea !important;
}

body.single-product .cnc-catalogue-sidebar .children li {
  border: 0 !important;
}

body.single-product .cnc-catalogue-sidebar .children li > a {
  padding: 7px 0 !important;
  color: #68747d !important;
  font-size: .87rem !important;
  font-weight: 500 !important;
}

body.single-product .cnc-catalogue-sidebar .count {
  display: none !important;
}

body.single-product .cnc-catalogue-sidebar .cnc-product-search,
body.single-product .cnc-catalogue-sidebar form[role="search"] {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

body.single-product .cnc-catalogue-sidebar input[type="search"] {
  width: 100% !important;
  height: 46px !important;
  padding: 0 46px 0 14px !important;
  border: 1px solid #d8e0e5 !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-family: Inter, sans-serif !important;
  font-size: .88rem !important;
  line-height: 46px !important;
  box-sizing: border-box !important;
}

body.single-product .cnc-catalogue-sidebar .cnc-search-submit,
body.single-product .cnc-catalogue-sidebar button[type="submit"] {
  position: absolute !important;
  top: 50% !important;
  right: 11px !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 0 !important;
  padding: 5px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #44535e !important;
  transform: translateY(-50%) !important;
  box-shadow: none !important;
}

body.single-product .cnc-catalogue-sidebar .cnc-search-submit svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
}

/* Remove any old vertical divider inherited from a previously selected Astra
   sidebar layout. */
body.single-product .cnc-single-product-column,
body.single-product .woocommerce,
body.single-product .site-main {
  border-left: 0 !important;
  border-right: 0 !important;
}

@media (max-width: 1080px) {
  body.single-product .cnc-single-catalogue-layout {
    grid-template-columns: 235px minmax(0, 1fr) !important;
    gap: 24px !important;
  }
}

@media (max-width: 921px) {
  body.single-product .cnc-single-catalogue-layout {
    display: block !important;
  }

  body.single-product .cnc-catalogue-sidebar {
    margin-bottom: 24px !important;
  }
}


/* ==========================================================
   CNC Parts 2.0.7 — one stable sidebar anchor on all catalogue views
   ========================================================== */

/* The Shop/category pages and the custom single-product layout now share
   exactly the same content start. Titles and breadcrumbs belong only to the
   right column and must never push the sidebar down. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.single-product .site-content > .ast-container,
body.single-product #content > .ast-container {
  padding-top: 28px !important;
  align-items: flex-start !important;
}

body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary,
body.single-product .cnc-catalogue-sidebar {
  align-self: start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
}

body.woocommerce-shop #secondary > :first-child,
body.post-type-archive-product #secondary > :first-child,
body.tax-product_cat #secondary > :first-child,
body.single-product .cnc-catalogue-sidebar > :first-child {
  margin-top: 0 !important;
}

/* Remove Astra offsets sometimes added to the archive sidebar. */
body.woocommerce-shop.ast-left-sidebar #secondary,
body.post-type-archive-product.ast-left-sidebar #secondary,
body.tax-product_cat.ast-left-sidebar #secondary,
body.woocommerce-shop.ast-right-sidebar #secondary,
body.post-type-archive-product.ast-right-sidebar #secondary,
body.tax-product_cat.ast-right-sidebar #secondary {
  top: auto !important;
  inset-block-start: auto !important;
}

/* Main-column headings may have their own spacing without affecting the
   sibling sidebar. */
body.woocommerce-shop #primary .woocommerce-products-header,
body.post-type-archive-product #primary .woocommerce-products-header,
body.tax-product_cat #primary .woocommerce-products-header,
body.single-product .cnc-single-product-column .woocommerce-breadcrumb,
body.single-product .cnc-single-product-column .ast-breadcrumbs-wrapper {
  margin-top: 0 !important;
}

/* Keep both columns tied to the same grid/flex top even if Astra inserts an
   empty title or notice wrapper before the catalogue. */
body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary,
body.single-product .cnc-single-product-column {
  align-self: start !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* ==========================================================
   CNC Parts 2.0.8 — tighter catalogue layout and reduced top whitespace
   ========================================================== */

/* Use more of the available desktop width. On a 1600 px display this keeps
   the catalogue aligned with the header while giving the cards noticeably
   more room. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.single-product .site-content > .ast-container,
body.single-product #content > .ast-container {
  width: min(1490px, calc(100% - 48px)) !important;
  max-width: 1490px !important;
  margin-inline: auto !important;
  padding: 0 !important;
}

/* Bring the whole catalogue closer to the header. */
body.woocommerce-shop .site-content,
body.post-type-archive-product .site-content,
body.tax-product_cat .site-content,
body.single-product .site-content {
  padding-top: 18px !important;
  padding-bottom: 48px !important;
}

/* Astra's default sidebar percentages leave a large invisible gutter.
   Replace them with an explicit two-column grid. */
body.woocommerce-shop.ast-left-sidebar .site-content > .ast-container,
body.post-type-archive-product.ast-left-sidebar .site-content > .ast-container,
body.tax-product_cat.ast-left-sidebar .site-content > .ast-container,
body.woocommerce-shop.ast-right-sidebar .site-content > .ast-container,
body.post-type-archive-product.ast-right-sidebar .site-content > .ast-container,
body.tax-product_cat.ast-right-sidebar .site-content > .ast-container {
  display: grid !important;
  grid-template-columns: 290px minmax(0, 1fr) !important;
  column-gap: 24px !important;
  row-gap: 0 !important;
  align-items: start !important;
}

body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
  grid-column: 1 !important;
  width: 290px !important;
  max-width: 290px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove the internal Astra top padding that was pushing the title down. */
body.woocommerce-shop .ast-woocommerce-container,
body.post-type-archive-product .ast-woocommerce-container,
body.tax-product_cat .ast-woocommerce-container,
body.woocommerce-shop #primary .site-main,
body.post-type-archive-product #primary .site-main,
body.tax-product_cat #primary .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Compact heading, breadcrumb and introductory copy. */
body.woocommerce-shop .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

body.woocommerce-shop .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title {
  margin: 0 0 6px !important;
  font-size: clamp(2rem, 3vw, 2.7rem) !important;
  line-height: 1.08 !important;
}

body.woocommerce-shop .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.woocommerce-shop .ast-breadcrumbs-wrapper,
body.post-type-archive-product .ast-breadcrumbs-wrapper,
body.tax-product_cat .ast-breadcrumbs-wrapper {
  margin: 0 0 16px !important;
  padding: 0 !important;
}

body.woocommerce-shop .cnc-shop-intro,
body.post-type-archive-product .cnc-shop-intro,
body.tax-product_cat .cnc-shop-intro,
body.woocommerce-shop .term-description,
body.post-type-archive-product .term-description,
body.tax-product_cat .term-description {
  max-width: none !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
}

/* Wider category cards inside the newly enlarged content column. */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products {
  gap: 24px !important;
}

/* Give the category sidebar slightly more breathing room without making it
   visually heavy. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget {
  padding-left: 34px !important;
  padding-right: 34px !important;
}

@media (max-width: 1200px) {
  body.woocommerce-shop.ast-left-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-left-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-left-sidebar .site-content > .ast-container,
  body.woocommerce-shop.ast-right-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-right-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-right-sidebar .site-content > .ast-container {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    column-gap: 22px !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    width: 260px !important;
    max-width: 260px !important;
  }
}

@media (max-width: 921px) {
  body.woocommerce-shop .site-content > .ast-container,
  body.post-type-archive-product .site-content > .ast-container,
  body.tax-product_cat .site-content > .ast-container,
  body.single-product .site-content > .ast-container,
  body.single-product #content > .ast-container {
    width: min(100% - 32px, 760px) !important;
  }

  body.woocommerce-shop.ast-left-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-left-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-left-sidebar .site-content > .ast-container,
  body.woocommerce-shop.ast-right-sidebar .site-content > .ast-container,
  body.post-type-archive-product.ast-right-sidebar .site-content > .ast-container,
  body.tax-product_cat.ast-right-sidebar .site-content > .ast-container {
    display: block !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 24px !important;
  }
}

/* ==========================================================
   CNC Parts 2.0.9 — compact archive columns without resizing sidebar
   ========================================================== */

/* Return to the normal catalogue width. The only intended change in this
   release is the distance between the sidebar and the product content. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.woocommerce-shop #content > .ast-container,
body.post-type-archive-product #content > .ast-container,
body.tax-product_cat #content > .ast-container {
  width: min(1280px, calc(100% - 40px)) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

/* Cover both Astra structures: .site-content > .ast-container and
   #content > .ast-container. This prevents Astra's percentage widths and
   hidden horizontal padding from creating the large empty gutter. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.woocommerce-shop #content > .ast-container,
body.post-type-archive-product #content > .ast-container,
body.tax-product_cat #content > .ast-container {
  display: grid !important;
  grid-template-columns: 255px minmax(0, 1fr) !important;
  column-gap: 18px !important;
  row-gap: 0 !important;
  align-items: start !important;
}

body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
  grid-column: 1 !important;
  width: 255px !important;
  max-width: 255px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary {
  grid-column: 2 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* Astra can add inner padding to these wrappers even after the columns have
   been positioned. Remove it so the visible content begins immediately after
   the 18 px grid gap. */
body.woocommerce-shop #primary .site-main,
body.post-type-archive-product #primary .site-main,
body.tax-product_cat #primary .site-main,
body.woocommerce-shop #primary .ast-woocommerce-container,
body.post-type-archive-product #primary .ast-woocommerce-container,
body.tax-product_cat #primary .ast-woocommerce-container {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Restore the original sidebar card proportions. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget {
  padding-left: 28px !important;
  padding-right: 28px !important;
}

/* Move the catalogue slightly closer to the header, without changing its
   width or card proportions. */
body.woocommerce-shop .site-content,
body.post-type-archive-product .site-content,
body.tax-product_cat .site-content {
  padding-top: 10px !important;
}

@media (max-width: 1200px) {
  body.woocommerce-shop .site-content > .ast-container,
  body.post-type-archive-product .site-content > .ast-container,
  body.tax-product_cat .site-content > .ast-container,
  body.woocommerce-shop #content > .ast-container,
  body.post-type-archive-product #content > .ast-container,
  body.tax-product_cat #content > .ast-container {
    grid-template-columns: 245px minmax(0, 1fr) !important;
    column-gap: 16px !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    width: 245px !important;
    max-width: 245px !important;
  }
}

@media (max-width: 921px) {
  body.woocommerce-shop .site-content > .ast-container,
  body.post-type-archive-product .site-content > .ast-container,
  body.tax-product_cat .site-content > .ast-container,
  body.woocommerce-shop #content > .ast-container,
  body.post-type-archive-product #content > .ast-container,
  body.tax-product_cat #content > .ast-container {
    display: block !important;
    width: min(100% - 32px, 760px) !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 24px !important;
  }
}


/* ==========================================================
   CNC Parts 2.0.10 — raise archive heading and catalogue content
   ========================================================== */

/* Keep the established widths and 18 px column gap. Only lift the complete
   right-hand catalogue column so the title, breadcrumb and introduction begin
   closer to the header and visually align with the sidebar. */
@media (min-width: 922px) {
  body.woocommerce-shop #primary,
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary {
    position: relative !important;
    top: -58px !important;
    margin-bottom: -58px !important;
  }
}

/* Remove any remaining vertical space added by Astra/WooCommerce around the
   archive heading and introductory text. */
body.woocommerce-shop #primary .woocommerce-products-header,
body.post-type-archive-product #primary .woocommerce-products-header,
body.tax-product_cat #primary .woocommerce-products-header {
  padding-top: 0 !important;
  margin-top: 0 !important;
  min-height: 0 !important;
}

body.woocommerce-shop #primary .woocommerce-breadcrumb,
body.post-type-archive-product #primary .woocommerce-breadcrumb,
body.tax-product_cat #primary .woocommerce-breadcrumb,
body.woocommerce-shop #primary .ast-breadcrumbs-wrapper,
body.post-type-archive-product #primary .ast-breadcrumbs-wrapper,
body.tax-product_cat #primary .ast-breadcrumbs-wrapper {
  margin-top: 0 !important;
}

body.woocommerce-shop #primary .cnc-shop-intro,
body.post-type-archive-product #primary .cnc-shop-intro,
body.tax-product_cat #primary .cnc-shop-intro,
body.woocommerce-shop #primary .term-description,
body.post-type-archive-product #primary .term-description,
body.tax-product_cat #primary .term-description {
  margin-top: 0 !important;
}

@media (max-width: 921px) {
  body.woocommerce-shop #primary,
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary {
    top: auto !important;
    margin-bottom: 0 !important;
  }
}


/* ==========================================================
   CNC Parts 2.1.0 — compact sidebar and archive title hierarchy
   ========================================================== */

/* The column sizing and 18 px gutter from 2.0.9 remain unchanged. */

/* More compact sidebar cards without changing sidebar width. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget,
body.single-product .cnc-catalogue-sidebar .widget {
  margin: 0 0 14px !important;
  padding: 16px 18px !important;
  border-radius: 10px !important;
}

body.woocommerce-shop #secondary .cnc-modern-search-widget,
body.post-type-archive-product #secondary .cnc-modern-search-widget,
body.tax-product_cat #secondary .cnc-modern-search-widget,
body.single-product .cnc-catalogue-sidebar .cnc-modern-search-widget,
body.single-product .cnc-catalogue-sidebar .cnc-single-search {
  padding: 14px 16px !important;
}

body.woocommerce-shop #secondary .widget_product_categories,
body.post-type-archive-product #secondary .widget_product_categories,
body.tax-product_cat #secondary .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .cnc-single-categories {
  padding: 17px 18px !important;
}

/* Reduce list spacing while keeping the hierarchy readable. */
body.woocommerce-shop #secondary .cnc-category-list-widget li,
body.post-type-archive-product #secondary .cnc-category-list-widget li,
body.tax-product_cat #secondary .cnc-category-list-widget li,
body.single-product .cnc-catalogue-sidebar .cnc-category-list-widget li,
body.single-product .cnc-catalogue-sidebar .product-categories li {
  margin: 0 !important;
}

body.woocommerce-shop #secondary .cnc-category-list-widget li > a,
body.post-type-archive-product #secondary .cnc-category-list-widget li > a,
body.tax-product_cat #secondary .cnc-category-list-widget li > a,
body.single-product .cnc-catalogue-sidebar .cnc-category-list-widget li > a,
body.single-product .cnc-catalogue-sidebar .product-categories li > a {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  line-height: 1.35 !important;
}

body.woocommerce-shop #secondary .cnc-category-list-widget ul.children,
body.post-type-archive-product #secondary .cnc-category-list-widget ul.children,
body.tax-product_cat #secondary .cnc-category-list-widget ul.children,
body.single-product .cnc-catalogue-sidebar .cnc-category-list-widget ul.children,
body.single-product .cnc-catalogue-sidebar .product-categories ul.children {
  margin-top: 1px !important;
  margin-bottom: 6px !important;
}

/* Archive heading: breadcrumb, title, description, then catalogue. */
body.woocommerce-shop #primary .woocommerce-products-header,
body.post-type-archive-product #primary .woocommerce-products-header,
body.tax-product_cat #primary .woocommerce-products-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0 !important;
  margin: 0 0 26px !important;
  padding: 0 !important;
}

body.woocommerce-shop .cnc-archive-breadcrumb,
body.post-type-archive-product .cnc-archive-breadcrumb,
body.tax-product_cat .cnc-archive-breadcrumb,
body.woocommerce-shop #primary .woocommerce-breadcrumb,
body.post-type-archive-product #primary .woocommerce-breadcrumb,
body.tax-product_cat #primary .woocommerce-breadcrumb {
  order: 1 !important;
  display: block !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  color: #89939d !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
}

body.woocommerce-shop .cnc-archive-breadcrumb a,
body.post-type-archive-product .cnc-archive-breadcrumb a,
body.tax-product_cat .cnc-archive-breadcrumb a,
body.woocommerce-shop #primary .woocommerce-breadcrumb a,
body.post-type-archive-product #primary .woocommerce-breadcrumb a,
body.tax-product_cat #primary .woocommerce-breadcrumb a {
  color: #74808a !important;
}

body.woocommerce-shop #primary .woocommerce-products-header__title,
body.post-type-archive-product #primary .woocommerce-products-header__title,
body.tax-product_cat #primary .woocommerce-products-header__title,
body.woocommerce-shop #primary .page-title,
body.post-type-archive-product #primary .page-title,
body.tax-product_cat #primary .page-title {
  order: 2 !important;
  margin: 0 0 12px !important;
  color: #27313a !important;
  font-size: clamp(2.25rem, 4vw, 3.1rem) !important;
  line-height: 1.08 !important;
  font-weight: 750 !important;
  letter-spacing: -0.025em !important;
}

body.woocommerce-shop #primary .cnc-shop-intro,
body.post-type-archive-product #primary .cnc-shop-intro,
body.tax-product_cat #primary .cnc-shop-intro,
body.woocommerce-shop #primary .term-description,
body.post-type-archive-product #primary .term-description,
body.tax-product_cat #primary .term-description {
  order: 3 !important;
  max-width: 800px !important;
  margin: 0 !important;
  color: #66727d !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

/* The old 2.0.10 negative offset was a temporary workaround. The archive
   header is now organised explicitly, so use a smaller and safer lift. */
@media (min-width: 922px) {
  body.woocommerce-shop #primary,
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary {
    top: -28px !important;
    margin-bottom: -28px !important;
  }
}

@media (max-width: 921px) {
  body.woocommerce-shop #primary .woocommerce-products-header__title,
  body.post-type-archive-product #primary .woocommerce-products-header__title,
  body.tax-product_cat #primary .woocommerce-products-header__title,
  body.woocommerce-shop #primary .page-title,
  body.post-type-archive-product #primary .page-title,
  body.tax-product_cat #primary .page-title {
    font-size: clamp(2rem, 8vw, 2.6rem) !important;
  }
}


/* ==========================================================
   CNC Parts 2.1.1 — true archive header order + tighter sidebar
   ========================================================== */

/* The archive heading is now rendered as one semantic block by functions.php:
   breadcrumb -> H1 -> description. Hide any duplicate Astra/WooCommerce output. */
body.woocommerce-shop .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header {
  display: none !important;
}

body.woocommerce-shop .cnc-archive-header,
body.post-type-archive-product .cnc-archive-header,
body.tax-product_cat .cnc-archive-header {
  margin: 0 0 26px !important;
  padding: 0 !important;
}

body.woocommerce-shop .cnc-archive-header .woocommerce-breadcrumb,
body.post-type-archive-product .cnc-archive-header .woocommerce-breadcrumb,
body.tax-product_cat .cnc-archive-header .woocommerce-breadcrumb {
  display: block !important;
  margin: 0 0 9px !important;
  padding: 0 !important;
  color: #8b949d !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}

body.woocommerce-shop .cnc-archive-header .woocommerce-breadcrumb a,
body.post-type-archive-product .cnc-archive-header .woocommerce-breadcrumb a,
body.tax-product_cat .cnc-archive-header .woocommerce-breadcrumb a {
  color: #7b858f !important;
  text-decoration: none !important;
}

body.woocommerce-shop .cnc-archive-title,
body.post-type-archive-product .cnc-archive-title,
body.tax-product_cat .cnc-archive-title {
  margin: 0 0 10px !important;
  color: #2d343b !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: clamp(2.2rem, 3.6vw, 3rem) !important;
  font-weight: 750 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
}

body.woocommerce-shop .cnc-archive-description,
body.post-type-archive-product .cnc-archive-description,
body.tax-product_cat .cnc-archive-description {
  max-width: 820px !important;
  margin: 0 !important;
  color: #68737d !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
}

body.woocommerce-shop .cnc-archive-description p,
body.post-type-archive-product .cnc-archive-description p,
body.tax-product_cat .cnc-archive-description p {
  margin: 0 !important;
}

/* Tighter sidebar cards: retain the established sidebar width, only reduce
   blank space around the search and category text. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget,
body.single-product .cnc-catalogue-sidebar .widget {
  margin-bottom: 10px !important;
  padding: 11px 13px !important;
}

body.woocommerce-shop #secondary .cnc-modern-search-widget,
body.post-type-archive-product #secondary .cnc-modern-search-widget,
body.tax-product_cat #secondary .cnc-modern-search-widget,
body.woocommerce-shop #secondary .widget_product_search,
body.post-type-archive-product #secondary .widget_product_search,
body.tax-product_cat #secondary .widget_product_search,
body.single-product .cnc-catalogue-sidebar .cnc-single-search {
  padding: 10px 11px !important;
}

body.woocommerce-shop #secondary .widget_product_categories,
body.post-type-archive-product #secondary .widget_product_categories,
body.tax-product_cat #secondary .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .cnc-single-categories {
  padding: 12px 14px !important;
}

body.woocommerce-shop #secondary .widget-title,
body.post-type-archive-product #secondary .widget-title,
body.tax-product_cat #secondary .widget-title,
body.single-product .cnc-catalogue-sidebar .widget-title {
  margin: 0 0 7px !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
}

body.woocommerce-shop #secondary .product-categories,
body.post-type-archive-product #secondary .product-categories,
body.tax-product_cat #secondary .product-categories,
body.single-product .cnc-catalogue-sidebar .product-categories {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce-shop #secondary .product-categories li > a,
body.post-type-archive-product #secondary .product-categories li > a,
body.tax-product_cat #secondary .product-categories li > a,
body.single-product .cnc-catalogue-sidebar .product-categories li > a,
body.woocommerce-shop #secondary .cnc-category-list-widget li > a,
body.post-type-archive-product #secondary .cnc-category-list-widget li > a,
body.tax-product_cat #secondary .cnc-category-list-widget li > a {
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

body.woocommerce-shop #secondary .product-categories ul.children,
body.post-type-archive-product #secondary .product-categories ul.children,
body.tax-product_cat #secondary .product-categories ul.children,
body.single-product .cnc-catalogue-sidebar .product-categories ul.children {
  margin-top: 0 !important;
  margin-bottom: 3px !important;
}

/* Keep the right column lifted as in 2.1.0, but let the new header block
   control its own spacing. */
@media (min-width: 922px) {
  body.woocommerce-shop #primary,
  body.post-type-archive-product #primary,
  body.tax-product_cat #primary {
    top: -28px !important;
    margin-bottom: -28px !important;
  }
}

/* ============================================================
   CNC Parts 2.2.0 — compact catalogue polish
   Keeps the established column layout and only reduces excess
   whitespace inside sidebar, category cards and product cards.
   ============================================================ */

/* Compact catalogue grid without changing the existing columns. */
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products {
  gap: 18px !important;
  row-gap: 22px !important;
}

/* Category cards: image touches card edges; compact content panel. */
body.woocommerce-shop ul.products li.product-category,
body.post-type-archive-product ul.products li.product-category,
body.tax-product_cat ul.products li.product-category {
  padding: 0 !important;
  overflow: hidden !important;
}

body.woocommerce-shop ul.products li.product-category > a,
body.post-type-archive-product ul.products li.product-category > a,
body.tax-product_cat ul.products li.product-category > a {
  padding: 0 !important;
  margin: 0 !important;
}

body.woocommerce-shop ul.products li.product-category a img,
body.post-type-archive-product ul.products li.product-category a img,
body.tax-product_cat ul.products li.product-category a img {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.woocommerce-shop ul.products li.product-category .woocommerce-loop-category__title,
body.post-type-archive-product ul.products li.product-category .woocommerce-loop-category__title,
body.tax-product_cat ul.products li.product-category .woocommerce-loop-category__title {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 13px 15px 12px !important;
  line-height: 1.28 !important;
}

body.woocommerce-shop ul.products li.product-category .count,
body.post-type-archive-product ul.products li.product-category .count,
body.tax-product_cat ul.products li.product-category .count {
  margin-top: 4px !important;
  line-height: 1.35 !important;
}

body.woocommerce-shop ul.products li.product-category .cnc-category-link,
body.post-type-archive-product ul.products li.product-category .cnc-category-link,
body.tax-product_cat ul.products li.product-category .cnc-category-link,
body.woocommerce-shop ul.products li.product-category .woocommerce-loop-category__title::after,
body.post-type-archive-product ul.products li.product-category .woocommerce-loop-category__title::after,
body.tax-product_cat ul.products li.product-category .woocommerce-loop-category__title::after {
  margin-top: 7px !important;
}

/* Product cards: reduce all internal blank space while preserving equal height. */
body.woocommerce ul.products li.product:not(.product-category),
body.woocommerce-page ul.products li.product:not(.product-category) {
  padding: 0 0 14px !important;
  overflow: hidden !important;
}

body.woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
body.woocommerce-page ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
body.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__link,
body.woocommerce-page ul.products li.product:not(.product-category) .woocommerce-loop-product__link {
  margin: 0 !important;
  padding: 0 !important;
}

body.woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap,
body.woocommerce-page ul.products li.product:not(.product-category) .astra-shop-summary-wrap {
  padding: 12px 14px 0 !important;
}

body.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title,
body.woocommerce-page ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
  margin: 0 0 5px !important;
  padding: 0 !important;
  min-height: 0 !important;
  line-height: 1.32 !important;
}

body.woocommerce ul.products li.product:not(.product-category) .cnc-card-category,
body.woocommerce-page ul.products li.product:not(.product-category) .cnc-card-category {
  margin: 0 0 11px !important;
  line-height: 1.35 !important;
}

body.woocommerce ul.products li.product:not(.product-category) .cnc-inquiry-button,
body.woocommerce-page ul.products li.product:not(.product-category) .cnc-inquiry-button {
  margin: auto 14px 0 !important;
  min-height: 40px !important;
  padding: 9px 13px !important;
}

/* Sidebar cards: tighter edge padding and smaller gap between search/categories. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget,
body.single-product .cnc-catalogue-sidebar .widget {
  margin-bottom: 8px !important;
  padding: 9px 10px !important;
}

body.woocommerce-shop #secondary .cnc-modern-search-widget,
body.post-type-archive-product #secondary .cnc-modern-search-widget,
body.tax-product_cat #secondary .cnc-modern-search-widget,
body.woocommerce-shop #secondary .widget_product_search,
body.post-type-archive-product #secondary .widget_product_search,
body.tax-product_cat #secondary .widget_product_search,
body.single-product .cnc-catalogue-sidebar .cnc-single-search {
  padding: 8px 9px !important;
}

body.woocommerce-shop #secondary .widget_product_categories,
body.post-type-archive-product #secondary .widget_product_categories,
body.tax-product_cat #secondary .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .widget_product_categories,
body.single-product .cnc-catalogue-sidebar .cnc-single-categories {
  padding: 10px 11px !important;
}

body.woocommerce-shop #secondary .product-categories li > a,
body.post-type-archive-product #secondary .product-categories li > a,
body.tax-product_cat #secondary .product-categories li > a,
body.single-product .cnc-catalogue-sidebar .product-categories li > a {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

/* Single product: reduce excess air around gallery and summary. */
body.single-product .cnc-single-product-panel,
body.single-product div.product {
  gap: 22px !important;
}

body.single-product div.product .woocommerce-product-gallery,
body.single-product div.product .summary {
  margin-bottom: 18px !important;
}

body.single-product div.product .summary {
  padding: 18px 20px !important;
}

body.single-product div.product .product_title {
  margin-bottom: 10px !important;
}

body.single-product div.product .woocommerce-product-details__short-description {
  margin: 10px 0 14px !important;
}

body.single-product div.product .product_meta {
  margin-top: 14px !important;
  padding: 12px 14px !important;
}

@media (max-width: 921px) {
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products {
    gap: 14px !important;
  }
}

/* ==========================================================
   CNC Parts 2.2.1 — remove duplicated archive heading output
   Keep only .cnc-archive-header (breadcrumb -> title -> description).
   ========================================================== */
body.woocommerce-shop #primary > .ast-breadcrumbs-wrapper,
body.post-type-archive-product #primary > .ast-breadcrumbs-wrapper,
body.tax-product_cat #primary > .ast-breadcrumbs-wrapper,
body.woocommerce-shop #primary > .woocommerce-breadcrumb,
body.post-type-archive-product #primary > .woocommerce-breadcrumb,
body.tax-product_cat #primary > .woocommerce-breadcrumb,
body.woocommerce-shop #primary > .ast-archive-description,
body.post-type-archive-product #primary > .ast-archive-description,
body.tax-product_cat #primary > .ast-archive-description,
body.woocommerce-shop #primary > header.entry-header,
body.post-type-archive-product #primary > header.entry-header,
body.tax-product_cat #primary > header.entry-header,
body.woocommerce-shop #primary .ast-woo-shop-archive-description,
body.post-type-archive-product #primary .ast-woo-shop-archive-description,
body.tax-product_cat #primary .ast-woo-shop-archive-description,
body.woocommerce-shop #primary .woocommerce-products-header,
body.post-type-archive-product #primary .woocommerce-products-header,
body.tax-product_cat #primary .woocommerce-products-header {
  display: none !important;
}

/* Explicitly preserve our compact archive heading block. */
body.woocommerce-shop #primary .cnc-archive-header,
body.post-type-archive-product #primary .cnc-archive-header,
body.tax-product_cat #primary .cnc-archive-header {
  display: block !important;
}



/* ============================================================
   CNC Parts 2.3.0 — unified WooCommerce catalogue layout
   One container, one sidebar width and one column gap on Shop,
   product-category archives and individual product pages.
   ============================================================ */

:root {
  --cnc-catalogue-width: 1380px;
  --cnc-sidebar-width: 255px;
  --cnc-catalogue-gap: 18px;
  --cnc-catalogue-top: 12px;
}

/* Shared outer width and distance from the site header. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.single-product .site-content > .ast-container,
body.woocommerce-shop #content > .ast-container,
body.post-type-archive-product #content > .ast-container,
body.tax-product_cat #content > .ast-container,
body.single-product #content > .ast-container {
  width: min(var(--cnc-catalogue-width), calc(100% - 40px)) !important;
  max-width: var(--cnc-catalogue-width) !important;
  margin-inline: auto !important;
  padding: var(--cnc-catalogue-top) 0 48px !important;
  box-sizing: border-box !important;
}

/* Archive pages use the same 255px + 18px grid as the product page. */
body.woocommerce-shop .site-content > .ast-container,
body.post-type-archive-product .site-content > .ast-container,
body.tax-product_cat .site-content > .ast-container,
body.woocommerce-shop #content > .ast-container,
body.post-type-archive-product #content > .ast-container,
body.tax-product_cat #content > .ast-container {
  display: grid !important;
  grid-template-columns: var(--cnc-sidebar-width) minmax(0, 1fr) !important;
  column-gap: var(--cnc-catalogue-gap) !important;
  row-gap: 0 !important;
  align-items: start !important;
}

body.woocommerce-shop #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
  grid-column: 1 !important;
  width: var(--cnc-sidebar-width) !important;
  max-width: var(--cnc-sidebar-width) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  align-self: start !important;
}

body.woocommerce-shop #primary,
body.post-type-archive-product #primary,
body.tax-product_cat #primary {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: static !important;
  top: auto !important;
  transform: none !important;
}

/* The custom single-product wrapper now uses exactly the archive grid. */
body.single-product .cnc-single-catalogue-layout {
  display: grid !important;
  grid-template-columns: var(--cnc-sidebar-width) minmax(0, 1fr) !important;
  column-gap: var(--cnc-catalogue-gap) !important;
  row-gap: 0 !important;
  align-items: start !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.single-product .cnc-catalogue-sidebar {
  width: var(--cnc-sidebar-width) !important;
  max-width: var(--cnc-sidebar-width) !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-column: 1 !important;
  align-self: start !important;
}

body.single-product .cnc-single-product-column {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-column: 2 !important;
  align-self: start !important;
}

/* Identical sidebar cards on archives and single products. */
body.woocommerce-shop #secondary .widget,
body.post-type-archive-product #secondary .widget,
body.tax-product_cat #secondary .widget,
body.single-product .cnc-catalogue-sidebar .widget {
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 9px 10px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid var(--cnc-border) !important;
  border-radius: 10px !important;
  box-shadow: 0 5px 20px rgba(18, 38, 53, .06) !important;
}

/* Shared archive header rhythm. */
body.woocommerce-shop .cnc-archive-header,
body.post-type-archive-product .cnc-archive-header,
body.tax-product_cat .cnc-archive-header {
  margin: 0 0 22px !important;
  padding: 0 !important;
}

body.woocommerce-shop .cnc-archive-header .woocommerce-breadcrumb,
body.post-type-archive-product .cnc-archive-header .woocommerce-breadcrumb,
body.tax-product_cat .cnc-archive-header .woocommerce-breadcrumb {
  margin: 0 0 8px !important;
}

body.woocommerce-shop .cnc-archive-title,
body.post-type-archive-product .cnc-archive-title,
body.tax-product_cat .cnc-archive-title {
  margin: 0 0 10px !important;
  color: #27313a !important;
}

body.woocommerce-shop .cnc-archive-description,
body.post-type-archive-product .cnc-archive-description,
body.tax-product_cat .cnc-archive-description,
body.woocommerce-shop .cnc-archive-description p,
body.post-type-archive-product .cnc-archive-description p,
body.tax-product_cat .cnc-archive-description p {
  margin: 0 !important;
}

/* Remove residual Astra padding from the right-hand content wrappers. */
body.woocommerce-shop #primary .site-main,
body.post-type-archive-product #primary .site-main,
body.tax-product_cat #primary .site-main,
body.woocommerce-shop #primary .ast-woocommerce-container,
body.post-type-archive-product #primary .ast-woocommerce-container,
body.tax-product_cat #primary .ast-woocommerce-container,
body.single-product .cnc-single-product-column .site-main,
body.single-product .cnc-single-product-column .woocommerce {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Responsive: same transition point for every WooCommerce view. */
@media (max-width: 1100px) and (min-width: 922px) {
  :root {
    --cnc-sidebar-width: 235px;
    --cnc-catalogue-gap: 16px;
  }
}

@media (max-width: 921px) {
  body.woocommerce-shop .site-content > .ast-container,
  body.post-type-archive-product .site-content > .ast-container,
  body.tax-product_cat .site-content > .ast-container,
  body.single-product .site-content > .ast-container,
  body.woocommerce-shop #content > .ast-container,
  body.post-type-archive-product #content > .ast-container,
  body.tax-product_cat #content > .ast-container,
  body.single-product #content > .ast-container {
    display: block !important;
    width: min(100% - 30px, 760px) !important;
    padding-top: 16px !important;
  }

  body.woocommerce-shop #secondary,
  body.post-type-archive-product #secondary,
  body.tax-product_cat #secondary,
  body.single-product .cnc-catalogue-sidebar {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 20px !important;
  }

  body.single-product .cnc-single-catalogue-layout {
    display: block !important;
  }
}


/* ==========================================================
   CNC Parts 3.0.1 — one breadcrumb only on Shop archives
   Astra can render its breadcrumb outside #primary, so the older scoped
   selectors did not always catch it. Hide every archive breadcrumb first,
   then explicitly restore the breadcrumb generated inside our header.
   ========================================================== */
body.woocommerce-shop .ast-breadcrumbs-wrapper,
body.post-type-archive-product .ast-breadcrumbs-wrapper,
body.tax-product_cat .ast-breadcrumbs-wrapper,
body.woocommerce-shop .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb {
  display: none !important;
}

body.woocommerce-shop .cnc-archive-header > .woocommerce-breadcrumb,
body.post-type-archive-product .cnc-archive-header > .woocommerce-breadcrumb,
body.tax-product_cat .cnc-archive-header > .woocommerce-breadcrumb {
  display: block !important;
}


/* ==========================================================
   CNC Parts 3.1.0 — ordering without online card payments
   Prices and WooCommerce cart controls are visible. Ratings,
   reviews and the single-product quantity field are removed.
   ========================================================== */

/* Price hierarchy on archive cards. */
.woocommerce ul.products li.product .price {
  display: block !important;
  margin: 6px 0 10px !important;
  color: var(--cnc-primary) !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
}

.woocommerce ul.products li.product .price del {
  color: #89939c !important;
  font-weight: 500 !important;
  opacity: .8;
}

.woocommerce ul.products li.product .price ins {
  color: var(--cnc-accent-dark) !important;
  text-decoration: none !important;
}

/* Standard WooCommerce Add to cart button, styled to match the theme. */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.added_to_cart {
  width: 100% !important;
  min-height: 42px !important;
  margin-top: auto !important;
  padding: 11px 15px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: var(--cnc-primary) !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  text-align: center !important;
  box-shadow: none !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.added_to_cart:hover {
  background: var(--cnc-primary-dark) !important;
  color: #fff !important;
}

.woocommerce ul.products li.product .button.loading {
  opacity: .75;
}

/* No ratings or review UI anywhere in the catalogue. */
.woocommerce .star-rating,
.woocommerce-review-link,
.woocommerce-tabs ul.tabs li.reviews_tab,
#reviews,
#review_form_wrapper {
  display: none !important;
}

/* Single-product price and purchase area. */
.single-product div.product .summary .price {
  display: block !important;
  margin: 12px 0 15px !important;
  color: var(--cnc-primary) !important;
  font-size: clamp(24px, 2vw, 31px) !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

.single-product div.product .summary .price del {
  color: #8b949c !important;
  font-size: .72em !important;
  font-weight: 500 !important;
  opacity: .8;
}

.single-product div.product .summary .price ins {
  color: var(--cnc-accent-dark) !important;
  text-decoration: none !important;
}

/* One click adds one item. Quantity can still be changed in the cart. */
.single-product div.product form.cart .quantity {
  display: none !important;
}

.single-product div.product form.cart {
  display: block !important;
  margin: 16px 0 14px !important;
  padding: 0 !important;
}

.single-product div.product form.cart .single_add_to_cart_button {
  width: 100% !important;
  max-width: 360px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 14px 22px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--cnc-accent) !important;
  color: #fff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  text-align: center !important;
  box-shadow: 0 8px 22px rgba(239, 125, 0, .2) !important;
}

.single-product div.product form.cart .single_add_to_cart_button:hover {
  background: var(--cnc-accent-dark) !important;
  color: #fff !important;
}

/* Keep cart and checkout controls readable in the theme palette. */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
  border-radius: 8px !important;
  background: var(--cnc-accent) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover {
  background: var(--cnc-accent-dark) !important;
}


/* ==========================================================
   CNC Parts 3.1.1 — compact single-product summary
   ========================================================== */
.single-product div.product .summary .product_meta.cnc-product-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px 18px !important;
  margin: 8px 0 14px !important;
  padding: 10px 0 !important;
  border-top: 1px solid #e7ecef !important;
  border-bottom: 1px solid #e7ecef !important;
  background: transparent !important;
  color: #6b7780 !important;
  font-size: .9rem !important;
  line-height: 1.45 !important;
}

.single-product div.product .summary .product_meta.cnc-product-meta > span {
  display: inline-flex !important;
  gap: 5px !important;
  align-items: baseline !important;
}

.single-product div.product .summary .product_meta.cnc-product-meta .sku,
.single-product div.product .summary .product_meta.cnc-product-meta .cnc-brand {
  color: #2f3b44 !important;
  font-weight: 700 !important;
}

/* Safety: never show old category/tag metadata or the retired payment panel. */
.single-product div.product .summary .product_meta .posted_in,
.single-product div.product .summary .product_meta .tagged_as,
.single-product .cnc-payment-info {
  display: none !important;
}


/* ==========================================================
   CNC Parts 3.1.3 — stable single-product gallery thumbnails
   ========================================================== */
body.single-product div.product div.images.woocommerce-product-gallery {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}

/* FlexSlider must clip the horizontal slide strip to the visible main image. */
body.single-product .woocommerce-product-gallery .flex-viewport {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

/* Keep the navigation thumbnails inside the gallery column and allow wrapping. */
body.single-product div.product div.images .flex-control-thumbs,
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  clear: both !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.single-product div.product div.images .flex-control-thumbs li,
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li {
  display: block !important;
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.single-product div.product div.images .flex-control-thumbs li img,
body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li img {
  display: block !important;
  width: 100% !important;
  height: 78px !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 4px !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #fff !important;
  border: 1px solid var(--cnc-border) !important;
  border-radius: 7px !important;
  box-sizing: border-box !important;
}

body.single-product div.product div.images .flex-control-thumbs li img.flex-active {
  border-color: var(--cnc-primary) !important;
  box-shadow: 0 0 0 1px var(--cnc-primary) inset !important;
}

@media (max-width: 600px) {
  body.single-product div.product div.images .flex-control-thumbs,
  body.single-product .woocommerce-product-gallery ol.flex-control-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.single-product div.product div.images .flex-control-thumbs li img,
  body.single-product .woocommerce-product-gallery ol.flex-control-thumbs li img {
    height: 70px !important;
  }
}


/* ==========================================================
   CNC Parts 3.1.4 — native FlexSlider geometry
   ========================================================== */

/* FlexSlider must own the wrapper transform and every slide width.
   We only clip the visible viewport and style image contents. */
body.single-product .woocommerce-product-gallery .flex-viewport {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport
  .woocommerce-product-gallery__wrapper {
  max-width: none !important;
  margin-left: 0;
  margin-right: 0;
}

/* Do NOT set width, display, float or transform here. */
body.single-product .woocommerce-product-gallery .flex-viewport
  .woocommerce-product-gallery__image {
  max-width: none !important;
}

body.single-product .woocommerce-product-gallery .flex-viewport
  .woocommerce-product-gallery__image > a {
  display: block !important;
  width: 100% !important;
}
