/*
Theme Name: El Tejemaneje
Theme URI: https://eltejemaneje.es
Description: Tema autónomo e independiente 100% personalizado para El Tejemaneje con gestor de Descuentos, Buscador Multimarca en cabecera, Muestras de Color Nativas y compatibilidad con el-tejemaneje-core v5.0.0.
Author: Antigravity / El Tejemaneje
Author URI: https://eltejemaneje.es
Version: 7.6.0
Text Domain: el-tejemaneje
*/

/* ==========================================================================
   VARIABLES DE DISEÑO & PALETA DE COLORES (EL TEJEMANEJE)
   ========================================================================== */
:root {
  --elt-primary: #C55D67;         /* Rosa borgoña / terroso elegante */
  --elt-primary-hover: #A94851;
  --elt-secondary: #E8A8A1;       /* Rosa suave */
  --elt-bg-light: #FAF5F3;        /* Fondo crema/rosa muy claro */
  --elt-topbar-bg: #FBECEB;       /* Fondo de la barra superior */
  --elt-text-dark: #332B2B;       /* Texto principal */
  --elt-text-muted: #786C6C;      /* Texto secundario */
  --elt-border-light: #EFE4E1;
  --elt-card-bg: #F7EBE8;         /* Fondo de tarjetas de categoría */
  --elt-white: #FFFFFF;
  --elt-radius-sm: 8px;
  --elt-radius-md: 16px;
  --elt-radius-lg: 24px;
  --elt-shadow-soft: 0 8px 24px rgba(197, 93, 103, 0.08);
  --elt-shadow-hover: 0 12px 32px rgba(197, 93, 103, 0.15);
  --elt-font-serif: 'Playfair Display', 'Georgia', serif;
  --elt-font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   RESET & ESTILOS GLOBALES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box !important;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  margin: 0;
  padding: 0;
  font-family: var(--elt-font-sans);
  color: var(--elt-text-dark);
  background-color: var(--elt-bg-light);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .elt-serif {
  font-family: var(--elt-font-serif);
  font-weight: 600;
  color: var(--elt-text-dark);
}

a {
  color: var(--elt-primary);
  text-decoration: none;
  transition: all 0.25s ease;
}

a:hover {
  color: var(--elt-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* OCULTAR BOTÓN NATIVO DE AÑADIR AL CARRITO, SELECTOR DE CANTIDAD Y DESPLEGABLES ANTIGUOS */
.single_add_to_cart_button,
.add_to_cart_button,
.quantity,
form.cart button.single_add_to_cart_button,
form.cart .quantity,
.woocommerce-variation-add-to-cart,
.reset_variations,
a.reset_variations,
.single-product .reset_variations,
.single-product .variations_form select,
.single-product table.variations {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* OCULTAR CIRCULOS DE VARIACIONES EN LAS TARJETAS DEL CATÁLOGO */
.products li.product .tawcvs-swatches,
.products li.product .wcvs-swatches,
.products li.product .swatchanchor,
.products li.product .elt-native-swatch-btn {
  display: none !important;
}

/* MUESTRAS DE COLOR NATIVAS (BOTÓN CON MUESTRA TEJIDA) */
.elt-native-swatch-btn:hover,
.elt-native-swatch-btn.active {
  transform: scale(1.15);
  border-color: var(--elt-primary) !important;
  box-shadow: 0 0 0 2px rgba(197, 93, 103, 0.3) !important;
}

/* ==========================================================================
   1. BARRA SUPERIOR (ANNOUNCEMENT BAR)
   ========================================================================== */
.elt-topbar {
  background-color: var(--elt-topbar-bg);
  border-bottom: 1px solid var(--elt-border-light);
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--elt-text-dark);
}

.elt-topbar-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.elt-topbar-promo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  font-weight: 500;
}

.elt-topbar-promo svg {
  color: var(--elt-primary);
}

.elt-topbar-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.elt-topbar-social a {
  color: var(--elt-text-dark);
  opacity: 0.8;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.elt-topbar-social a:hover {
  opacity: 1;
  transform: translateY(-1px);
  color: var(--elt-primary);
}

/* ==========================================================================
   2. CABECERA PRINCIPAL AUTÓNOMA (DESKTOP ORDENADO: LOGO - MENÚ - WHATSAPP 1º - TELEGRAM 2º)
   ========================================================================== */
.elt-header-wrapper {
  background-color: var(--elt-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.elt-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px;
  width: 100%;
}

.elt-header-brand {
  order: 1 !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0;
}

.elt-header-logo-img {
  height: 68px;
  width: auto;
  object-fit: contain;
  display: block;
}

.elt-header-nav {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 32px !important;
  margin: 0 auto !important;
}

.elt-header-nav a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--elt-text-dark);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}

.elt-header-nav a:hover,
.elt-header-nav a.active {
  color: var(--elt-primary);
}

.elt-header-search-form {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 12px;
}

.elt-header-search-input {
  background-color: var(--elt-topbar-bg);
  border: 1px solid var(--elt-border-light);
  border-radius: 20px;
  padding: 6px 36px 6px 14px;
  font-size: 0.85rem;
  color: var(--elt-text-dark);
  outline: none;
  width: 170px;
  transition: all 0.25s ease;
}

.elt-header-search-input:focus {
  width: 220px;
  background-color: var(--elt-white);
  border-color: var(--elt-primary);
  box-shadow: 0 0 0 3px rgba(197, 93, 103, 0.15);
}

.elt-header-search-btn {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--elt-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.elt-header-actions {
  order: 3 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-left: auto !important;
  flex-shrink: 0;
}

.elt-whatsapp-btn {
  background-color: #25D366;
  color: var(--elt-white);
  padding: 9px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.elt-whatsapp-btn:hover {
  color: var(--elt-white);
  transform: translateY(-2px);
}

.elt-telegram-btn {
  background-color: #0088cc;
  color: var(--elt-white);
  padding: 9px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.elt-telegram-btn:hover {
  color: var(--elt-white);
  transform: translateY(-2px);
}

.elt-mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.elt-hamburger-bar {
  width: 26px;
  height: 3px;
  background-color: var(--elt-text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==========================================================================
   3. HERO BANNER / SLIDER
   ========================================================================== */
.elt-hero-container {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}

.elt-hero-card {
  background-color: var(--elt-bg-light);
  border-radius: var(--elt-radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 480px;
  box-shadow: var(--elt-shadow-soft);
  position: relative;
}

.elt-hero-content {
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.elt-hero-tag {
  color: var(--elt-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.elt-hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin: 0 0 16px 0;
  color: var(--elt-text-dark);
  min-height: 90px;
}

.elt-hero-title em {
  font-style: italic;
  color: inherit;
}

.elt-hero-description {
  color: var(--elt-text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 440px;
  min-height: 75px;
}

.elt-hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.elt-btn-primary {
  background-color: var(--elt-primary);
  color: var(--elt-white);
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  box-shadow: 0 4px 14px rgba(197, 93, 103, 0.3);
  transition: all 0.25s ease;
  text-align: center;
}

.elt-btn-primary:hover {
  background-color: var(--elt-primary-hover);
  color: var(--elt-white);
  transform: translateY(-2px);
}

.elt-btn-secondary {
  background-color: transparent;
  color: var(--elt-text-dark);
  border: 1.5px solid var(--elt-text-dark);
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: all 0.25s ease;
  text-align: center;
}

.elt-btn-secondary:hover {
  background-color: var(--elt-text-dark);
  color: var(--elt-white);
  transform: translateY(-2px);
}

.elt-hero-image {
  height: 100%;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: opacity 0.3s ease-in-out, background-image 0.5s ease-in-out;
}

.elt-slider-dots {
  position: absolute;
  bottom: 24px;
  left: 48px;
  display: flex;
  gap: 10px;
}

.elt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #D3C3C0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.elt-dot.active {
  background-color: var(--elt-primary);
  width: 28px;
  border-radius: 10px;
}

/* ==========================================================================
   4. SECCIÓN EXPLORA NUESTRA TIENDA (5 CATEGORÍAS FOTOGRÁFICAS)
   ========================================================================== */
.elt-section-container {
  max-width: 1280px;
  margin: 48px auto;
  padding: 0 24px;
  text-align: center;
}

.elt-section-header h2 {
  font-size: 2.2rem;
  margin: 0 0 8px 0;
}

.elt-section-header p {
  color: var(--elt-text-muted);
  font-size: 1rem;
  margin: 0 0 32px 0;
}

.elt-categories-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.elt-category-card {
  background-color: var(--elt-white);
  border-radius: var(--elt-radius-md);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--elt-border-light);
}

.elt-category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--elt-shadow-hover);
}

.elt-category-thumb {
  height: 190px;
  background-size: cover;
  background-position: center;
  width: 100%;
  transition: transform 0.4s ease;
}

.elt-category-card:hover .elt-category-thumb {
  transform: scale(1.04);
}

.elt-category-thumb-wrapper {
  overflow: hidden;
  height: 190px;
}

.elt-category-info {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--elt-white);
}

.elt-category-text h3 {
  font-size: 1.1rem;
  margin: 0 0 2px 0;
}

.elt-category-text span {
  font-size: 0.82rem;
  color: var(--elt-text-muted);
}

.elt-category-arrow {
  color: var(--elt-primary);
  font-size: 1.2rem;
  transition: transform 0.25s ease;
}

/* ==========================================================================
   5. MAQUETACIÓN ELEGANTE PARA PRODUCTOS WOOCOMMERCE & BOTÓN DE WHATSAPP CON CONTROL ESTRICTO
   ========================================================================== */
.woocommerce-ordering,
.woocommerce-result-count,
.storefront-sorting {
  display: none !important;
}

ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  padding: 0 !important;
  margin: 32px 0 !important;
  list-style: none !important;
}

ul.products::before,
ul.products::after {
  display: none !important;
}

li.product {
  background-color: var(--elt-white) !important;
  border: 1px solid var(--elt-border-light) !important;
  border-radius: var(--elt-radius-md) !important;
  overflow: hidden !important;
  padding: 16px !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
}

li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--elt-shadow-hover) !important;
}

li.product img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  border-radius: var(--elt-radius-sm) !important;
  margin-bottom: 12px !important;
}

li.product .woocommerce-loop-product__title {
  font-family: var(--elt-font-serif) !important;
  font-size: 1.15rem !important;
  color: var(--elt-text-dark) !important;
  margin: 8px 0 6px 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

li.product .price {
  color: var(--elt-primary) !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  margin-bottom: 12px !important;
  display: block !important;
}

/* CONTROL ESTRICTO PARA EVITAR BOTÓN DE WHATSAPP DEFORME EN TARJETAS */
.elt-product-wa-btn,
li.product .elt-product-wa-btn {
  background-color: #25D366 !important;
  color: #FFFFFF !important;
  padding: 10px 16px !important;
  border-radius: 30px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 10px !important;
  width: 100% !important;
  height: 42px !important;
  max-height: 42px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, background-color 0.2s ease !important;
  border: none !important;
}

.elt-product-wa-btn:hover,
li.product .elt-product-wa-btn:hover {
  transform: translateY(-2px) !important;
  background-color: #1eb956 !important;
  color: #FFFFFF !important;
}

.elt-product-wa-btn svg,
.elt-product-wa-btn img,
li.product .elt-product-wa-btn svg,
li.product .elt-product-wa-btn img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==========================================================================
   6. BARRA DE PROPUESTAS DE VALOR
   ========================================================================== */
.elt-values-section {
  background-color: var(--elt-white);
  border-top: 1px solid var(--elt-border-light);
  border-bottom: 1px solid var(--elt-border-light);
  padding: 40px 24px;
  margin-top: 48px;
}

.elt-values-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.elt-value-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.elt-value-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--elt-topbar-bg);
  color: var(--elt-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.elt-value-text h4 {
  font-size: 1rem;
  margin: 0 0 2px 0;
}

.elt-value-text p {
  font-size: 0.85rem;
  color: var(--elt-text-muted);
  margin: 0;
}

/* ==========================================================================
   7. ADAPTACIÓN RESPONSIVA MODERNA Y 100% VERTICAL PARA SMARTPHONES
   ========================================================================== */
@media (max-width: 1024px) {
  .elt-categories-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 768px) {
  html, body, #page, .site {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .elt-topbar-social {
    display: none !important;
  }
  .elt-header {
    padding: 10px 16px !important;
    flex-wrap: wrap !important;
  }
  .elt-header-logo-img {
    height: 44px !important;
  }

  .elt-header-nav {
    display: none !important;
    flex-direction: column !important;
    width: 100% !important;
    background: #FFFFFF !important;
    padding: 14px 0 !important;
    border-top: 1px solid #EFE4E1 !important;
    text-align: center !important;
    gap: 14px !important;
    margin: 10px 0 0 0 !important;
  }

  .elt-header-nav.is-open {
    display: flex !important;
  }

  .elt-hero-card {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .elt-hero-content {
    padding: 24px 18px !important;
    align-items: center !important;
    text-align: center !important;
  }

  .elt-hero-title {
    font-size: 1.8rem !important;
    min-height: auto !important;
  }

  .elt-hero-description {
    font-size: 0.92rem !important;
    min-height: auto !important;
    margin-bottom: 20px !important;
  }

  .elt-hero-image {
    min-height: 220px !important;
    height: 220px !important;
    width: 100% !important;
  }

  .elt-slider-dots {
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: 16px !important;
  }

  .site-main > div[style*="display: grid"],
  .site-main div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .site-main div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .elt-categories-grid-5 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  li.product img {
    height: 150px !important;
  }
  .elt-values-grid {
    grid-template-columns: 1fr;
  }

  #elt-cookie-banner {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    max-width: calc(100vw - 24px) !important;
    font-size: 0.8rem !important;
    padding: 12px 16px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
  }
}

@media (max-width: 480px) {
  ul.products {
    grid-template-columns: 1fr !important;
  }
}
