/* ==========================================================
 * Aromatto — responsividade e padronização global de imagens
 * Este arquivo é carregado após o tema para funcionar como override.
 * ========================================================== */

/* ---------- Página individual do perfume ---------- */
.single-product {
  --aromatto-single-gallery-size: clamp(300px, min(30vw, 44vh), 440px);
}

.single-product .woocommerce-product-gallery {
  width: min(100%, var(--aromatto-single-gallery-size)) !important;
  max-width: var(--aromatto-single-gallery-size) !important;
  margin-inline: auto !important;
}

.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery__image > a {
  width: 100% !important;
}

.single-product .woocommerce-product-gallery__image {
  display: grid !important;
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  place-items: center !important;
  overflow: hidden !important;
}

.single-product .woocommerce-product-gallery__image > a {
  display: grid !important;
  height: 100% !important;
  place-items: center !important;
}

.single-product .woocommerce-product-gallery__image img:not(.zoomImg) {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 84% !important;
  max-height: 84% !important;
  margin: auto !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

.single-product .summary .product_title {
  font-size: clamp(30px, 3vw, 48px) !important;
  line-height: 1.08 !important;
}

.single-product .aromatto-single-product-brand {
  margin-top: 2px !important;
  margin-bottom: clamp(14px, 2vw, 22px) !important;
}

.single-product .woocommerce-breadcrumb {
  font-size: clamp(11px, .9vw, 13px) !important;
}

/* Notebook / telas médias: prioridade para mostrar imagem + dados sem rolagem excessiva. */
@media (max-width: 1536px) and (min-width: 1025px) {
  .single-product {
    --aromatto-single-gallery-size: clamp(310px, min(27vw, 42vh), 390px);
  }

  .single-product .woocommerce-product-gallery__image img:not(.zoomImg) {
    max-width: 82% !important;
    max-height: 82% !important;
  }
}

@media (max-width: 1280px) and (min-width: 1025px) {
  .single-product {
    --aromatto-single-gallery-size: clamp(290px, min(26vw, 40vh), 350px);
  }

  .single-product .summary .product_title {
    font-size: clamp(29px, 3.1vw, 40px) !important;
  }
}

/* Tablet: imagem volta a ganhar um pouco de largura porque o layout tende a empilhar. */
@media (max-width: 1024px) {
  .single-product {
    --aromatto-single-gallery-size: min(72vw, 380px);
  }

  .single-product .woocommerce-product-gallery__image img:not(.zoomImg) {
    max-width: 84% !important;
    max-height: 84% !important;
  }
}

@media (max-width: 689px) {
  .single-product {
    --aromatto-single-gallery-size: min(86vw, 330px);
  }

  .single-product .woocommerce-product-gallery__image img:not(.zoomImg) {
    max-width: 86% !important;
    max-height: 86% !important;
  }

  .single-product .summary .product_title {
    font-size: clamp(28px, 9vw, 36px) !important;
  }
}

@media (max-width: 420px) {
  .single-product {
    --aromatto-single-gallery-size: min(88vw, 290px);
  }
}

/* ---------- Catálogo ---------- */
.aromatto-catalog-card__media {
  min-height: clamp(190px, 20vw, 255px) !important;
  padding: clamp(16px, 2vw, 24px) !important;
}

.aromatto-catalog-card__media img {
  width: auto !important;
  height: auto !important;
  max-width: min(78%, 210px) !important;
  max-height: 210px !important;
  margin: auto !important;
  object-fit: contain !important;
}

@media (max-width: 1200px) {
  .aromatto-catalog-card__media {
    min-height: 205px !important;
  }

  .aromatto-catalog-card__media img {
    max-width: min(76%, 185px) !important;
    max-height: 185px !important;
  }
}

@media (max-width: 689px) {
  .aromatto-catalog-card__media {
    min-height: 190px !important;
  }

  .aromatto-catalog-card__media img {
    max-width: min(72%, 170px) !important;
    max-height: 170px !important;
  }
}

/* ---------- Produtos da Home ---------- */
.aromatto-product-card__media {
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
}

.aromatto-product-card__media img {
  width: auto !important;
  height: auto !important;
  max-width: 74% !important;
  max-height: 74% !important;
  margin: auto !important;
  padding: 0 !important;
  object-fit: contain !important;
}

/* ---------- Grades padrão do WooCommerce (fallback) ---------- */
.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
  width: 100% !important;
  height: clamp(180px, 20vw, 260px) !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Compartilhável mantém a identidade verde usada anteriormente no Unissex. */
body.tax-product_cat.term-unissex .aromatto-catalog__kicker {
  color: #708261 !important;
}

/* Evita overflow horizontal em telas pequenas. */
@media (max-width: 689px) {
  .single-product,
  .aromatto-catalog,
  .aromatto-home {
    overflow-x: clip;
  }
}
