/*
 * ESTYLUS V3.6
 * Loja editorial + cartões de produto + responsive
 * Sem alterações à lógica WooCommerce
 */

:root {
  --est36-ink: #30251f;
  --est36-muted: #786d66;
  --est36-cream: #f7f3ef;
  --est36-line: #e9e2dc;
  --est36-accent: #a7775f;
}

/* CABEÇALHO DA LOJA E CATEGORIAS */
body.post-type-archive-product .hero-section,
body.tax-product_cat .hero-section,
body.tax-product_tag .hero-section {
  background: #f5f0eb !important;
  padding-block: clamp(44px, 6vw, 90px) !important;
}

body.post-type-archive-product .hero-section .page-title,
body.tax-product_cat .hero-section .page-title,
body.tax-product_tag .hero-section .page-title {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(40px, 5vw, 68px) !important;
  font-weight: 400 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.045em !important;
  color: var(--est36-ink) !important;
}

/* INTRODUÇÃO EDITORIAL */
.est36-shop-intro {
  max-width: 1180px;
  margin: 0 auto 34px;
  padding: 0 20px 30px;
  border-bottom: 1px solid var(--est36-line);
}

.est36-eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--est36-accent);
}

.est36-shop-intro p {
  max-width: 580px;
  margin: 0;
  color: var(--est36-muted);
  font-size: 15px;
  line-height: 1.8;
}

/* ÁREA DOS PRODUTOS */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
  --theme-link-initial-color: var(--est36-ink);
}

body.post-type-archive-product .woocommerce,
body.tax-product_cat .woocommerce,
body.tax-product_tag .woocommerce {
  color: var(--est36-ink);
}

/* CONTADOR E ORDENAÇÃO */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count {
  color: var(--est36-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select {
  min-height: 44px;
  padding-inline: 16px 34px;
  border: 1px solid var(--est36-line) !important;
  border-radius: 2px !important;
  background-color: #fff !important;
  color: var(--est36-ink) !important;
  font-size: 12px !important;
}

/* GRELHA */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products {
  column-gap: 24px !important;
  row-gap: 48px !important;
}

/* CARTÕES */
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
  min-width: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: transform 0.25s ease;
}

body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover,
body.tax-product_tag ul.products li.product:hover {
  transform: translateY(-3px);
}

/* IMAGENS */
body.post-type-archive-product ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.tax-product_tag ul.products li.product img {
  display: block;
  width: 100% !important;
  aspect-ratio: 4 / 5;
  object-fit: contain !important;
  background: #f6f4f2;
  border-radius: 2px;
  transition: filter 0.25s ease;
}

body.post-type-archive-product ul.products li.product:hover img,
body.tax-product_cat ul.products li.product:hover img,
body.tax-product_tag ul.products li.product:hover img {
  filter: brightness(0.975);
}

/* NOMES */
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
  margin-top: 15px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  color: var(--est36-ink) !important;
}

/* PREÇOS */
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price {
  margin-block: 8px 12px !important;
  color: var(--est36-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/* BOTÕES DOS CARTÕES */
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_tag ul.products li.product .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 12px 19px !important;
  background: var(--est36-ink) !important;
  border: 1px solid var(--est36-ink) !important;
  border-radius: 2px !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: background 0.2s ease;
}

body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:hover,
body.tax-product_tag ul.products li.product .button:hover {
  background: #594238 !important;
}

/* PÁGINA INDIVIDUAL DO PRODUTO */
body.single-product .product_title {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: clamp(28px, 3vw, 43px) !important;
  font-weight: 400 !important;
  letter-spacing: -0.035em;
  color: var(--est36-ink) !important;
}

body.single-product .summary .price {
  color: var(--est36-ink) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}

body.single-product .woocommerce-product-gallery img {
  border-radius: 2px;
}

body.single-product form.cart .quantity {
  border-radius: 2px !important;
}

body.single-product form.cart .quantity input {
  color: var(--est36-ink) !important;
}

/* RESPONSIVE */
@media (max-width: 999px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products {
    column-gap: 16px !important;
    row-gap: 32px !important;
  }

  .est36-shop-intro {
    margin-bottom: 26px;
  }
}

@media (max-width: 600px) {
  body.post-type-archive-product .hero-section,
  body.tax-product_cat .hero-section,
  body.tax-product_tag .hero-section {
    padding-block: 38px !important;
  }

  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products {
    column-gap: 12px !important;
    row-gap: 26px !important;
  }

  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
  }

  body.post-type-archive-product ul.products li.product .button,
  body.tax-product_cat ul.products li.product .button,
  body.tax-product_tag ul.products li.product .button {
    min-height: 38px;
    padding: 10px 13px !important;
  }

  .est36-shop-intro {
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.post-type-archive-product ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.tax-product_tag ul.products li.product {
    transition: none;
  }
}
