/* ==========================================================================
   AddonsWP Premium Dark Mode - Single Product Styles
   Guía de Estilo Oficial de Marca AddonsWP:
   - Primary BG: #0b1120 (Slate Oscuro Fondo)
   - Card BG: #0f172a / #1e293b
   - Brand Primary Accent: #0284c7 / #38bdf8 (Azul Cian del Logo)
   - VIP Membership CTA: #f97316 (Naranja Neón VIP)
   - Trust & Badges: #22c55e (Verde Esmeralda)
   ========================================================================== */


/* ==========================================================================
   1. GLOBAL PAGE BACKGROUND
   ========================================================================== */
html, body, #page, .site, .site-content, main {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.single-product,
body.single-product #page,
body.single-product #content,
body.single-product .site-content {
  background-color: #0b1120 !important;
  color: #cbd5e1 !important;
}

body, #page, .site {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* ==========================================================================
   2. OCULTAR CABECERA Y PIE DE PÁGINA NATIVOS DE ASTRA
   ========================================================================== */
header#masthead,
header.site-header,
#ast-desktop-header,
#ast-mobile-header,
.ast-mobile-header-wrap,
.ast-mobile-header-content,
.ast-primary-header-bar {
  display: none !important;
}

footer#colophon,
footer.site-footer:not(.main-footer),
.ast-footer-overlay,
.site-below-footer-wrap,
.ast-small-footer-section {
  display: none !important;
}

footer.main-footer {
  display: block !important;
}


/* ==========================================================================
   3. VISIBILIDAD DE TABS Y DESCRIPCIÓN DEL PRODUCTO
   ========================================================================== */
.woocommerce-tabs ul.tabs,
.woocommerce-tabs ul.tabs li {
  display: none !important;
}

#tab-description,
.woocommerce-tabs .panel#tab-description,
.woocommerce-Tabs-panel--description {
  display: block !important;
}


/* ==========================================================================
   4. WRAPPER Y LAYOUT PRINCIPAL DEL PRODUCTO
   ========================================================================== */
.custom-single-product-wrapper {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #cbd5e1;
}

.custom-product-breadcrumb {
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.custom-product-breadcrumb a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.custom-product-breadcrumb a:hover {
  text-decoration: underline;
}

.custom-product-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start !important;
  gap: 40px;
  margin-bottom: 60px;
}


/* ==========================================================================
   5. COLUMNA IZQUIERDA: GALERÍA DE IMAGEN (Ajustada al contenido)
   ========================================================================== */
.custom-product-gallery-col {
  background: #0f172a;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: border-color 0.3s ease;
  align-self: start !important;
  height: fit-content !important;
}

.custom-product-gallery-col:hover {
  border-color: rgba(2, 132, 199, 0.4);
}

.custom-product-gallery-col .woocommerce-product-gallery,
.custom-product-gallery-col .woocommerce-product-gallery__wrapper,
.custom-product-gallery-col .woocommerce-product-gallery__image,
.custom-product-gallery-col .woocommerce-product-gallery__image a,
.custom-product-gallery-col .woocommerce-product-gallery__image img {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  display: block !important;
  margin: 0 !important;
  height: auto !important;
  border-radius: 12px;
}


/* ==========================================================================
   6. COLUMNA DERECHA: DETALLES DEL PRODUCTO
   ========================================================================== */
.custom-product-cat {
  font-size: 0.85rem;
  color: #38bdf8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.custom-product-cat a {
  color: #38bdf8;
  text-decoration: none;
}

.custom-product-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 14px 0;
  color: #ffffff;
  line-height: 1.25;
}

.custom-product-meta-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.custom-product-web-oficial-wrapper {
  margin-top: 14px;
  width: 100%;
}

.btn-web-oficial {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background: rgba(2, 132, 199, 0.12) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.btn-web-oficial:hover {
  background: rgba(2, 132, 199, 0.28) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25) !important;
}


/* ==========================================================================
   7. PRECIO Y BADGE DE CRÉDITOS
   ========================================================================== */
.custom-product-credits-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.custom-product-price,
.custom-product-price .amount,
.custom-product-price span,
.custom-product-price p,
.custom-product-price bdi {
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: #38bdf8 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  display: inline-block !important;
}

