/* Elementor isolation: zero-specificity target guards preserve native styles; builder-authored elements own their design. */
/* 1.4.0 — Classic catalog only. Structural resets are intentional: native Woo
   percentages/floats must not shrink a card a second time inside CSS Grid. */
body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 --product-loop-columns:var(--km-shop-columns,4);
 --product-effective-columns:var(--product-loop-columns);
 --product-effective-gap:var(--product-grid-gap,24px);
 --product-image-height:var(--product-image-height-desktop,280px);
 display:grid!important;
 grid-template-columns:repeat(auto-fill,minmax(min(100%,max(180px,calc((100% - (var(--product-effective-columns) - 1)*var(--product-effective-gap))/var(--product-effective-columns)))),1fr))!important;
 gap:var(--product-effective-gap)!important;
 list-style:none;padding:0;max-width:100%;min-width:0;
}
body.km-theme :where(.woocommerce.columns-1) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-1,.woocommerce-page.columns-1) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:1}
body.km-theme :where(.woocommerce.columns-2) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-2,.woocommerce-page.columns-2) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:2}
body.km-theme :where(.woocommerce.columns-3) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-3,.woocommerce-page.columns-3) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:3}
body.km-theme :where(.woocommerce.columns-4) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-4,.woocommerce-page.columns-4) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:4}
body.km-theme :where(.woocommerce.columns-5) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-5,.woocommerce-page.columns-5) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:5}
body.km-theme :where(.woocommerce.columns-6) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme:where(.woocommerce.columns-6,.woocommerce-page.columns-6) ul.products[class]:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:6}
body.km-theme ul.products.columns-1:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:1}
body.km-theme ul.products.columns-2:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:2}
body.km-theme ul.products.columns-3:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:3}
body.km-theme ul.products.columns-4:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:4}
body.km-theme ul.products.columns-5:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:5}
body.km-theme ul.products.columns-6:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:6}
body.km-theme .km-commerce>ul.products:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-loop-columns:var(--km-shop-columns,4)}
body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *))::before,
body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *))::after{display:none!important}
body.km-theme ul.products:not(.wc-block-product-template)>li.product:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 float:none!important;clear:none!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;
 box-sizing:border-box;padding:var(--product-card-padding,20px)!important;
 text-align:var(--product-text-align,left);overflow-wrap:anywhere;
 background:var(--km-surface);border-radius:20px;box-shadow:var(--km-small);border:1px solid #fff9e9;
}
body.km-theme ul.products>li.product>a.woocommerce-LoopProduct-link:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)),
body.km-theme ul.products>li.product>a.woocommerce-loop-product__link:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){display:block;min-width:0;max-width:100%}
body.km-theme ul.products>li.product>a>img:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 display:block;box-sizing:border-box;
 width:calc(100% * var(--product-image-scale,1))!important;
 height:calc(var(--product-image-height,280px) * var(--product-image-scale,1))!important;
 max-width:100%!important;max-height:none;object-fit:var(--product-image-fit,contain)!important;object-position:center;
 margin:calc(var(--product-image-height,280px) * (1 - var(--product-image-scale,1)) / 2) auto calc(var(--product-image-height,280px) * (1 - var(--product-image-scale,1)) / 2 + 16px)!important;
 padding:8px;border-radius:14px;background:#e8dfcf;box-shadow:var(--km-inset);
}
body.km-theme ul.products>li.product .woocommerce-loop-product__title:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 font-size:var(--product-title-size,18px)!important;line-height:1.35;white-space:normal;overflow-wrap:anywhere;
 text-align:var(--product-text-align,left);padding:0 0 10px;letter-spacing:normal;
}
body.km-theme ul.products>li.product .price:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){font-size:var(--product-price-size,18px)!important;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-align:var(--product-text-align,left);color:var(--km-navy)}
body.km-theme ul.products>li.product :is(a.button,button.button):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.4;padding:12px min(18px,8%);font-size:14px}
body.km-theme ul.products>li.product .star-rating:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){max-width:100%}
/* Product blocks retain their own column and typography decisions. This explicit
   opt-in is limited to catalog images; never cart/checkout/order-summary media. */
