/**
 * main.css — Redirige al style.css del tema
 * Cargado como asset separado para mayor control de cache.
 * @package teoma-life
 *
 * NOTA: Los estilos reales están en /style.css (cargado via wp_enqueue_style).
 * Este archivo extiende con estilos adicionales de entrada suaves y búsqueda overlay.
 */

/* ==============================
   SEARCH OVERLAY
   ============================== */
.search-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-blanco);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 990;
  border-top: 2px solid var(--color-verde-primario);
  animation: slideDown 0.2s ease;
}

.search-overlay[hidden] {
  display: none;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.search-overlay__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 600px;
  margin-inline: auto;
}

.search-overlay__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gris-texto);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  flex-shrink: 0;
}

.search-overlay__close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Formulario de búsqueda */
.search-form {
  display: flex;
  flex: 1;
  gap: 0;
}

.search-form label {
  display: none;
}

.search-field {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1.5px solid #ddd;
  border-right: none;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  font-family: var(--font-principal);
  font-size: 0.95rem;
  color: var(--color-verde-oscuro);
  outline: none;
}

.search-field:focus {
  border-color: var(--color-verde-primario);
}

.search-submit {
  padding: 0.7rem 1.25rem;
  background: var(--color-verde-primario);
  color: var(--color-blanco);
  border: none;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  font-family: var(--font-principal);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans-fast);
}

.search-submit:hover {
  background: var(--color-verde-oscuro);
}

/* ==============================
   NAV OVERLAY (móvil)
   ============================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 850;
  opacity: 0;
  visibility: hidden;
  transition: var(--trans-base);
}

.nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ==============================
   CONTENT STYLES (Blog/Pages)
   ============================== */
.entry-content {
  line-height: 1.8;
  font-size: 1rem;
  color: #333;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.entry-content p {
  margin-bottom: 1.25rem;
}

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.4rem;
}

.entry-content a {
  color: var(--color-verde-primario);
  text-decoration: underline;
}

.entry-content a:hover {
  color: var(--color-verde-oscuro);
}

.entry-content blockquote {
  border-left: 4px solid var(--color-dorado);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-gris-claro);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-verde-oscuro);
}

.entry-content img {
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.entry-content .wp-block-image figcaption {
  font-size: 0.8rem;
  color: var(--color-gris-texto);
  text-align: center;
  margin-top: 0.35rem;
}

/* Tablas de contenido */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.entry-content table th {
  background: var(--color-verde-oscuro);
  color: var(--color-blanco);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 700;
}

.entry-content table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #eee;
}

.entry-content table tr:nth-child(even) td {
  background: var(--color-gris-claro);
}

/* ==============================
   PAGINACIÓN WOOCOMMERCE
   ============================== */
.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.woocommerce-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-verde-oscuro);
  border: 2px solid #e0e0e0;
  transition: var(--trans-base);
}

.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
  background: var(--color-verde-primario);
  border-color: var(--color-verde-primario);
  color: var(--color-blanco);
}

/* ==============================
   SCROLL TO TOP
   ============================== */
.scroll-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  background: var(--color-verde-primario);
  color: var(--color-blanco);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: var(--trans-base);
  opacity: 0;
  visibility: hidden;
  z-index: 8000;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--color-verde-oscuro);
  transform: translateY(-3px);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* ==============================
   ANIMACIONES DE ENTRADA
   ============================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fadeInUp 0.5s ease both;
}

/* Stagger para grids */
.products-grid .product-card:nth-child(1) { animation-delay: 0s; }
.products-grid .product-card:nth-child(2) { animation-delay: 0.08s; }
.products-grid .product-card:nth-child(3) { animation-delay: 0.16s; }
.products-grid .product-card:nth-child(4) { animation-delay: 0.24s; }
.products-grid .product-card:nth-child(5) { animation-delay: 0.32s; }
.products-grid .product-card:nth-child(6) { animation-delay: 0.40s; }