.custom-user-credits-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
}

.custom-user-credits-badge strong {
  color: #ffffff;
}

/* Balance debajo del botón de descarga */
.custom-user-credits-balance-below {
  display: block;
  text-align: left !important;
  margin-top: 12px;
  padding-left: 4px;
  font-size: 0.95rem;
  color: #22c55e;
  font-weight: 700;
}

.custom-user-credits-balance-below strong {
  color: #ffffff;
}


/* ==========================================================================
   8. LISTA DE CARACTERÍSTICAS (CHECKMARKS)
   ========================================================================== */
.custom-product-includes {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
}

.custom-product-includes.vip-active-includes {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, #0f172a 100%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
}

.vip-active-badge {
  display: inline-block;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.includes-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 14px 0;
  color: #ffffff;
}

.includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.includes-list li {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #22c55e;
  color: #ffffff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}


/* ==========================================================================
   9. BANNER VIP (MEMBRESÍA ILIMITADA)
   ========================================================================== */
.custom-product-vip-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid #f97316;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.15);
  position: relative;
  text-align: left;
}

.vip-banner-badge {
  display: inline-block;
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 50px;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.vip-banner-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.vip-banner-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0 0 18px 0;
}

.vip-banner-desc strong {
  color: #ffffff;
}

.vip-banner-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 16px 0 22px 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px 16px !important;
}

@media (max-width: 640px) {
  .vip-banner-features {
    grid-template-columns: 1fr !important;
  }
}

.vip-banner-features li {
  font-size: 0.88rem !important;
  color: #cbd5e1 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  line-height: 1.4 !important;
}

.vip-banner-features li strong {
  color: #ffffff !important;
}

.vip-banner-features .check-icon {
  background: #f97316 !important;
  color: #ffffff !important;
  width: 18px !important;
  height: 18px !important;
  font-size: 10px !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 1px !important;
}

.btn-vip-banner {
  display: block;
  width: 100%;
  text-align: center;
  background: #f97316;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: 50px;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-vip-banner:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.vip-banner-note {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 10px;
}


/* ==========================================================================
   10. BOTONES DE ACCIÓN (DESCARGAR CON CRÉDITOS)
   ========================================================================== */
.custom-product-actions-zone {
  margin-top: 24px;
}