body.kmn-product-block-images :is(.wc-block-grid__products,.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-image-height:var(--product-image-height-desktop,280px)}
body.kmn-product-block-images :is(.wc-block-grid__products .wc-block-grid__product-image,.wc-block-product-template .wc-block-components-product-image):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 height:var(--product-image-height,280px)!important;aspect-ratio:auto!important;max-width:100%;min-width:0;display:flex;align-items:center;justify-content:center;
}
body.kmn-product-block-images :is(.wc-block-grid__products .wc-block-grid__product-image,.wc-block-product-template .wc-block-components-product-image)>a:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){display:flex;align-items:center;justify-content:center;height:100%;width:100%;max-width:100%}
body.kmn-product-block-images :is(.wc-block-grid__products .wc-block-grid__product-image,.wc-block-product-template .wc-block-components-product-image) img:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){
 width:calc(100% * var(--product-image-scale,1))!important;height:calc(var(--product-image-height,280px) * var(--product-image-scale,1))!important;max-width:100%!important;max-height:100%;object-fit:var(--product-image-fit,contain)!important;object-position:center;margin:auto;
}
@media(max-width:1024px) and (min-width:601px){
 body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-effective-columns:min(var(--product-loop-columns),var(--km-shop-tablet-columns,4));--product-image-height:var(--product-image-height-tablet,220px)}
 body.kmn-product-block-images :is(.wc-block-grid__products,.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-image-height:var(--product-image-height-tablet,220px)}
}
@media(max-width:600px){
 body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-effective-columns:min(var(--product-loop-columns),var(--km-shop-mobile-columns,2));--product-image-height:var(--product-image-height-mobile,280px);--product-image-scale:var(--product-image-scale-mobile,1);--product-effective-gap:min(var(--product-grid-gap,24px),16px)}
 body.km-theme ul.products:not(.wc-block-product-template)>li.product:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){padding:min(var(--product-card-padding,20px),14px)!important}
 body.kmn-product-block-images :is(.wc-block-grid__products,.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-image-height:var(--product-image-height-mobile,280px);--product-image-scale:var(--product-image-scale-mobile,1)}
}
@media(max-width:380px){body.km-theme ul.products:not(.wc-block-product-template):where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){--product-effective-columns:1}}

/* Preserve saved percentage values, but keep the shop readable on small screens.
   The minimum never exceeds the actual containing width. Other pages are untouched. */
@media(max-width:600px){body.km-theme.km-central-percent>main.km-commerce:where(:not(.elementor, .elementor *, .kma-pb-section, .kma-pb-section *, .vc_row, .vc_row *, .vc_section, .vc_section *, .wpb_content_element, .wpb_content_element *, .wpb_wrapper, .wpb_wrapper *, .vc_ui-panel, .vc_ui-panel *)){min-width:min(100%,320px)}}

/* 1.5.15: only catalog thumbnails in Elementor's standard Woo widgets.
   Do not target single-product galleries, arbitrary Image widgets, or loop builders.
   Keep the whole image and its aspect ratio; never crop or transform the scissors. */
@media(max-width:600px){
 body.km-theme :is(.elementor-widget-woocommerce-products,.elementor-widget-woocommerce-archive-products) ul.products > li.product > a:is(.woocommerce-LoopProduct-link,.woocommerce-loop-product__link) > img{
  display:block;box-sizing:border-box;
  width:calc(100% * var(--product-image-scale-mobile,1))!important;
  height:calc(var(--product-image-height-mobile,280px) * var(--product-image-scale-mobile,1))!important;
  max-width:100%!important;max-height:none!important;
  object-fit:contain!important;object-position:center;
  margin-left:auto!important;margin-right:auto!important;
 }
}
