/*
Theme Name: Hello Elementor Child - 3Deco
Theme URI: https://3deco-planter.com/
Description: Tema hijo ligero para 3Deco-planter. Scroll infinito de archivos WooCommerce.
Author: 3Deco-planter
Template: hello-elementor
Version: 1.1.9
Text Domain: hello-elementor-child-3deco
*/

/* Ocultar la paginación ÚNICAMENTE cuando JS ha podido activar el scroll. */
body.deco-scroll-enabled .deco-native-pagination {
  display: none !important;
}
.deco-scroll-status {
  text-align: center;
  padding: 1.5rem 1rem;
  min-height: 3.5rem;
  font-size: .95rem;
  color: #555;
}
.deco-scroll-status button {
  display: inline-block;
  background: #40b500;
  color: #fff;
  border: none;
  border-radius: .5rem;
  padding: .8rem 1.2rem;
  cursor: pointer;
}
.deco-scroll-status button:focus-visible { outline: 3px solid #222; outline-offset: 3px; }

.deco-scroll-status {display:flex;flex-direction:column;align-items:center;gap:12px}
.deco-scroll-status button:disabled {opacity:.55;cursor:wait}

/* Identidad 3Deco: menú corporativo, sin alterar botones de productos */
.site-header .site-navigation a,
.site-header .site-navigation .menu-item a,
.site-header .site-navigation .menu-item.current-menu-item > a,
.site-header .site-navigation .menu-item.current_page_item > a {
  color: #40b500;
}
.site-header .site-navigation a:hover,
.site-header .site-navigation a:focus-visible {
  color: #2b7900;
}
.site-header .site-navigation a:focus-visible {
  outline: 2px solid #40b500;
  outline-offset: 3px;
}
/* Títulos insertados exclusivamente en la página de tienda. */
.deco-shop-section-heading {
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  font-weight: 700;
  line-height: 1.25;
  color: #222;
  margin: 30px 0 16px;
  clear: both;
}


/* Cabecera 3Deco: sustituir el título textual por el logotipo original. */
.site-header .site-branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
}
.site-header .site-branding .site-title {
  margin: 0;
}
.site-header .site-branding .site-title a {
  display: block;
  width: min(78vw, 420px);
  height: clamp(78px, 10vw, 116px);
  background: url("assets/images/logo-legacy-header.png") no-repeat left center / contain;
  text-indent: -9999px;
  overflow: hidden;
  white-space: nowrap;
}
.site-header .site-branding .site-description {
  margin-top: .2rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.35;
  color: #222;
}
@media (max-width: 767px) {
  .site-header .site-branding .site-title a {
    width: min(86vw, 360px);
    height: 72px;
  }
  .site-header .site-branding .site-description {
    font-size: 1rem;
  }
}


/* 3Deco · Catálogo coherente: categorías y productos comparten columnas.
   Las clases se asignan por tipo de artículo, no por el orden en la página. */
body.post-type-archive-product ul.products.deco-category-grid,
body.post-type-archive-product ul.products.deco-product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(12px, 2.5vw, 28px);
  row-gap: 32px;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  list-style: none;
  align-items: start;
}
body.post-type-archive-product ul.products.deco-category-grid > li.product,
body.post-type-archive-product ul.products.deco-category-grid > li.product-category,
body.post-type-archive-product ul.products.deco-product-grid > li.product {
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-width: 0;
}
body.post-type-archive-product ul.products.deco-category-grid img,
body.post-type-archive-product ul.products.deco-product-grid img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 767px) {
  body.post-type-archive-product ul.products.deco-category-grid,
  body.post-type-archive-product ul.products.deco-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 22px;
  }
}
@media (max-width: 359px) {
  body.post-type-archive-product ul.products.deco-category-grid,
  body.post-type-archive-product ul.products.deco-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
  }
}

/* Iconos discretos: SVG integrados en la navegación, sin librerías externas. */
.site-header .site-navigation a .deco-menu-icon {
  display: inline-block;
  vertical-align: -0.19em;
  width: 17px;
  height: 17px;
  margin-right: .38em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* 3Deco 1.1.7: cabecera compacta, servicios al lado del logotipo. */
.site-header .site-branding.deco-services-active {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(14px, 2.3vw, 34px);
  min-width: 0;
  flex-shrink: 1;
}
.site-header .site-branding.deco-services-active .site-title {
  margin: 0;
  flex: 0 0 auto;
}
.site-header .site-branding.deco-services-active .site-title a {
  width: clamp(175px, 17vw, 275px);
  height: clamp(108px, 11vw, 168px);
}
.site-header .site-branding.deco-services-active .site-description {
  display: none !important;
}
.site-header .deco-services {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: clamp(14px, 1.12vw, 20px);
  font-weight: 500;
  line-height: 1.32;
  color: #252525;
  letter-spacing: 0;
  white-space: nowrap;
}
@media (min-width: 768px) and (max-width: 1199px) {
  .site-header .site-branding.deco-services-active .site-title a {
    width: clamp(145px, 18vw, 215px);
    height: clamp(94px, 12vw, 132px);
  }
  .site-header .deco-services { font-size: clamp(12px, 1.25vw, 16px); }
}
@media (max-width: 767px) {
  .site-header .site-branding.deco-services-active {
    gap: clamp(8px, 2.4vw, 16px);
    max-width: 100%;
  }
  .site-header .site-branding.deco-services-active .site-title a {
    width: clamp(112px, 32vw, 172px);
    height: clamp(78px, 22vw, 106px);
  }
  .site-header .deco-services {
    font-size: clamp(10px, 2.6vw, 13px);
    gap: 1px;
    white-space: normal;
  }
}
@media (max-width: 359px) {
  .site-header .site-branding.deco-services-active {gap: 8px;}
  .site-header .site-branding.deco-services-active .site-title a {width: 108px; height: 75px;}
  .site-header .deco-services {font-size: 10px;}
}


/* 3Deco 1.1.8: WooCommerce inserta pseudoelementos clearfix en ul.products.
   En CSS Grid se contabilizan como primera celda vacía: excluirlos del layout. */
body.post-type-archive-product ul.products.deco-category-grid::before,
body.post-type-archive-product ul.products.deco-category-grid::after,
body.post-type-archive-product ul.products.deco-product-grid::before,
body.post-type-archive-product ul.products.deco-product-grid::after {
  content: none !important;
  display: none !important;
}

/* Iconos de la navegación: visibles en todas las páginas, incluidos móviles. */
.site-header .site-navigation a .deco-menu-icon {flex: 0 0 17px;}