.custom-product-actions-zone button.button.alt,
.custom-product-actions-zone form.cart button.single_add_to_cart_button {
  background: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 14px 28px !important;
  border-radius: 50px !important;
  border: none !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

.custom-product-actions-zone button.button.alt:hover,
.custom-product-actions-zone form.cart button.single_add_to_cart_button:hover {
  background: #0369a1 !important;
  transform: translateY(-2px) !important;
}


/* ==========================================================================
   11. TABS SECTION (INFERIOR AL PRODUCTO)
   ========================================================================== */
.custom-product-details-tabs {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 40px;
}

.woocommerce-Tabs-panel,
.custom-product-description-card {
  background: #0f172a !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 28px !important;
  color: #cbd5e1 !important;
  margin-top: 20px !important;
  margin-bottom: 30px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

.woocommerce-Tabs-panel h2:not(.custom-product-description-title),
.custom-product-description-title {
  color: #ffffff !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  border-bottom: 2px solid #0284c7 !important;
  display: inline-block !important;
  padding-bottom: 6px !important;
  margin: 0 0 20px 0 !important;
}

/* Encabezados internos de la descripción (H1, H2, H3, H4, H5, H6) */
.custom-product-description-content h1,
.custom-product-description-content h2,
.custom-product-description-content h3,
.custom-product-description-content h4,
.custom-product-description-content h5,
.custom-product-description-content h6,
.woocommerce-Tabs-panel h1,
.woocommerce-Tabs-panel h3,
.woocommerce-Tabs-panel h4,
.woocommerce-Tabs-panel h5,
.woocommerce-Tabs-panel h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 1.3rem !important;
  margin-top: 28px !important;
  margin-bottom: 14px !important;
  line-height: 1.35 !important;
  opacity: 1 !important;
}

.custom-product-description-content {
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: #cbd5e1 !important;
}

.custom-product-description-content p,
.custom-product-description-content span,
.custom-product-description-content li,
.woocommerce-Tabs-panel p,
.woocommerce-Tabs-panel span,
.woocommerce-Tabs-panel li {
  color: #cbd5e1 !important;
}

.custom-product-description-content strong,
.custom-product-description-content b,
.woocommerce-Tabs-panel strong,
.woocommerce-Tabs-panel b {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.custom-product-description-content a,
.woocommerce-Tabs-panel a {
  color: #38bdf8 !important;
  text-decoration: underline !important;
}

.custom-product-description-content p {
  margin-bottom: 16px !important;
}

.custom-product-description-content ul,
.custom-product-description-content ol {
  padding-left: 24px !important;
  margin-bottom: 16px !important;
}

.custom-product-description-content li {
  margin-bottom: 8px !important;
}


/* ==========================================================================
   12. PRODUCTOS RELACIONADOS - GRID LIMPIO
   ========================================================================== */

/* CRITICAL FIX: Eliminar pseudo-elementos de WooCommerce que ocupan celdas del grid */
.related.products ul.products::before,
.related.products ul.products::after,
.up-sells.products ul.products::before,
.up-sells.products ul.products::after,
ul.products::before,
ul.products::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.related.products,
.up-sells.products {
  margin-top: 60px !important;
  margin-bottom: 60px !important;
  padding-top: 40px !important;
  padding-bottom: 50px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.related.products h2,
.up-sells.products h2 {
  color: #ffffff !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin-bottom: 28px !important;
  text-align: left !important;
}

/* Grid de 4 columnas en desktop */
.related.products ul.products,
.up-sells.products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
  width: 100% !important;
  float: none !important;
}

/* Tarjeta individual del producto relacionado */
.related.products ul.products li.product,
.up-sells.products ul.products li.product {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 16px !important;
  padding: 20px 20px 24px 20px !important;
  text-align: center !important;
  float: none !important;
  clear: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 0 !important;
  height: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.25 ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.related.products ul.products li.product.first,
.related.products ul.products li.product.last,
.up-sells.products ul.products li.product.first,
.up-sells.products ul.products li.product.last {
  clear: none !important;
  margin: 0 !important;
}

.related.products ul.products li.product:hover,
.up-sells.products ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(2, 132, 199, 0.5) !important;
}

/* Thumbnail / imagen del producto relacionado */
.related.products ul.products li.product .astra-shop-thumbnail-wrap,
.up-sells.products ul.products li.product .astra-shop-thumbnail-wrap {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  margin-bottom: 10px !important;
  position: relative !important;
}

.related.products ul.products li.product .astra-shop-thumbnail-wrap a,
.up-sells.products ul.products li.product .astra-shop-thumbnail-wrap a,
.related.products ul.products li.product .woocommerce-LoopProduct-link,
.up-sells.products ul.products li.product .woocommerce-LoopProduct-link {
  display: block !important;
  width: 100% !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.related.products ul.products li.product img,
.up-sells.products ul.products li.product img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 80px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  margin-bottom: 12px !important;
}

/* Contenido/resumen de la tarjeta */
.related.products ul.products li.product .astra-shop-summary-wrap,
.up-sells.products ul.products li.product .astra-shop-summary-wrap {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  justify-content: space-between !important;
  padding: 4px 0 0 0 !important;
}

/* Título del producto relacionado */
.related.products ul.products li.product .woocommerce-loop-product__title,
.up-sells.products ul.products li.product .woocommerce-loop-product__title {
  color: #ffffff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  margin: 14px 0 12px 0 !important;
  line-height: 1.35 !important;
}

/* Precio del producto relacionado */
.related.products ul.products li.product .price,
.up-sells.products ul.products li.product .price {
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  margin-bottom: 8px !important;
}

/* Botón "Ver producto" */
.related.products ul.products li.product .button,
.up-sells.products ul.products li.product .button {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  text-decoration: none !important;
  display: inline-block !important;
  border: none !important;
  margin-top: auto !important;
}


/* ==========================================================================
   13. MENÚ DE NAVEGACIÓN DESKTOP
   ========================================================================== */

/* Visibilidad del menú hamburguesa en desktop */
header.main-header .mobile-menu-toggle {
  display: none;
}

/* Estilo uniforme del menú de navegación */
.main-navigation {
  display: flex !important;
  align-items: center !important;
}

.main-navigation ul {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 12px !important;
}

.main-navigation ul li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  display: inline-flex !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
}

.main-navigation ul li a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 38px !important;
  line-height: 1 !important;
  color: #1e293b !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  border: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.main-navigation ul li a:hover {
  color: #0284c7 !important;
  background: #f1f5f9 !important;
}

