/*
	Theme Name: North Child Theme
	Theme URI: https://themeforest.net/item/north-responsive-woocommerce-theme/9117256
	Description: Tema hijo optimizado para tienda de shishas - Design System aplicado
	Version: 1.0.4
	Author: fuelthemes
	Author URI: http://themeforest.net/user/fuelthemes
	Template: north-wp
	Text Domain: north
	License: Themeforest Split Licence
	License URI: -
*/

/* ========================================
   DESIGN SYSTEM - TOKENS
   ======================================== */

:root {
  /* === SPACING SCALE === */
  --space-xs: 0.25rem; /* 4px */
  --space-sm: 0.5rem; /* 8px */
  --space-md: 1rem; /* 16px */
  --space-lg: 1.5rem; /* 24px */
  --space-xl: 2rem; /* 32px */
  --space-2xl: 3rem; /* 48px */

  /* === COLORS === */
  /* Heredar colores del tema padre (Option Tree) */
  --primary-color: var(--thb-primary-color, #e74c3c);
  --secondary-color: var(--thb-secondary-color, #3498db);

  /* Semánticos */
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  --info-color: #3498db;

  /* Text */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-inverse: #ffffff;

  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #2c3e50;
  --border-color: #e0e0e0;
}

/* ========================================
   SINGLE PRODUCT - TRUST ROW
   ======================================== */

.product-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  margin: var(--space-lg) 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1 1 auto;
  min-width: 140px;
}

.trust-icon {
  width: 20px;
  height: 20px;
  color: var(--success-color);
  flex-shrink: 0;
}

.trust-text {
  font-size: 0.875rem; /* 14px */
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

/* Responsive: columna en móvil */
@media (max-width: 767px) {
  .product-trust-row {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .trust-item {
    min-width: auto;
  }
}

/* ========================================
   SINGLE PRODUCT - STICKY ADD TO CART (MOBILE)
   ======================================== */

.sticky-add-to-cart-mobile {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999;
  transition: bottom 0.3s ease;
  display: none;
}

.sticky-add-to-cart-mobile.visible {
  bottom: 0;
}

.sticky-cart-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  gap: var(--space-md);
}

.sticky-product-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0; /* Para que funcione text-overflow */
}

.sticky-product-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}

.sticky-product-price del {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-right: var(--space-xs);
}

.sticky-cart-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.sticky-cart-button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.sticky-cart-button:active {
  transform: translateY(0);
}

/* Solo mostrar en móvil */
@media (max-width: 767px) {
  .sticky-add-to-cart-mobile {
    display: block;
  }
}

/* ========================================
   SINGLE PRODUCT - MEJORAS DE JERARQUÍA
   ======================================== */

/* Título del producto */
.single-product .product_title {
  font-size: 1.75rem; /* 28px móvil */
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .single-product .product_title {
    font-size: 2rem; /* 32px desktop */
  }
}

