/* necofarma restore overrides — static-site fixes */
html, body { overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }

/* de-linked / informational badges (former add-to-cart) */
.ck-info-badge {
  display: inline-block;
  padding: .55em 1.1em;
  background: #2d8a4e;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
}
a[data-delinked="1"] { cursor: default; }

/* keep images responsive (Shoptimizer/WooCommerce) */
img { max-width: 100%; height: auto; }

/* wrap any wide product/spec table on mobile */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { max-width: 100%; }

/* ensure tap targets reasonable */
@media (max-width: 768px) {
  a, button, .ck-info-badge { min-height: 24px; }
  body { font-size: 16px; }
}

/* hide any leftover empty cart/account widgets */
.site-search, .header-search, .widget_shopping_cart_content,
.cart-contents, .ckit-cart-popup, .commercekit-ajax-search,
form.woocommerce-cart-form, .single_add_to_cart_button,
.quantity, .added_to_cart { display: none !important; }

/* ===== Main-content product grids (Elementor [products]) — center + align to a clean grid ===== */
/* scoped to Elementor shortcode grids so the nav mega-menu product lists are untouched */
.elementor-shortcode .woocommerce ul.products,
.elementor-widget-container .woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 26px;
  margin: 0 auto !important;
  padding: 0 !important;
  list-style: none;
  justify-items: stretch;
  float: none !important;
}
.elementor-shortcode .woocommerce ul.products li.product,
.elementor-widget-container .woocommerce ul.products li.product {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column;
}
/* uniform square thumbnails (contain so jars/boxes aren't cropped), image on top */
.elementor-shortcode .woocommerce ul.products li.product .woocommerce-image__wrapper {
  margin: 0 auto 14px;
  width: 100%;
}
.elementor-shortcode .woocommerce ul.products li.product img {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
}
/* keep titles/prices aligned along the bottom of each cell */
.elementor-shortcode .woocommerce ul.products li.product .woocommerce-card__header {
  margin-top: auto;
}
.elementor-shortcode .woocommerce ul.products li.product .woocommerce-loop-product__title,
.elementor-shortcode .woocommerce ul.products li.product .price {
  text-align: center !important;
  width: 100%;
}
@media (max-width: 768px) {
  .elementor-shortcode .woocommerce ul.products,
  .elementor-widget-container .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
}
@media (max-width: 480px) {
  .elementor-shortcode .woocommerce ul.products,
  .elementor-widget-container .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* ===== Center the restored hero heading ===== */
.restored-page-h1 {
  text-align: center !important;
  max-width: 1100px;
  margin: 0.5em auto 0.7em;
  padding: 0 20px;
}

/* ===== Brand-logos media-carousel -> static centered strip (Swiper lazy never runs on static) ===== */
.elementor-widget-media-carousel .swiper-lazy-preloader { display: none !important; }
.elementor-widget-media-carousel .elementor-main-swiper,
.elementor-widget-media-carousel .swiper-container,
.elementor-widget-media-carousel .elementor-swiper { overflow: visible !important; }
.elementor-widget-media-carousel .swiper-wrapper {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 26px 40px;
  transform: none !important;
  height: auto !important;
  width: 100% !important;
}
.elementor-widget-media-carousel .swiper-slide {
  width: auto !important;
  flex: 0 0 auto;
  margin: 0 !important;
  height: auto !important;
}
.elementor-widget-media-carousel .elementor-carousel-image {
  width: 130px;
  height: 78px;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
/* arrows/pagination are meaningless once it's a static strip */
.elementor-widget-media-carousel .elementor-swiper-button,
.elementor-widget-media-carousel .swiper-pagination { display: none !important; }

/* ===== Category / shop archive product grid -> same clean centered grid (nav mega-menu is outside <main>, so safe) ===== */
.site-main ul.products,
#primary ul.products,
.shoptimizer-archive ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px 26px;
  margin: 0 auto !important;
  padding: 0 !important;
  list-style: none;
  float: none !important;
}
.site-main ul.products li.product,
#primary ul.products li.product {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column;
  position: relative;
}
.site-main ul.products li.product .woocommerce-image__wrapper { margin: 0 auto 14px; width: 100%; }
.site-main ul.products li.product img {
  width: 100% !important;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
}
.site-main ul.products li.product .woocommerce-card__header { margin-top: auto; }
.site-main ul.products li.product .woocommerce-loop-product__title,
.site-main ul.products li.product .price { text-align: center !important; width: 100%; }
/* sale badge anchored top-left inside the card (was floating/overlapping titles) */
.site-main ul.products li.product .onsale {
  position: absolute !important;
  top: 8px; left: 8px; right: auto;
  margin: 0 !important;
  z-index: 2;
}
@media (max-width: 768px) {
  .site-main ul.products, #primary ul.products { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }
}
@media (max-width: 480px) {
  .site-main ul.products, #primary ul.products { grid-template-columns: 1fr; }
}

/* ===== Reveal Elementor entrance-animation content (waypoint JS never runs on static) ===== */
/* without this, animated CTAs / quotes / trust-badges stay opacity:0 and leave tall empty bands */
.elementor-invisible {
  visibility: visible !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}