/* Botón de Membresía (último ítem del menú) */
.main-navigation ul li:last-child a {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  padding: 0 20px !important;
  font-weight: 700 !important;
}

.main-navigation ul li:last-child a:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
}

/* Ocultar el carrito a usuarios sin créditos */
body.user-no-credits .menu-item-carrito,
body.user-no-credits a[href*="/carrito"],
body.user-no-credits a[href*="/cart"] {
  display: none !important;
}


/* ==========================================================================
   14. RESPONSIVE MOBILE (max-width: 900px)
   ========================================================================== */
@media (max-width: 900px) {
  /* Menú hamburguesa - mostrar botón, ocultar menú desktop */
  header.main-header .main-navigation,
  header.main-header .header-search-form {
    display: none !important;
  }

  header.main-header .mobile-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    padding: 6px !important;
    z-index: 100 !important;
  }

  header.main-header .mobile-menu-toggle svg {
    stroke: #0f172a !important;
    width: 28px !important;
    height: 28px !important;
  }
}

@media (max-width: 768px) {
  /* Layout principal del producto */
  .custom-single-product-wrapper {
    padding: 0 14px !important;
    margin: 15px auto !important;
  }

  .custom-product-main-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .custom-product-title {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }

  .custom-product-price,
  .custom-product-price .amount,
  .custom-product-price bdi {
    font-size: 1.5rem !important;
  }

  .custom-product-includes {
    padding: 16px !important;
  }

  .custom-user-credits-balance-below {
    font-size: 0.85rem !important;
  }

  /* Grid de 2 columnas en móvil para productos relacionados */
  .related.products ul.products,
  .up-sells.products ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .related.products ul.products li.product,
  .up-sells.products ul.products li.product {
    padding: 10px !important;
    border-radius: 10px !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .related.products ul.products li.product img,
  .up-sells.products ul.products li.product img {
    height: 100px !important;
    max-height: 100px !important;
    min-height: 80px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    margin-bottom: 8px !important;
  }

  .related.products ul.products li.product .astra-shop-thumbnail-wrap,
  .up-sells.products ul.products li.product .astra-shop-thumbnail-wrap,
  .related.products ul.products li.product .woocommerce-LoopProduct-link,
  .up-sells.products ul.products li.product .woocommerce-LoopProduct-link {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    margin-bottom: 6px !important;
  }

  .related.products ul.products li.product .woocommerce-loop-product__title,
  .up-sells.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    margin: 4px 0 !important;
    max-height: 2.5em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .related.products ul.products li.product .price,
  .up-sells.products ul.products li.product .price {
    font-size: 0.8rem !important;
    margin-bottom: 4px !important;
  }

  .related.products ul.products li.product .button,
  .up-sells.products ul.products li.product .button {
    padding: 5px 10px !important;
    font-size: 0.72rem !important;
  }
}


/* ==========================================================================
   GLOBAL HEADER & FOOTER COMPONENT (EDITOR IA BASE COMPONENT STYLES)
   Garantiza que el Header y Footer sean 100% idénticos en todas las páginas
   ========================================================================== */

.header-container, .footer-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

/* 1. Top Announcement Bar */
.top-announcement-bar {
  background: #0f172a !important;
  color: #ffffff !important;
  padding: 8px 0 !important;
  text-align: center !important;
  font-size: 0.9rem !important;
  margin: 0 !important;
}

.top-announcement-bar p {
  margin: 0 !important;
  padding: 0 !important;
}

.autoupdate-link {
  color: #ffffff !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.autoupdate-link strong {
  color: #22c55e !important;
}

/* 2. Main White Header Bar */
.main-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.main-header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 75px !important;
  gap: 20px !important;
}