/* Precio */
.single-product .price {
  font-size: 1.5rem; /* 24px */
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.single-product .price del {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-right: var(--space-sm);
  font-weight: 400;
}

.single-product .price ins {
  text-decoration: none;
  color: var(--error-color);
}

/* Descripción corta - más prominente */
.single-product .woocommerce-product-details__short-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.single-product .woocommerce-product-details__short-description p {
  margin-bottom: var(--space-sm);
}

.single-product .woocommerce-product-details__short-description p:last-child {
  margin-bottom: 0;
}

/* Botón Add to Cart */
.single-product .single_add_to_cart_button {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  margin-top: var(--space-md);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.single-product .single_add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .single-product .single_add_to_cart_button {
    width: auto;
    min-width: 200px;
  }
}

/* Espaciado entre elementos del summary */
.single-product .summary > * {
  margin-bottom: var(--space-md);
}

/* Variaciones */
.single-product .variations {
  margin-bottom: var(--space-lg);
}

.single-product .variations td,
.single-product .variations th {
  padding: var(--space-sm) 0;
}

/* ========================================
   SINGLE PRODUCT - TABS
   ======================================== */

/* Mejorar tabs en móvil */
@media (max-width: 767px) {
  .woocommerce-tabs .tabs {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .woocommerce-tabs .tabs li {
    width: 100%;
  }
}

/* Descripción larga: mejorar listas */
.woocommerce-Tabs-panel ul,
.woocommerce-product-details__short-description ul {
  margin-left: 1.5rem;
  margin-bottom: var(--space-md);
}

.woocommerce-Tabs-panel ul li,
.woocommerce-product-details__short-description ul li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.woocommerce-Tabs-panel h2,
.woocommerce-Tabs-panel h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* ========================================
   RESPONSIVE - MOBILE FIRST
   ======================================== */

/* Asegurar que el contenido no se desborde */
.single-product .summary {
  max-width: 100%;
  overflow-x: hidden;
}

/* Mejorar espaciado en móvil */
@media (max-width: 767px) {
  .single-product .summary {
    padding: var(--space-md);
  }
}

/* ========================================
   SHOP GRID / ARCHIVE - OPTIMIZATIONS
   ======================================== */

/* === PRODUCT GRID LAYOUT === */

/* Mejorar spacing entre productos */
.products .product {
  margin-bottom: var(--space-xl); /* 32px entre filas */
}

/* Asegurar que grid no se desborda */
.products {
  margin-left: -0.9375rem; /* Compensar Foundation grid gutter */
  margin-right: -0.9375rem;
}

/* === PRODUCT CARD OPTIMIZATIONS === */

.north-optimized-card {
  /* Mejor estructura y spacing */
  position: relative;
}

/* Thumbnail del producto */
.north-optimized-card .product_thumbnail {
  position: relative;
  margin-bottom: var(--space-md);
  overflow: hidden;
  border-radius: 4px;
}

.north-optimized-card .product_thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.north-optimized-card:hover .product_thumbnail img {
  transform: scale(1.05);
}

/* Categoría del producto */
.north-optimized-card .product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

/* Título del producto */
.north-optimized-card h3,
.north-optimized-card .product-title {
  font-size: 0.9375rem; /* 15px */
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.north-optimized-card h3 a,
.north-optimized-card .product-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.north-optimized-card h3 a:hover,
.north-optimized-card .product-title a:hover {
  color: var(--primary-color);
}

/* Precio */
.north-optimized-card .price {
  font-size: 1.125rem; /* 18px */
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.north-optimized-card .price del {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-right: var(--space-xs);
  font-weight: 400;
}

.north-optimized-card .price ins {
  text-decoration: none;
  color: var(--error-color);
}

/* Rating */
.north-optimized-card .product-listing-rating {
  margin-bottom: var(--space-sm);
}

/* Botón Add to Cart */
.north-optimized-card .button,
.north-optimized-card .add_to_cart_button {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.north-optimized-card .button:hover,
.north-optimized-card .add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* === BADGES SYSTEM === */

/* Container de badges (del tema padre) */
.product_thumbnail .onsale,
.product_thumbnail .out-of-stock,
.product_thumbnail .thb-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Badges del tema hijo (Envío, Top) */
.north-child-badges {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-end;
}

.north-child-badges .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Badge: Envío Gratis */
.shipping-badge {
  background-color: var(--success-color);
  color: var(--text-inverse);
}

/* Badge: Top Producto */
.top-badge {
  background-color: var(--warning-color);
  color: var(--text-inverse);
}

/* Override de badge Sale del padre para consistencia */
.product_thumbnail .onsale {
  background-color: var(--error-color);
  color: var(--text-inverse);
}

/* === SHOP BAR - Filtros y Sorting === */

.shop_bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border-color);
}

/* Botón Filter (móvil) */
.shop_bar .filter-button,
.shop_bar .thb-filter-trigger {
  padding: 0.625rem 1.25rem;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shop_bar .filter-button:hover,
.shop_bar .thb-filter-trigger:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

/* Dropdown de ordenación */
.shop_bar .woocommerce-ordering select,
.shop_bar select.orderby {
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-size: 0.875rem;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.shop_bar .woocommerce-ordering select:hover,
.shop_bar select.orderby:hover {
  border-color: var(--primary-color);
}

.shop_bar .woocommerce-ordering select:focus,
.shop_bar select.orderby:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-color: var(--primary-color);
}

/* Result count */
.shop_bar .woocommerce-result-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* === MOBILE GRID OPTIMIZATIONS === */

@media (max-width: 767px) {
  /* Grid: 2 columnas en móvil (small-6) */
  .products .product.small-6 {
    padding-left: 0.625rem; /* 10px - reducir gutter */
    padding-right: 0.625rem;
  }

  /* Product card: ajustes para legibilidad */
  .north-optimized-card h3,
  .north-optimized-card .product-title {
    font-size: 0.8125rem; /* 13px en móvil */
    line-height: 1.3;

    /* Limitar a 2 líneas */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .north-optimized-card .price {
    font-size: 1rem; /* 16px en móvil */
  }

  .north-optimized-card .product-category {
    font-size: 0.6875rem; /* 11px */
  }

  /* Badges: tamaño reducido en móvil */
  .north-child-badges .badge,
  .product_thumbnail .onsale,
  .product_thumbnail .thb-badge {
    font-size: 0.6875rem; /* 11px */
    padding: 0.1875rem 0.5rem; /* 3px 8px */
  }

  /* Thumbnail: asegurar proporción cuadrada */
  .north-optimized-card .product_thumbnail {
    aspect-ratio: 1 / 1;
    margin-bottom: var(--space-sm);
  }

  .north-optimized-card .product_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Botón Add to Cart: tamaño reducido */
  .north-optimized-card .button,
  .north-optimized-card .add_to_cart_button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Shop bar: stack en móvil */
  .shop_bar {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }

  .shop_bar > * {
    width: 100%;
  }

  /* Ocultar result count en móvil */
  .shop_bar .woocommerce-result-count {
    display: none;
  }

  /* Botón filter: full width */
  .shop_bar .filter-button,
  .shop_bar .thb-filter-trigger {
    width: 100%;
    padding: 0.75rem;
  }
}

/* === TABLET OPTIMIZATIONS === */

@media (min-width: 768px) and (max-width: 1023px) {
  /* 3 columnas en tablet */
  .products .product.medium-4 {
    width: 33.33333%;
  }

  .north-optimized-card h3,
  .north-optimized-card .product-title {
    font-size: 0.875rem; /* 14px en tablet */
  }
}

/* === DESKTOP OPTIMIZATIONS === */

@media (min-width: 1024px) {
  /* Shop bar: mejor spacing */
  .shop_bar {
    padding: var(--space-lg) 0;
  }

  /* Products grid: mejor spacing */
  .products .product {
    margin-bottom: var(--space-2xl); /* 48px en desktop */
  }

  /* Hover effects más prominentes */
  .north-optimized-card:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
  }
}

/* ========================================
   HOMEPAGE - HIGH CONVERTING LAYOUT
   ======================================== */

/* === GENERAL HOMEPAGE STYLES === */

.homepage-container {
  width: 100%;
}

.homepage-content section {
  margin-bottom: var(--space-2xl); /* 48px entre secciones */
}

.section-title {
  font-size: 2rem; /* 32px */
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem; /* 18px */
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
}

@media (max-width: 767px) {
  .section-title {
    font-size: 1.5rem; /* 24px móvil */
  }

  .section-subtitle {
    font-size: 1rem;
  }
}

/* === 1. HERO SECTION === */

.homepage-hero {
  position: relative;
  /* background: linear-gradient(135deg, var(--bg-dark) 0%, #34495e 100%); */
  background: transparent;
  padding: var(--space-3xl) var(--space-md);
  margin-bottom: var(--space-2xl);
  text-align: center;
  overflow: hidden;
}

.homepage-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,128C672,107,768,85,864,90.7C960,96,1056,128,1152,128C1248,128,1344,96,1392,80L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat bottom center;
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-headline {
  font-size: 2.5rem; /* 40px */
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem; /* 20px */
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  color: var(--text-inverse);
}

@media (max-width: 767px) {
  .homepage-hero {
    padding: var(--space-xl) var(--space-md);
  }

  .hero-headline {
    font-size: 1.75rem; /* 28px móvil */
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* === 2. CATEGORY CARDS === */

.homepage-categories {
  padding: var(--space-xl) 0;
}

.category-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: var(--space-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.category-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.category-card-image img,
.category-card-image .category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img,
.category-card:hover .category-card-image .category-image {
  transform: scale(1.05);
}

.category-card-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.category-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.category-card-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
  flex-grow: 1;
}

.category-card-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-card-link:hover {
  color: #c0392b;
  text-decoration: underline;
}

/* === 3. BEST SELLERS === */

.homepage-bestsellers {
  padding: var(--space-xl) 0;
  background-color: var(--bg-secondary);
}

.homepage-bestsellers .products {
  margin-top: var(--space-lg);
}

/* === 4. TRUST SECTION === */

.homepage-trust {
  padding: var(--space-xl) 0;
}

.homepage-trust .product-trust-row {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

/* === 5. FAQ SECTION === */

.homepage-faq {
  padding: var(--space-xl) 0;
  background-color: var(--bg-secondary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  padding: var(--space-md) var(--space-lg);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: var(--space-lg);
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-question:hover {
  background-color: var(--bg-secondary);
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-md) var(--space-lg);
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

@media (max-width: 767px) {
  .faq-question {
    font-size: 1rem;
    padding-right: 3rem;
  }
}

/* === 6. FINAL CTA === */

.homepage-final-cta {
  padding: var(--space-3xl) var(--space-md);
  /*   background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);*/
  background: transparent;

  text-align: center;
  position: relative;
  overflow: hidden;
}

.homepage-final-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.03" d="M0,160L48,165.3C96,171,192,181,288,186.7C384,192,480,192,576,181.3C672,171,768,149,864,154.7C960,160,1056,192,1152,197.3C1248,203,1344,181,1392,170.7L1440,160L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z"></path></svg>')
    no-repeat top center;
  background-size: cover;
}

.final-cta-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.final-cta-headline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.final-cta-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
}

.final-cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.final-cta-button:hover {
  background-color: transparent;
  color: var(--text-inverse);
  border-color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767px) {
  .homepage-final-cta {
    padding: var(--space-xl) var(--space-md);
  }

  .final-cta-headline {
    font-size: 1.5rem;
  }

  .final-cta-subtitle {
    font-size: 1rem;
  }

  .final-cta-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* ========================================
   SINGLE PRODUCT - CONVERSION OPTIMIZATIONS
   ======================================== */

/* === JERARQUÍA VISUAL MEJORADA === */

/* Título: más prominente, mejor espaciado */
.single-product .product_title {
  font-size: 1.75rem; /* 28px móvil */
  line-height: 1.2;
  font-weight: 800; /* Aumentado de 700 a 800 */
  margin-bottom: var(--space-lg); /* Más espacio inferior */
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .single-product .product_title {
    font-size: 2.25rem; /* 36px desktop - aumentado */
    margin-bottom: var(--space-xl);
  }
}

/* Precio: más visible y prominente */
.single-product .price {
  font-size: 1.75rem; /* Aumentado de 1.5rem a 1.75rem */
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--primary-color); /* Usar color primario */
  display: block;
}

@media (min-width: 768px) {
  .single-product .price {
    font-size: 2rem; /* 32px desktop */
  }
}

.single-product .price del {
  font-size: 1.25rem; /* Aumentado para mejor legibilidad */
  color: var(--text-muted);
  margin-right: var(--space-sm);
  font-weight: 400;
}

.single-product .price ins {
  text-decoration: none;
  color: var(--error-color);
  font-weight: 800;
}

/* Descripción corta: mejor espaciado y legibilidad */
.single-product .woocommerce-product-details__short-description {
  font-size: 1rem;
  line-height: 1.7; /* Aumentado de 1.6 a 1.7 */
  color: var(--text-secondary);
  margin-bottom: var(--space-xl); /* Más espacio antes del CTA */
}

.single-product .woocommerce-product-details__short-description p {
  margin-bottom: var(--space-md);
}

.single-product .woocommerce-product-details__short-description p:last-child {
  margin-bottom: 0;
}

/* === BOTÓN ADD TO CART OPTIMIZADO === */

.single-product .single_add_to_cart_button {
  width: 100%;
  padding: 1.125rem 2rem; /* Aumentado de 1rem a 1.125rem */
  font-size: 1.125rem; /* Aumentado de 1rem a 1.125rem */
  font-weight: 700;
  margin-top: var(--space-lg);
  border-radius: 6px; /* Aumentado de 4px a 6px */
  transition: all 0.25s ease;
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 56px; /* Touch target óptimo */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.single-product .single_add_to_cart_button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  background-color: var(--secondary-color);
}

.single-product .single_add_to_cart_button:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .single-product .single_add_to_cart_button {
    width: auto;
    min-width: 280px; /* Aumentado de 200px */
    padding: 1.25rem 3rem;
  }
}

/* === TRUST ROW - MEJORADO === */

.product-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg); /* Aumentado de --space-md */
  padding: var(--space-xl) 0; /* Aumentado de --space-md */
  margin: var(--space-xl) 0; /* Aumentado de --space-lg */
  border-top: 2px solid var(--border-color); /* Aumentado de 1px */
  border-bottom: 2px solid var(--border-color);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-md); /* Aumentado de --space-sm */
  flex: 1 1 auto;
  min-width: 160px; /* Aumentado de 140px */
}

.trust-icon {
  width: 24px; /* Aumentado de 20px */
  height: 24px;
  color: var(--success-color);
  flex-shrink: 0;
}

.trust-text {
  font-size: 0.9375rem; /* Aumentado de 0.875rem */
  color: var(--text-primary); /* Cambiado de secondary a primary */
  font-weight: 600; /* Aumentado de 500 */
  line-height: 1.4;
}

@media (max-width: 767px) {
  .product-trust-row {
    flex-direction: column;
    gap: var(--space-md);
  }

  .trust-item {
    min-width: auto;
  }
}

/* === STICKY ADD TO CART - REFINADO === */

.sticky-add-to-cart-mobile {
  position: fixed;
  bottom: -100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15); /* Mejorada sombra */
  z-index: 999;
  transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Mejorada transición */
  display: none;
}

.sticky-add-to-cart-mobile.visible {
  bottom: 0;
}

.sticky-cart-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg); /* Aumentado de --space-md */
  gap: var(--space-lg);
}

