/* Dedicated catalogue quote controls; BA floating WhatsApp remains independent. */
body a.bcn-quote-button,
body button.bcn-quote-button,
#bcn-catalogo-v1 .bcn-quote-button,
.woocommerce a.bcn-quote-button,
.woocommerce button.bcn-quote-button {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: .55em;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: .75em 1em;
  border: 1px solid #0e7049;
  border-radius: 7px;
  background: #117647;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  cursor: pointer;
}

body .bcn-quote-button svg {
  display: inline-block;
  width: 1.28em;
  height: 1.28em;
  flex: 0 0 1.28em;
  fill: currentColor;
}

body .bcn-quote-button:is(:hover, :active),
#bcn-catalogo-v1 .bcn-quote-button:is(:hover, :active) {
  background: #0b613b;
  border-color: #095b37;
  color: white;
  text-decoration: none;
}

body .bcn-quote-button:focus-visible {
  outline: 3px solid #173d68;
  outline-offset: 3px;
}

#bcn-catalogo-v1 :is(.bcn-product-card, .bcn-i-product) > .bcn-quote-button {
  align-self: stretch;
  margin: 12px 14px 0;
  font-size: 15px;
}

.woocommerce ul.products li.product > .bcn-quote-button,
.wc-block-product > .bcn-quote-button,
.wc-block-components-product-image + .bcn-quote-button {
  width: 100%;
  margin: 8px 0 12px;
}

@media (max-width: 520px) {
#bcn-catalogo-v1 :is(.bcn-product-card, .bcn-i-product) > .bcn-quote-button {
    margin-inline: 10px;
  }
}

.bcn-quote-detail {
  box-sizing: border-box;
  clear: both;
  width: 100%;
  margin: 16px 0 22px;
  text-align: left;
}

.bcn-quote-detail .bcn-quote-button {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
}

.bcn-quote-variant-label {
  display: block;
  margin: 0 0 7px;
  color: #193a50;
  font-weight: 650;
}

.bcn-quote-detail .bcn-quote-variant-select {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 8px 30px 8px 10px;
  border: 1px solid #87a0ae;
  border-radius: 6px;
  background-color: #fff;
  color: #17374c;
  font-size: 16px;
}

.bcn-quote-detail-status {
  margin: 8px 0 0;
  color: #274457;
  font-size: 14px;
  line-height: 1.45;
}

.bcn-quote-detail-status:empty { display: none; }

.woocommerce div.product .bcn-quote-gallery-column {
  float: left;
  width: 48%;
  margin: 0 0 2em;
}

.woocommerce div.product .bcn-quote-gallery-column div.images {
  float: none;
  width: 100%;
  margin: 0;
}

@media (max-width: 768px) {
.woocommerce div.product .bcn-quote-gallery-column {
    float: none;
    width: 100%;
  }
}

.bcn-quote-detail > .bcn-quote-button + #bcn-quote-variants {
  margin-top: 12px;
  scroll-margin-block-start: 80px;
}

body.search.woocommerce .elementor-location-archive ul.products li.product > a.woocommerce-loop-product__link:has(+ .bcn-quote-button) img[data-bcn-optical] {
  transform: none !important;
}

body.search.woocommerce .elementor-location-archive .elementor-column:has(.yith-wcan-filters) > .elementor-widget-wrap {
  min-width: 0;
}

body.search.woocommerce .elementor-location-archive .yith-wcan-filters ul.filter-items {
  margin-inline: 0;
}

body.search.woocommerce .elementor-location-archive .elementor-widget-wc-categories li.product-category {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) and (max-width: 1024px) {
body.search.woocommerce .elementor-location-archive .elementor-products-grid ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bcn-card-media {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

#bcn-catalogo-v1 :is(.bcn-product-card, .bcn-i-product) .bcn-product-img:has(.bcn-card-media),
.woocommerce ul.products li.product a:has(> .bcn-card-media),
.wc-block-components-product-image a:has(> .bcn-card-media),
.wc-block-grid__product-image:has(> .bcn-card-media) {
  display: grid;
  box-sizing: border-box;
  place-items: center;
  width: 100%;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  aspect-ratio: 1.2 !important;
  height: auto !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden;
  background: #fff;
}

#bcn-catalogo-v1 .bcn-product-img .bcn-card-media > img.bcn-verified-photo,
body.woocommerce ul.products li.product .bcn-card-media > img.bcn-verified-photo,
.wc-block-grid__product .bcn-card-media > img.bcn-verified-photo,
.wc-block-product .bcn-card-media > img.bcn-verified-photo {
  display: block !important;
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  padding: 5px !important;
  margin: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}

.bcn-photo-missing {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 18px;
  border: 1px solid #c6d3dc;
  border-radius: 6px;
  background: #f4f7f9;
  color: #3b5262;
  font-family: inherit;
  font-size: clamp(.875rem, 1.5vw, 1rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

#bcn-catalogo-v1 :is(.bcn-product-card, .bcn-i-product) > .bcn-quote-button {
  margin-top: 8px;
}

.woocommerce ul.products li.product > .bcn-quote-button,
.wc-block-product > .bcn-quote-button,
.wc-block-components-product-image + .bcn-quote-button { margin-top: 7px; }

.single-product .elementor-location-single .woocommerce-product-gallery:has(.bcn-verified-slide, .bcn-detail-missing) {
  margin-bottom: 0 !important;
}

.single-product .elementor-location-single .woocommerce-product-gallery .bcn-verified-slide > a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 4px !important;
  background: #fff;
}

.single-product .elementor-location-single .woocommerce-product-gallery .bcn-verified-slide > a > img.bcn-verified-photo {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(66vh, 540px) !important;
  max-height: min(66svh, 540px) !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  transform: none !important;
  margin: 0 !important;
}

.single-product .elementor-location-single .woocommerce-product-gallery .bcn-detail-missing {
  width: 100%;
  height: clamp(150px, 29vh, 262px);
}

.single-product .elementor-location-single .woocommerce-product-gallery:has(.bcn-detail-missing) > .woocommerce-product-gallery__trigger { display: none; }

.single-product .elementor-location-single .bcn-quote-detail {
  margin-top: 10px;
}

@media (max-width: 767px) {
body.page-id-13002 .elementor-element.elementor-element-18695206:has(#bcn-catalogo-v1) > .elementor-widget-container {
    margin-top: 21px !important;
  }
}

@media (min-width: 1025px) and (max-height: 800px) {
.single-product .elementor-location-single .woocommerce-product-gallery .bcn-verified-slide > a > img.bcn-verified-photo {
    max-height: min(66vh, 540px, max(220px, calc(100vh - 302px))) !important;
    max-height: min(66svh, 540px, max(220px, calc(100svh - 302px))) !important;
  }
}

.single-product .elementor-location-single .woocommerce-product-gallery.bcn-variant-without-photo > :not([data-bcn-missing-selection]) {
  display: none !important;
}

.single-product .elementor-location-single .woocommerce-product-gallery .bcn-quote-photo-caption {
  margin: .4rem 0 0;
  font-size: .875rem;
  line-height: 1.4;
}
