/*
Theme Name: Andes Maker V10
Theme URI: https://andesmaker.cl/
Author: Andes Maker
Author URI: https://andesmaker.cl/
Description: Tema V10 de Andes Maker: servicios CNC y productos del taller, preparado para WooCommerce, Yoast SEO y los plugins Andes.
Version: 0.3.31
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: andes-base
License: Proprietary
*/

.legal-page {
  width: min(100%, 820px);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.legal-page__status {
  margin: 0 0 2rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid #c2853c;
  background: #fff8ea;
}

.legal-page h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.legal-page h3 {
  margin-top: 1.8rem;
  font-size: 1.08rem;
}

.legal-page p,
.legal-page li {
  max-width: 72ch;
  line-height: 1.75;
}

.legal-page li + li {
  margin-top: .5rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  margin-top: .8rem;
  font-size: .75rem;
}

.wp-catalog {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: #f4f1ec;
  color: #1a1a1a;
}

.wp-catalog-head {
  display: grid;
  grid-template-columns: .75fr 1fr;
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  margin-bottom: 3rem;
}

.wp-catalog-head h2 { margin-bottom: 0; }
.wp-catalog-note { max-width: 58ch; color: #625e57; }
.wp-catalog .woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0; }
.wp-catalog .woocommerce ul.products::before,
.wp-catalog .woocommerce ul.products::after { display: none; }
.wp-catalog .woocommerce ul.products li.product { float: none; width: auto; margin: 0; padding: 0 0 1.3rem; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d6cfc4; border-radius: 14px; background: #fffdf8; }
.wp-catalog .woocommerce ul.products li.product a img { aspect-ratio: 1 / 1; margin: 0 0 1rem; object-fit: cover; }
.wp-catalog .woocommerce ul.products li.product .woocommerce-LoopProduct-link { display: flex; flex: 1; flex-direction: column; }
.wp-catalog .woocommerce ul.products li.product .woocommerce-loop-product__title,
.wp-catalog .woocommerce ul.products li.product .price { padding-inline: 1rem; }

/* content-pages.css define `h2 { max-width: 12ch; font-size: clamp(2.35rem,5.2vw,4.8rem) }`
   para los titulares grandes de las páginas de contenido. WooCommerce emite el título de
   cada producto del catálogo como <h2>, así que heredaba ese ancho de 12 caracteres y el
   nombre caía en columna, una palabra por línea. Se devuelve a tamaño de tarjeta. */
.wp-catalog .woocommerce ul.products li.product .woocommerce-loop-product__title {
  max-width: none;
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
}
.wp-catalog .woocommerce ul.products li.product .price { margin-top: auto; }
.wp-catalog .woocommerce ul.products li.product .button {
  display: inline-flex; width: calc(100% - 2rem); min-height: 2.9rem;
  align-items: center; justify-content: center; margin: .8rem 1rem 0; padding: .7rem 1rem;
  border: 0; border-radius: 7px; background: #aeed11; color: #17120c;
  font-weight: 800; line-height: 1.2; text-align: center;
}
.wp-catalog .woocommerce ul.products li.product .button.added { display: none !important; }
.wp-catalog .woocommerce ul.products li.product a.added_to_cart.wc-forward {
  display: inline-flex; width: calc(100% - 2rem); min-height: 2.75rem;
  align-items: center; justify-content: center; margin: .55rem 1rem 0; padding: .65rem .9rem;
  border: 1px solid #171714; border-radius: 7px; background: #171714;
  color: #f8f4ed; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none;
  box-sizing: border-box;
}
.wp-catalog .woocommerce ul.products li.product a.added_to_cart.wc-forward:hover {
  background: #2f2c27; color: #fff;
}
.wp-catalog .woocommerce ul.products li.product .onsale {
  top: .75rem; right: .75rem; left: auto; min-width: 0; min-height: 0;
  padding: .42rem .68rem; border: 1px solid rgba(23,18,12,.18); border-radius: 999px;
  background: #aeed11; color: #17120c; box-shadow: 0 6px 18px rgba(16,16,14,.18);
  font-size: .64rem; font-weight: 900; line-height: 1; letter-spacing: .06em; text-transform: uppercase;
}

/* Botón flotante de WhatsApp: mismo lenguaje oscuro + lima en snapshots y WooCommerce. */
#ht-ctc-chat {
  max-width: min(16.5rem, calc(100vw - 1.5rem)) !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#ht-ctc-chat a,
.joinchat .joinchat__button,
.qlwapp .qlwapp-toggle {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: min(16.5rem, calc(100vw - 1.5rem)) !important;
  min-height: 2.8rem !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .55rem !important;
  padding: .65rem 1rem !important;
  border: 1px solid rgba(174, 237, 17, .58) !important;
  border-radius: 999px !important;
  background: #171714 !important;
  color: #f8f4ed !important;
  box-shadow: 0 12px 28px rgba(16, 16, 14, .28) !important;
  font-family: "Montserrat", system-ui, sans-serif !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}
#ht-ctc-chat :is(svg, path),
.joinchat .joinchat__button :is(svg, path),
.qlwapp .qlwapp-toggle :is(svg, path) {
  fill: #aeed11 !important;
  color: #aeed11 !important;
}

a.andes-snapshot-cart {
  display: inline-flex; min-height: 2.65rem; align-items: center; gap: .45rem;
  padding: .55rem .7rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  color: #f8f4ed !important; font-size: .76rem; font-weight: 700; text-decoration: none;
}
a.andes-snapshot-cart:hover { border-color: #aeed11; color: #fff !important; }
a.andes-snapshot-cart .cart-count {
  display: inline-grid; min-width: 1.45rem; height: 1.45rem; place-items: center; padding: 0 .3rem;
  border-radius: 999px; background: #aeed11; color: #17120c;
  font-size: .65rem; font-weight: 900; line-height: 1;
}
.wp-catalog-empty { padding: 1.4rem; border: 1px solid #d6cfc4; background: #fffdf8; }

/* La vitrina de la Tienda ahora enlaza a cada producto; el enlace no debe cambiar el
   layout ni pintar el texto de azul. */
.collection-strip .collection-link { display: block; color: inherit; text-decoration: none; }
.collection-strip .collection-link:hover img { transform: translateY(-4px); }
.collection-strip .collection-link img { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.collection-strip .collection-link:hover figcaption strong { text-decoration: underline; text-underline-offset: 3px; }

/* Navegación por categorías dentro del snapshot de la tienda.
   Duplica a propósito lo de assets/shop.css: esa hoja está anclada en
   `.andes-chrome` y el snapshot no lleva esa clase. */
.wp-catalog .shop-toolbar {
  display: flex; flex-wrap: wrap; gap: 1.4rem;
  align-items: center; justify-content: space-between;
  padding: 1.2rem 0; margin-bottom: 2rem;
  border-top: 1px solid #d6cfc4; border-bottom: 1px solid #d6cfc4;
}
.wp-catalog .shop-cats { display: flex; flex-wrap: wrap; gap: .5rem; }
.wp-catalog .shop-cats a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem;
  border: 1px solid #d6cfc4; border-radius: 999px;
  background: #fffdf8; color: #1a1a1a;
  font-size: .86rem; text-decoration: none;
}
.wp-catalog .shop-cats a:hover { border-color: #85621d; }
.wp-catalog .shop-cats a[aria-current="true"] { border-color: transparent; background: #171714; color: #f8f4ed; }
.wp-catalog .shop-cats .cat-count { font-size: .65rem; color: #625e57; }
.wp-catalog .shop-cats a[aria-current="true"] .cat-count { color: #cbc7bf; }

.wp-catalog .woocommerce-result-count { margin: 0; color: #625e57; font-size: .86rem; }
.wp-catalog .woocommerce-ordering select {
  padding: .55rem .8rem; border: 1px solid #d6cfc4; border-radius: 6px; background: #fffdf8;
}
.wp-catalog .woocommerce-pagination { margin-top: 2.4rem; }
.wp-catalog .woocommerce-pagination ul {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; border: 0; list-style: none;
}
.wp-catalog .woocommerce-pagination li { margin: 0; border: 0; }
.wp-catalog .woocommerce-pagination a,
.wp-catalog .woocommerce-pagination span {
  display: inline-flex; min-width: 2.75rem; min-height: 2.75rem;
  align-items: center; justify-content: center; padding: 0 .6rem;
  border: 1px solid #d6cfc4; border-radius: 6px; background: #fffdf8; text-decoration: none;
}
.wp-catalog .woocommerce-pagination .current { border-color: transparent; background: #171714; color: #f8f4ed; }

@media (max-width: 900px) {
  .wp-catalog .shop-toolbar { flex-direction: column; align-items: flex-start; }

  .wp-catalog-head { grid-template-columns: 1fr; }
  .wp-catalog .woocommerce ul.products { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .wp-catalog .woocommerce ul.products { grid-template-columns: 1fr; }
}