.site-logo {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  text-decoration: none !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.site-logo-img {
  max-height: 48px !important;
  width: auto !important;
  display: block !important;
}

/* 3. Search Bar */
.header-search-form {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  width: 420px !important;
  max-width: 100% !important;
  margin: 0 !important;
  height: 42px !important;
  box-sizing: border-box !important;
}

.header-search-form input[type="text"],
.header-search-form input {
  border: none !important;
  outline: none !important;
  padding: 0 14px !important;
  width: 100% !important;
  height: 100% !important;
  font-size: 0.95rem !important;
  color: #334155 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.header-search-form button {
  background: #f1f5f9 !important;
  border: none !important;
  border-left: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  padding: 0 16px !important;
  height: 100% !important;
  min-width: 46px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.header-search-form button:hover {
  background: #e2e8f0 !important;
}

/* 4. Sub-Header Banner */
.sub-header-banner {
  background: #1e293b !important;
  color: #ffffff !important;
  text-align: center !important;
  padding: 10px 0 !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  margin: 0 !important;
}

.sub-header-banner p {
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
}

/* 5. Mobile Navigation & Drawer */
.mobile-menu-toggle {
  display: none !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
}

.mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2000 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
}

.mobile-drawer.active {
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-drawer-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
}

.mobile-drawer-content {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  width: 290px !important;
  height: 100% !important;
  background: #ffffff !important;
  padding: 60px 24px 24px 24px !important;
  box-shadow: -5px 0 25px rgba(0,0,0,0.3) !important;
  box-sizing: border-box !important;
}

body.admin-bar .mobile-drawer-content {
  padding-top: 100px !important;
}

.mobile-drawer-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 20px !important;
}

.mobile-drawer-close {
  background: transparent !important;
  border: none !important;
  color: #0f172a !important;
  font-size: 1.8rem !important;
  cursor: pointer !important;
}

/* 6. Main Footer */
.main-footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 60px 0 20px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: block !important;
}

.footer-grid {
  display: grid !important;
  grid-template-columns: 1.4fr 1.2fr 1fr !important;
  gap: 40px !important;
  margin-bottom: 40px !important;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

.footer-nav-unified .footer-menu-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
}

@media (max-width: 600px) {
  .footer-nav-unified .footer-menu-grid {
    grid-template-columns: 1fr !important;
  }
}

.footer-about p {
  font-size: 0.9rem !important;
  margin: 16px 0 !important;
  color: #94a3b8 !important;
}

.footer-title {
  color: #ffffff !important;
  font-size: 1.1rem !important;
  margin-bottom: 20px !important;
}

.footer-menu ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.footer-menu li {
  margin-bottom: 10px !important;
}

.footer-menu a {
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.9rem !important;
  transition: color 0.3s ease !important;
}

.footer-menu a:hover {
  color: #22c55e !important;
}

.btn-footer-vip {
  display: inline-block !important;
  background: #f97316 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
  margin-top: 12px !important;
}

.footer-bottom {
  text-align: center !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding-top: 20px !important;
  font-size: 0.85rem !important;
}

.footer-legal-notice {
  font-size: 0.8rem !important;
  color: #64748b !important;
  margin-top: 8px !important;
  line-height: 1.5 !important;
}

/* Ocultar cabeceras y pies duplicados de Astra */
header#masthead, header.site-header, #ast-desktop-header, #ast-mobile-header, .ast-mobile-header-wrap, .ast-mobile-header-content, .ast-primary-header-bar,
footer#colophon, footer.site-footer:not(.main-footer), .ast-footer-overlay, .site-below-footer-wrap, .ast-small-footer-section {
  display: none !important;
}

@media (max-width: 900px) {
  header.main-header .main-navigation,
  header.main-header .header-search-form {
    display: none !important;
  }
  header.main-header .mobile-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  header.main-header .mobile-menu-toggle svg {
    stroke: #0f172a !important;
    width: 28px !important;
    height: 28px !important;
  }
}