.sticky-product-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
}

.sticky-product-name {
  font-size: 0.875rem;
  font-weight: 700; /* Aumentado de 600 */
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-product-price {
  font-size: 1.125rem; /* Aumentado de 1rem */
  font-weight: 800; /* Aumentado de 700 */
  color: var(--primary-color);
}

.sticky-cart-button {
  padding: 0.875rem 2rem; /* Aumentado de 0.75rem 1.5rem */
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 6px; /* Aumentado de 4px */
  font-size: 0.9375rem; /* Aumentado de 0.875rem */
  font-weight: 700; /* Aumentado de 600 */
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 50px; /* Touch target */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sticky-cart-button:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sticky-cart-button:active {
  transform: translateY(0);
}

@media (max-width: 767px) {
  .sticky-add-to-cart-mobile {
    display: block;
  }
}

/* === BENEFITS SECTION === */

.product-benefits-section {
  padding: var(--space-3xl) 0; /* 64px top/bottom */
  background-color: var(--bg-secondary);
  margin: var(--space-3xl) 0;
}

.benefits-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.benefits-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .benefits-title {
    font-size: 2rem;
  }
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2xl);
  }
}

.benefit-item {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-primary);
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.benefit-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  color: var(--text-inverse);
}

.benefit-icon svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.benefit-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* === VARIACIONES - MEJORADO === */

