/*!
Theme Name: andarurales
Theme URI: https://andarurales.com
Description: Es un theme a medida para el proyecto Andarurales
Version: 0.1.0
Author: SEO13
Author URI: https://seo13.es
Text Domain: andarurales
Requires at least: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

andarurales is based on _tw https://underscoretw.com/, (C) 2021-2025 Greg Sullivan
_tw is distributed under the terms of the GNU GPL v2 or later.

_tw is based on Underscores https://underscores.me/ and Varia https://github.com/Automattic/themes/tree/master/varia, (C) 2012-2025 Automattic, Inc.
Underscores and Varia are distributed under the terms of the GNU GPL v2 or later.
*/

/*COLORES*/
.verde-oscuro{
	color:#274c30;
}
.verde-claro{
	color:#7b8d37;
}
.amarillo{
	color:#f6bf39;
}
.icon-amarillo { color: #f6bf39; }

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product{
	width:auto!important;
}
  /* Ajustes visuales rápidos (puedes moverlo a tu CSS del tema) */
  .hover-lift { transition: transform .25s ease, box-shadow .25s ease; }
  .hover-lift:hover { transform: translateY(-4px); }
  .shadow-card { box-shadow: 0 6px 24px rgba(0,0,0,.08); }

  /* Colores corporativos (clases de apoyo) */
  .bg-verde-oscuro { background-color: #274c30; }
  .bg-verde-claro { background-color: #7b8d37; }
  .bg-amarillo { background-color: #f6bf39; }
  .text-verde-oscuro { color: #274c30; }
  .text-verde-claro { color: #7b8d37; }
  .text-amarillo { color: #f6bf39; }

  /* Botones */
  .btn-andar {
    display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
    padding:.875rem 1.25rem; border-radius:1rem; font-weight:600; border:1px solid transparent;
    transition: all .2s ease;
  }
  .btn-outline-andar {
    border-color:#274c30; color:#274c30; background:transparent;
  }
  .btn-outline-andar:hover { background:#274c30; color:#fff; }
  .btn-primario-andar { background:#f6bf39; color:#274c30; }
  .btn-primario-andar:hover { filter:brightness(.95); }
  .btn-secundario-andar { color:#fff; background:#274c30; }
  .btn-secundario-andar:hover { filter:brightness(.95); }

  /* Gradiente corporativo (valor) */
  .grad-anda {
    background: linear-gradient(135deg, #7b8d37 0%, #274c30 100%);
    color:#ffffff;
  }

/* TARJETA COMPRA*/
/* Píldoras de importe */
.ar-card-tarjeta .ar-importe-pills .ar-pill {
  border-color: #e5e7eb; /* slate-200 */
  background: #fff;
  font-weight: 600;
  border-width: 1px;
  border-style: solid;
  line-height: 1.25rem;
  min-width: 72px;
  text-align: center;
  border-radius: 12px;
}
.ar-card-tarjeta .ar-importe-pills .ar-pill[data-active="true"] {
  background: #4f46e5; /* indigo-600 */
  color: #fff;
  border-color: #4f46e5;
}

/* Botón de compra "grande" */
.ar-card-tarjeta form.cart .single_add_to_cart_button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  border-radius: 12px;
  font-weight: 700;
  background: #4f46e5;      /* indigo-600 */
  color: #fff;
  border: none;
}
.ar-card-tarjeta form.cart .single_add_to_cart_button:hover {
  background: #4338ca;      /* indigo-700 */
}

/* Oculta el "cantidad" si algún tema lo muestra pese al filtro */
.ar-card-tarjeta .quantity { display: none !important; }

/* Separadores sutiles (ya usas <hr>, esto refuerza) */
.ar-card-tarjeta hr { border-color: #e5e7eb; }

  /* 1) Ocultar "Limpiar" y el label del atributo */
  form.variations_form .reset_variations{ display:none !important; }
  form.variations_form table.variations td.label{ display:none !important; }

  /* 2) Botón de comprar (estilo mockup) */
  .single_add_to_cart_button{
    width:100%;
    height:44px;
    border-radius:12px;
    font-weight:700;
    background:#6D4BC1 !important;      /* morado */
    border-color:#6D4BC1 !important;
    color:#fff !important;
    box-shadow:0 2px 0 rgba(0,0,0,.06);
  }
  .single_add_to_cart_button:hover:not(.disabled){
    filter:brightness(.95);
  }
  .single_add_to_cart_button.disabled{
    opacity:.6;
    cursor:not-allowed;
  }

  /* 3) Precio de la variación seleccionada */
  .single_variation .price{
    color:#9FA60F !important;            /* dorado/verde según mockup */
    font-weight:700;
    font-size:1.625rem;                  /* ~26px */
    margin:10px 0 6px;
    display:block;
  }

  /* (opcional) ocultar selector de cantidad si no lo usas */
  form.variations_form .quantity{ display:none !important; }

  /* (opcional) separadores dentro de la tarjeta */
  .wc-variation-selection-needed + .single_variation_wrap{ margin-top:.25rem; }
/*BOTON*/
.single_add_to_cart_button {
	background-color: #274c30!important;
}
.ar-card-tarjeta .ar-importe-pills .ar-pill[data-active="true"] {
	background: #f6bf39!important;
    color: #fff;
    border-color: #f6bf39!important;
}
.woocommerce-checkout #payment {
	background: #fff!important;
}

.woocommerce a.button.alt {
	background-color: #f6bf39!important;
	color: #274c30!important;
}
.woocommerce table.shop_table {
	margin-bottom:0px!important;
}
/* ---- Woo ⨯ Tailwind grid fix ---- */
ul.products.grid,
ul.products[class*="grid-cols-"] {
  /* Tailwind ya pone display:grid, lo dejamos por claridad */
  display: grid;
}

/* Quitar layout por floats de Woo cuando usamos grid */
ul.products.grid li.product,
ul.products[class*="grid-cols-"] li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  clear: none !important;
}

/* Woo mete un clearfix con :before/:after que puede reservar espacio */
ul.products.grid::before,
ul.products.grid::after,
ul.products[class*="grid-cols-"]::before,
ul.products[class*="grid-cols-"]::after {
  display: none !important;
  content: none !important;
}

/* Por si tu tema añade márgenes a .first/.last */
ul.products li.product.first,
ul.products li.product.last {
  margin: 0 !important;
  clear: none !important;
}

/* Form Login */
.woocommerce-form {
	border: 0px solid!important;
}
.woocommerce-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .5rem !important;
  padding: .875rem 1.25rem !important;
  border-radius: 1rem !important;
  font-weight: 600 !important;
  border: 1px solid #f6bf39 !important;
  background: #f6bf39 !important;
  color: #274c30 !important;
  transition: all .2s ease !important;
  text-decoration: none !important;
}

.woocommerce-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  filter: brightness(.95) !important;
  color: #274c30 !important;
}
/* =========================
   LEGAL PAGES (Andarurales)
   ========================= */

.legal-page{
  background:#f7f7f7;
}

/* Contenedor */
.legal-container{
  width:100%;
  max-width:1100px;
  margin:0 auto;
  padding:0 16px;
}

/* Hero */
.legal-hero{
  background:#274c30;
  color:#fff;
  padding:56px 0;
}

.legal-kicker{
  margin:0;
  opacity:.9;
  font-weight:700;
  font-size:.95rem;
  letter-spacing:.02em;
}

.legal-title{
  margin:10px 0 0 0;
  font-weight:900;
  font-size:2.1rem;
  line-height:1.15;
}

.legal-subtitle{
  margin:14px 0 0 0;
  max-width:70ch;
  opacity:.9;
  line-height:1.6;
}

/* Sección */
.legal-section{
  padding:34px 0 64px 0;
}

/* Card */
.legal-card{
  background:#fff;
  border:1px solid #e7e7e7;
  border-radius:18px;
  padding:22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* Contenido */
.legal-content{
  color:#222;
  font-size:1rem;
  line-height:1.85;
}

/* Títulos */
.legal-content h2{
  margin:26px 0 10px;
  font-size:1.45rem;
  line-height:1.25;
  font-weight:900;
  color:#274c30;
}

.legal-content h3{
  margin:18px 0 8px;
  font-size:1.15rem;
  line-height:1.3;
  font-weight:800;
  color:#7b8d37;
}

/* Texto */
.legal-content p{
  margin:0 0 14px;
}

/* Links */
.legal-content a{
  color:#274c30;
  text-decoration:underline;
  text-decoration-color:#f6bf39;
  text-underline-offset:3px;
  font-weight:700;
}

/* Listas */
.legal-content ul,
.legal-content ol{
  padding-left:1.2rem;
  margin:0 0 14px;
}

.legal-content li{
  margin:6px 0;
}

/* Separadores */
.legal-content hr{
  border:0;
  border-top:1px solid #e7e7e7;
  margin:22px 0;
}

/* Citas / notas */
.legal-content blockquote{
  margin:16px 0;
  padding:14px 16px;
  border-left:4px solid #f6bf39;
  background:#fff7db;
  border-radius:12px;
  color:#274c30;
  font-weight:600;
}

/* Tablas */
.legal-content table{
  width:100%;
  border-collapse:collapse;
  margin:14px 0 18px;
  overflow:hidden;
  border-radius:12px;
  border:1px solid #e7e7e7;
}

.legal-content th,
.legal-content td{
  padding:10px 12px;
  border-bottom:1px solid #e7e7e7;
  text-align:left;
  vertical-align:top;
}

.legal-content th{
  background:#f3f6f3;
  color:#274c30;
  font-weight:900;
}

.legal-content tr:last-child td{
  border-bottom:0;
}

/* Responsive */
@media (min-width: 768px){
  .legal-hero{ padding:72px 0; }
  .legal-title{ font-size:2.6rem; }
  .legal-card{ padding:32px; }
}

/* === FIX GRID ARCHIVES WOO (Andarurales) === */
/* Forzamos grid real y anulamos cualquier layout legacy (flex/float/inline-block) */

body.woocommerce ul.products.products,
body.woocommerce-page ul.products.products{
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;

  /* Por si alguien lo convierte en flex */
  flex-direction: unset !important;
  flex-wrap: unset !important;
  justify-content: unset !important;
  align-items: unset !important;
}

/* Breakpoints similares a tu Tailwind md/lg */
@media (min-width: 768px){
  body.woocommerce ul.products.products,
  body.woocommerce-page ul.products.products{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1024px){
  body.woocommerce ul.products.products,
  body.woocommerce-page ul.products.products{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Cada li.product ocupa su celda: quitamos float/width/margins/max-width */
body.woocommerce ul.products.products > li.product,
body.woocommerce-page ul.products.products > li.product{
  float: none !important;
  clear: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;

  /* por si venía como inline-block/flex-item raro */
  display: block !important;
  flex: none !important;
}

/* Woo a veces mete clearfix y pseudo-elementos que molestan */
body.woocommerce ul.products.products::before,
body.woocommerce ul.products.products::after,
body.woocommerce-page ul.products.products::before,
body.woocommerce-page ul.products.products::after{
  content: none !important;
  display: none !important;
}


/* Ocultar logo en la página de carrito */
.woocommerce-cart figure.wp-block-post-featured-image{
  display: none !important;
}


/* =============================================================
   ANDARURALES CHAT – Tooltip + Menu badge
   (Añadido aquí para evitar hooks problemáticos en el plugin)
   ============================================================= */

/* -- Tooltip "¡Contacta con el negocio!" posicionado a la IZQUIERDA del botón -- */
.ar-chat-tooltip {
  position: absolute;
  /* Centrado vertical respecto al botón burbuja */
  bottom: 50%;
  transform: translateY(50%);
  /* A la izquierda del botón, nunca encima del panel */
  right: calc(var(--ar-bubble-size, 56px) + 16px);
  left: auto;
  /* Visual */
  background: #fff;
  color: #274c30;
  font-size: 13px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 8px 14px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(39, 76, 48, 0.18);
  border: 1.5px solid #f6bf39;
  pointer-events: none;
  /* z-index por debajo del panel (99995) para nunca taparlo */
  z-index: 99989;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* Flecha apuntando a la derecha → hacia el botón burbuja */
.ar-chat-tooltip::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 11px;
  height: 11px;
  background: #fff;
  border-right: 1.5px solid #f6bf39;
  border-bottom: 1.5px solid #f6bf39;
  transform: translateY(-50%) rotate(-45deg);
}

/* Ocultar tooltip cuando el panel está abierto o fue descartado por el usuario */
.ar-chat-widget.ar-tooltip-dismissed .ar-chat-tooltip,
.ar-chat-widget:has(.ar-chat-panel.ar-open) .ar-chat-tooltip {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* -- Badge de mensajes no leídos en el menú "Chats" de Mi cuenta --
   El plugin añade la clase ar-has-badge al <li> y data-badge="N" al <a>
   mediante un inline script seguro dentro de wp_enqueue_scripts           */
.woocommerce-MyAccount-navigation-link.ar-has-badge > a::after {
  content: attr(data-badge);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 7px;
  border-radius: 10px;
  background: #f6bf39;
  color: #1b3521;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}