.single-product .variations {
  margin-bottom: var(--space-xl); /* Aumentado de --space-lg */
}

.single-product .variations td,
.single-product .variations th {
  padding: var(--space-md) 0; /* Aumentado de --space-sm */
}

.single-product .variations select {
  min-height: 44px; /* Touch target */
  padding: var(--space-sm) var(--space-md);
  font-size: 1rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.single-product .variations select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* === ESPACIADO ENTRE ELEMENTOS === */

.single-product .summary > * {
  margin-bottom: var(--space-lg); /* Aumentado de --space-md */
}

/* Form cart spacing */
.single-product .cart {
  margin-top: var(--space-xl);
}

/* Quantity selector */
.single-product .quantity {
  margin-bottom: var(--space-md);
}

.single-product .quantity input {
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  font-size: 1rem;
  border-radius: 4px;
}

/* === RESPONSIVE - SINGLE PRODUCT === */

.single-product .summary {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  .single-product .summary {
    padding: var(--space-lg); /* Aumentado de --space-md */
  }

  /* Reducir espacios en móvil para que quepa en viewport */
  .single-product .product_title {
    margin-bottom: var(--space-md);
  }

  .single-product .price {
    margin-bottom: var(--space-md);
  }

  .single-product .woocommerce-product-details__short-description {
    margin-bottom: var(--space-lg);
  }
}

/* ========================================
   SHOP ARCHIVE / CATEGORY - OPTIMIZATIONS V2
   ======================================== */

/* === PRODUCT CARDS - JERARQUÍA MEJORADA === */

/* Precio más prominente en archive */
.products .product .price,
.woocommerce-loop-product .price {
  font-size: 1.25rem; /* Aumentado de 1.125rem */
  font-weight: 800; /* Aumentado de 700 */
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
  display: block;
}

.products .product .price del {
  font-size: 0.9375rem; /* Aumentado de 0.875rem */
  color: var(--text-muted);
  font-weight: 400;
  margin-right: var(--space-xs);
}

.products .product .price ins {
  text-decoration: none;
  color: var(--error-color);
  font-weight: 800;
}

/* Título consistente - sin forzar overflow hidden que puede cortar contenido */
.products .product h3,
.products .product .woocommerce-loop-product__title,
.woocommerce-loop-product__title {
  font-size: 0.9375rem; /* 15px */
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  /* Removido min-height y overflow hidden para evitar clipping */
}

.products .product h3 a,
.woocommerce-loop-product__title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.products .product h3 a:hover,
.woocommerce-loop-product__title a:hover {
  color: var(--primary-color);
}

/* Product card mejoras visuales - SIN sobrescribir layout del tema padre */
.products .product,
.woocommerce-loop-product {
  position: relative;
  /* NO forzar flexbox - dejar que el tema maneje el layout */
  transition: all 0.3s ease;
}

.products .product:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

/* Imagen del producto */
.products .product .woocommerce-loop-product__link,
.products .product img {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.products .product img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.products .product:hover img {
  transform: scale(1.05);
}

/* Add to cart button mejorado */
.products .product .button,
.products .product .add_to_cart_button,
.woocommerce-loop-product .button {
  width: 100%;
  padding: 0.75rem 1rem; /* Aumentado */
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px; /* Aumentado de 4px */
  transition: all 0.25s ease;
  margin-top: auto; /* Push al final del card */
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.products .product .button:hover,
.products .product .add_to_cart_button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === SHOP BAR - MAYOR VISIBILIDAD === */

/* Shop bar más prominente */
.woocommerce-ordering,
.shop_bar,
.woocommerce-result-count {
  font-size: 0.9375rem; /* Aumentado */
}

.shop_bar {
  background: var(--bg-secondary);
  padding: var(--space-lg);
  border-radius: 8px;
  margin-bottom: var(--space-xl);
  border: 2px solid var(--border-color);
}

/* Filter button más visible */
.shop_bar .filter-button,
.shop_bar .thb-filter-trigger,
.thb-filter-trigger {
  padding: 0.75rem 1.5rem; /* Aumentado */
  background-color: var(--primary-color);
  color: var(--text-inverse);
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem; /* Aumentado */
  font-weight: 700; /* Aumentado de 600 */
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shop_bar .filter-button:hover,
.shop_bar .thb-filter-trigger:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sorting dropdown mejorado */
.woocommerce-ordering select,
.shop_bar select,
select.orderby {
  padding: 0.75rem 2.5rem 0.75rem 1rem; /* Aumentado */
  font-size: 0.9375rem; /* Aumentado */
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.woocommerce-ordering select:hover,
.shop_bar select:hover {
  border-color: var(--primary-color);
  background-color: var(--bg-secondary);
}

.woocommerce-ordering select:focus,
.shop_bar select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Result count más visible */
.woocommerce-result-count,
.shop_bar .woocommerce-result-count {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* === MOBILE GRID - MEJOR LEGIBILIDAD === */

@media (max-width: 767px) {
  /* Gutter aumentado para respiración */
  .products .product {
    padding-left: 0.75rem; /* Aumentado de 0.625rem */
    padding-right: 0.75rem;
    margin-bottom: var(--space-lg);
  }

  /* Card con padding interno consistente */
  .products .product,
  .woocommerce-loop-product {
    padding: var(--space-sm);
  }

  /* Título más legible */
  .products .product h3,
  .woocommerce-loop-product__title {
    font-size: 0.875rem; /* Aumentado de 0.8125rem */
    line-height: 1.4;
  }

  /* Precio legible */
  .products .product .price {
    font-size: 1.125rem; /* Aumentado de 1rem */
  }

  /* Shop bar: stack vertical */
  .shop_bar {
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .shop_bar > * {
    width: 100%;
  }

  /* Result count visible en móvil */
  .woocommerce-result-count {
    display: block !important;
    text-align: center;
    font-size: 0.875rem;
    padding: var(--space-sm) 0;
  }

  /* Filter button full width */
  .shop_bar .filter-button,
  .shop_bar .thb-filter-trigger {
    width: 100%;
    justify-content: center;
  }

  /* Sorting full width */
  .woocommerce-ordering select,
  .shop_bar select {
    width: 100%;
  }

  /* Thumbnail proporción cuadrada */
  .products .product .woocommerce-loop-product__link {
    aspect-ratio: 1 / 1;
    overflow: hidden;
  }

  .products .product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* === TABLET OPTIMIZATIONS === */

@media (min-width: 768px) and (max-width: 1023px) {
  .products .product h3,
  .woocommerce-loop-product__title {
    font-size: 0.875rem;
  }

  .products .product .price {
    font-size: 1.125rem;
  }
}

/* === DESKTOP OPTIMIZATIONS === */

@media (min-width: 1024px) {
  .shop_bar {
    padding: var(--space-lg) var(--space-xl);
  }

  /* Grid de 4 columnas más espaciado */
  .products .product {
    margin-bottom: var(--space-2xl);
  }
}

/* === CATEGORY INTRO SECTION === */

.category-intro-section {
  position: relative;
  padding: var(--space-3xl) var(--space-lg);
  /*   background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  ); */
  background: transparent;
  color: var(--text-inverse);
  text-align: center;
  margin-bottom: var(--space-2xl);
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Overlay para background image */
.category-intro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(231, 76, 60, 0.9) 0%,
    rgba(52, 152, 219, 0.9) 100%
  );
  z-index: 1;
}

/* Contenido sobre overlay */
.category-intro-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.category-intro-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--text-inverse);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .category-intro-title {
    font-size: 2.75rem;
  }
}

@media (min-width: 1024px) {
  .category-intro-title {
    font-size: 3.5rem;
  }
}

.category-intro-description {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
  color: var(--text-inverse);
  opacity: 0.95;
}

@media (min-width: 768px) {
  .category-intro-description {
    font-size: 1.25rem;
  }
}

.category-intro-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--bg-primary);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-intro-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: var(--text-inverse);
  color: var(--secondary-color);
}

/* Responsive mobile */
@media (max-width: 767px) {
  .category-intro-section {
    padding: var(--space-2xl) var(--space-md);
    margin-bottom: var(--space-xl);
  }

  .category-intro-title {
    font-size: 1.75rem;
  }

  .category-intro-description {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
  }

  .category-intro-cta {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 0.875rem 2rem;
  }
}
