/* =================================================================
   HEALINGGREENS & ESSENTIALS — theme.css
   ================================================================= */

/* -----------------------------------------------------------------
   0. CSS Custom Properties (defaults — overridden by Customizer JS)
   ----------------------------------------------------------------- */
:root {
  /* Tokens alineados con healinggreens-cursor-wp-theme (Lovable) — HSL en index.css */
  --color-primary:    #3f5c3f;
  --color-primary-fg: #ffffff;
  --color-accent:     #b8913a;
  --color-background: #f5f7f4;
  --color-foreground: #232a23;
  --color-secondary:  #e8ebe4;
  --color-muted:      #6c7a6c;
  --color-border:     #d1dcd1;
  --color-card:       #eef0ea;
  /* Fondo de miniaturas (equiv. muted/50 en Lovable) */
  --color-muted-surface: #e2e6e0;
  --logo-height:      3.5rem;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --shadow-soft:     0 4px 20px -4px rgba(30, 40, 30, 0.08);
  --shadow-elevated: 0 8px 40px -8px rgba(30, 40, 30, 0.15);
  --shadow-card-hover: 0 20px 40px -12px rgba(30, 40, 30, 0.15);
  --transition:      cubic-bezier(0.4, 0, 0.2, 1);

  --btn-radius:          0;
  --btn-height:          48px;
  --btn-padding:         0 2rem;
  --btn-font-size:       0.875rem;
  --btn-font-weight:     500;
  --btn-letter-spacing:  0.1em;
  --btn-text-transform:  uppercase;

  /* Header en estado sólido: h-16 / h-20 (Lovable) */
  --header-height: 4rem;
  --card-radius: 0;
  --section-padding: 2rem;
  --checkout-gap: 2rem;
  /* Alineado con Lovable: container-wide = tailwind px-6 (+ lg:px-8) */
  --gutter-x: 1.5rem;
}
@media (min-width: 1024px) {
  :root {
    --header-height: 5rem;
    --gutter-x: 2rem;
  }
}

/* -----------------------------------------------------------------
   1. RESET & BASE
   ----------------------------------------------------------------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); line-height: 1.2; }

/* Evita desbordes laterales (flex/grids) en móvil y tablet */
main#main-content,
main.site-main,
#primary.content-area,
.page-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* -----------------------------------------------------------------
   2. LAYOUT HELPERS
   ----------------------------------------------------------------- */
.container-wide {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  box-sizing: border-box;
  padding-left: max(var(--gutter-x, 1.5rem), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter-x, 1.5rem), env(safe-area-inset-right, 0px));
}

/* Inicio: más aire lateral en móvil/tablet (featured, about, shop, testimonials, contact) */
@media (max-width: 1023px) {
  body.front-page #main-content .featured-section > .container-wide,
  body.front-page #main-content .about-section > .container-wide,
  body.front-page #main-content .shop-section > .container-wide,
  body.front-page #main-content .testimonials-section > .container-wide,
  body.front-page #main-content .contact-section > .container-wide,
  body.home #main-content .featured-section > .container-wide,
  body.home #main-content .about-section > .container-wide,
  body.home #main-content .shop-section > .container-wide,
  body.home #main-content .testimonials-section > .container-wide,
  body.home #main-content .contact-section > .container-wide {
    padding-left: max(1.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.75rem, env(safe-area-inset-right, 0px));
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  body.front-page #main-content .featured-section > .container-wide,
  body.front-page #main-content .about-section > .container-wide,
  body.front-page #main-content .shop-section > .container-wide,
  body.front-page #main-content .testimonials-section > .container-wide,
  body.front-page #main-content .contact-section > .container-wide,
  body.home #main-content .featured-section > .container-wide,
  body.home #main-content .about-section > .container-wide,
  body.home #main-content .shop-section > .container-wide,
  body.home #main-content .testimonials-section > .container-wide,
  body.home #main-content .contact-section > .container-wide {
    padding-left: max(2.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(2.25rem, env(safe-area-inset-right, 0px));
  }
}

/* -----------------------------------------------------------------
   3. BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: var(--btn-text-transform);
  padding: var(--btn-padding);
  min-height: var(--btn-height);
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition:
    opacity 0.2s var(--transition),
    transform 0.2s var(--transition),
    background-color 0.2s var(--transition),
    color 0.2s var(--transition),
    border-color 0.2s var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover {
  opacity: 0.92;
  transform: scale(1.04);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  opacity: 0.95;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-foreground);
  border-color: var(--color-secondary);
}
.btn-secondary:hover { opacity: 0.88; }

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-foreground);
  color: var(--color-foreground);
}
.btn-outline:hover {
  background-color: var(--color-foreground);
  color: var(--color-background);
}

/* -----------------------------------------------------------------
   4. HEADER
   ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header .container-wide {
  min-width: 0;
  max-width: 100%;
}

.site-header.is-solid {
  background-color: rgba(245, 247, 244, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: var(--color-border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
  min-width: 0;
  width: 100%;
  gap: 0.75rem;
  transition: height 0.3s var(--transition);
}
@media (min-width: 1024px) {
  .site-nav { gap: 1.5rem; }
}
.site-header.is-solid .site-nav {
  height: var(--header-height);
}

.site-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  text-decoration: none;
}
@media (min-width: 1024px) {
  .site-logo-link { gap: 0.75rem; flex: 0 1 auto; }
}

.site-logo-img {
  height: var(--logo-height) !important;
  width: auto !important;
  display: block;
  object-fit: contain;
  transition: height 0.3s ease, filter 0.3s ease;
}

/* Header: logo transparente h-20 / lg h-28 (Lovable); sólido h-12 / lg h-14 */
.site-logo-img--header {
  height: 5rem !important;
  max-height: none;
  filter: brightness(0) invert(1);
  transition: height 0.3s var(--transition), filter 0.3s ease;
}
@media (min-width: 1024px) {
  .site-header:not(.is-solid) .site-logo-img--header {
    height: 7rem !important;
  }
}
.site-header.is-solid .site-logo-img--header {
  height: 3rem !important;
  filter: none;
}
@media (min-width: 1024px) {
  .site-header.is-solid .site-logo-img--header {
    height: 3.5rem !important;
  }
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.site-logo-name {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3.2vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease, font-size 0.3s ease;
}
@media (min-width: 1024px) {
  .site-header:not(.is-solid) .site-logo-name {
    font-size: 1.875rem;
  }
}
.site-header.is-solid .site-logo-name {
  color: var(--color-foreground);
  font-size: 1.25rem;
}
@media (min-width: 1024px) {
  .site-header.is-solid .site-logo-name {
    font-size: 1.5rem;
  }
}

.site-nav__right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
}
@media (min-width: 1024px) {
  .site-nav__right { gap: 2rem; }
}

.site-nav__links { display: none; }
@media (min-width: 768px) {
  .site-nav__links { display: flex; }
}

/* WP menu overrides for nav */
.theme-nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.theme-nav-list li a,
.site-nav__links > ul > li > a {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  transition: color 0.3s var(--transition);
  text-decoration: none;
}
@media (min-width: 1024px) {
  .theme-nav-list li a,
  .site-nav__links > ul > li > a {
    font-size: 1.125rem;
  }
}
.site-header.is-solid .theme-nav-list li a,
.site-header.is-solid .site-nav__links > ul > li > a {
  color: var(--color-foreground);
}
.theme-nav-list li a::after,
.site-nav__links > ul > li > a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.theme-nav-list li a:hover::after,
.site-nav__links > ul > li > a:hover::after { transform: scaleX(1); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn {
  position: relative;
  padding: 0.5rem;
  color: #fff;
  transition: opacity 0.2s ease, color 0.3s ease;
  background: none;
  border: none;
}
.cart-btn:hover { opacity: 0.6; }
.site-header.is-solid .cart-btn { color: var(--color-foreground); }

.theme-cart-count {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 1.25rem; height: 1.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-cart-count:empty { display: none; }

.mobile-menu-btn {
  padding: 0.5rem;
  color: #fff;
  transition: color 0.3s ease, opacity 0.2s ease;
}
.mobile-menu-btn:hover { opacity: 0.6; }
.site-header.is-solid .mobile-menu-btn { color: var(--color-foreground); }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: 1rem 0;
  animation: fadeIn 0.3s ease;
}
.mobile-menu.is-open { display: block; }

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-nav-link {
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--color-foreground);
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--color-muted); }

/* -----------------------------------------------------------------
   5. HERO SECTION
   ----------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 90vh;
  background-color: var(--color-foreground);
  overflow: hidden;
}
@media (min-width: 768px) { .hero-section { min-height: 100vh; } }

.hero-video-wrap {
  position: absolute;
  inset: 0;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(35, 42, 35, 0.9),
    rgba(35, 42, 35, 0.7),
    rgba(35, 42, 35, 0.4)
  );
  transition: opacity 0.15s ease;
}

.hero-content {
  position: relative;
  z-index: 10;
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
  transition: opacity 0.1s ease, transform 0.1s ease;
}
@media (min-width: 768px) {
  .hero-content {
    min-height: 100vh;
    padding-bottom: 4rem;
  }
}

.hero-text {
  max-width: 36rem;
}
.max-w-xl {
  max-width: 36rem;
}

/* Título héroe: misma intención que Lovable (text-4xl md:6xl lg:7xl, tracking-tight, mb-2 / mb-6 por línea) */
.hero-heading {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: #fff;
}
.hero-line {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  font-size: clamp(2.25rem, 5vw, 3.4rem);
  animation: heroSlideUp 1s var(--transition) 0.5s both;
}
@media (min-width: 768px) {
  .hero-line {
    font-size: clamp(3.75rem, 7vw, 4.5rem);
  }
}
@media (min-width: 1280px) {
  .hero-line {
    font-size: 4.5rem;
  }
}
/* mb-2 y mb-6 de Tailwind (0.5rem y 1.5rem) — sin <br> para no duplicar interlineado */
.hero-line--1 {
  margin-bottom: 0.5rem;
}
.hero-line--2 {
  margin-bottom: 1.5rem;
  animation-delay: 0.65s;
}

.hero-subtext {
  color: rgba(255, 255, 255, 0.95);
  max-width: 28rem;
  margin: 0 0 2.5rem;
  font-size: 1rem;
  line-height: 1.7;
  font-family: var(--font-body);
  animation: heroTextReveal 0.8s var(--transition) 0.9s both;
}

@keyframes heroTextReveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* CTA héroe: relleno verde + tracking (Lovable Shop Now) */
.hero-btn--shop {
  padding: 0 2.5rem;
  min-height: 3.25rem;
  letter-spacing: 0.15em;
  font-size: 0.875rem;
  line-height: 1;
  animation: heroSlideUp 0.7s var(--transition) 1.1s both;
  border: 2px solid var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
}
.hero-btn--shop:hover {
  opacity: 0.95;
  transform: scale(1.04);
  color: var(--color-primary-fg);
}
.hero-btn--shop:active {
  transform: scale(0.97);
}

@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------------
   6. FEATURED STRIP
   ----------------------------------------------------------------- */
.featured-section {
  background: linear-gradient(180deg, var(--color-background) 0%, var(--color-secondary) 12%, var(--color-secondary) 100%);
  border-top: 1px solid var(--color-border);
}
.featured-inner { padding: 3.5rem 0; }
@media (min-width: 768px) { .featured-inner { padding: 5rem 0; } }

.featured-header { margin-bottom: 2.5rem; }
.featured-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.featured-subtext {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-style: italic;
  max-width: 32rem;
  line-height: 1.7;
}
.featured-rule {
  width: 4rem; height: 2px;
  background-color: var(--color-primary);
  margin-top: 1rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 768px) {
  .featured-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.featured-item { display: block; }

.featured-img-wrap {
  background-color: var(--color-muted-surface);
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}
.featured-item:hover .featured-img { transform: scale(1.05); }
.featured-item-name {
  font-size: 0.875rem;
  color: var(--color-foreground);
  font-family: var(--font-body);
}

/* -----------------------------------------------------------------
   7. LIFESTYLE SECTION
   ----------------------------------------------------------------- */
.lifestyle-section { background-color: var(--color-secondary); }
.lifestyle-inner { padding: 4rem 0; text-align: center; }
@media (min-width: 768px) { .lifestyle-inner { padding: 6rem 0; } }

.lifestyle-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}
.lifestyle-subtext {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-style: italic;
  max-width: 32rem;
  margin: 0 auto 3.5rem;
  line-height: 1.7;
}
@media (min-width: 768px) {
  .lifestyle-subtext {
    font-size: 1rem;
  }
}

/* Alineado a Lovable: grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 max-w-4xl mx-auto */
.lifestyle-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
  min-width: 0;
  width: 100%;
}
@media (min-width: 768px) {
  .lifestyle-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  .lifestyle-card:nth-child(odd) {
    border-right: 1px solid var(--color-border);
    padding-right: 1.5rem;
  }
  .lifestyle-card:nth-child(even) {
    padding-left: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .lifestyle-card:nth-child(odd) { padding-right: 2rem; }
  .lifestyle-card:nth-child(even) { padding-left: 2rem; }
}

.lifestyle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.lifestyle-card__img {
  width: 8rem; height: 8rem;
  object-fit: contain;
  margin-bottom: 1.5rem;
}
.lifestyle-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
@media (min-width: 768px) { .lifestyle-card__title { font-size: 1.5rem; } }

.lifestyle-card__text {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-style: italic;
  max-width: 20rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.lifestyle-btn {
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  padding: 0 1.5rem;
  min-height: 2.5rem;
}

/* -----------------------------------------------------------------
   8. ABOUT SECTION
   ----------------------------------------------------------------- */
.about-section {
  background-color: var(--color-secondary);
  scroll-margin-top: 6rem;
}
.about-inner {
  padding: 4rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  min-width: 0;
  width: 100%;
}
@media (min-width: 768px) {
  .about-inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 6rem 0;
  }
}

.about-img-col { overflow: hidden; }
.about-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.about-img-col:hover .about-img { transform: scale(1.03); }

.about-text-col { display: flex; flex-direction: column; justify-content: center; }
.about-logo {
  width: 8rem; height: 8rem;
  object-fit: cover;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .about-logo { width: 10rem; height: 10rem; }
}

.about-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-family: var(--font-body);
  display: block;
}
.about-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin: 0.5rem 0 1.5rem;
}
.about-accent { color: var(--color-primary); }
.about-body { display: flex; flex-direction: column; gap: 1rem; }
.about-body p {
  color: var(--color-muted);
  line-height: 1.75;
  font-size: 0.9375rem;
}
.about-signoff {
  font-weight: 500;
  color: var(--color-foreground) !important;
  font-size: 1.1rem !important;
}

/* -----------------------------------------------------------------
   9. SHOP SECTION
   ----------------------------------------------------------------- */
.shop-section { scroll-margin-top: 6rem; }
.shop-inner { padding: 4rem 0; }
@media (min-width: 768px) { .shop-inner { padding: 5rem 0; } }

.shop-header { text-align: center; margin-bottom: 3rem; }
.shop-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: block;
  margin-bottom: 0.5rem;
}
.shop-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
}

/* Filter buttons */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.filter-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  background-color: var(--color-secondary);
  color: var(--color-foreground);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.filter-btn:hover {
  background-color: #dce3d9;
}
.filter-btn--active {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
}
.filter-btn--active:hover {
  background-color: var(--color-primary);
  opacity: 0.9;
  color: var(--color-primary-fg);
}
.filter-btn--price .chevron-icon { transition: transform 0.3s ease; }
.filter-btn--price.is-open .chevron-icon { transform: rotate(180deg); }

/* Price range */
.price-filter-wrap {
  max-width: 24rem;
  margin: 0.5rem auto 0;
  padding: 0.5rem 0;
}
.price-range-container { padding: 0.5rem 0; }

/* Barra de rango: ancho completo (Lovable) — el “mínimo” inicia a la izquierda */
.price-range-wrapper {
  position: relative;
  width: 100%;
  height: 22px;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
  touch-action: none;
}
.range-track-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: var(--color-border);
  border-radius: 2px;
  z-index: 0;
  pointer-events: none;
}
.range-input {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: none;
  cursor: pointer;
  z-index: 1;
  pointer-events: auto;
}
/* z-index de min/max se fija en JS (qué control está “arriba”) — no fijar max siempre arriba */
.range-input--min,
.range-input--max {
  z-index: 1;
}
.range-input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}
.range-input::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--color-primary);
  margin-top: -7px;
  cursor: grab;
  position: relative;
}
.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  cursor: grab;
}
.range-track-fill {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 4px;
  margin-top: -2px;
  background: var(--color-primary);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}
.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* Product Grid */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.show-more-wrap {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 1rem;
}

.shop-empty { grid-column: 1 / -1; text-align: center; padding: 5rem 0; color: var(--color-muted); }

/* -----------------------------------------------------------------
   10. PRODUCT CARD (Sections 31.3, 31.9)
   ----------------------------------------------------------------- */
.theme-product-card-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.theme-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition:
    transform 0.4s var(--transition),
    box-shadow 0.4s var(--transition);
}
.theme-product-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: var(--shadow-card-hover);
}

.theme-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
}
/* Quitar pointer-events a hijos, pero nunca al enlace: si * incluye .theme-card-link, anula pointer-events y el overlay no hace click (tienda, relacionados, etc.). */
.theme-product-card *:not(.theme-card-link) { pointer-events: none; }

.theme-product-card__image-wrapper {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background-color: var(--color-secondary);
  margin-bottom: 1rem;
  box-shadow: none;
}
.theme-product-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}
.theme-product-card:hover .theme-product-card__img { transform: scale(1.08); }
.is-sold-out-img { opacity: 0.6; }

.sold-out-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background-color: var(--color-foreground);
  color: var(--color-background);
  z-index: 2;
}

.theme-product-card__hover-overlay {
  position: absolute;
  inset: 0;
  background-color: transparent;
  transition: background-color 0.5s ease;
  pointer-events: none;
}
.theme-product-card:hover .theme-product-card__hover-overlay {
  background-color: rgba(30,40,30,.05);
}

.theme-product-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.theme-product-card__name {
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: color 0.3s ease;
}
.theme-product-card:hover .theme-product-card__name { color: var(--color-primary); }

.theme-product-card__price {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 600;
}
.theme-product-card__price .amount { color: var(--color-muted); }

/* add_to_cart pointer events for the card */
.add_to_cart_button.ajax_add_to_cart {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

/* -----------------------------------------------------------------
   11. TESTIMONIALS SECTION
   ----------------------------------------------------------------- */
.testimonials-section {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  scroll-margin-top: 6rem;
}
.testimonials-inner { padding: 4rem 0; }
@media (min-width: 768px) { .testimonials-inner { padding: 6rem 0; } }

.testimonials-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  text-align: center;
  margin-bottom: 3rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card {
  background-color: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
@media (min-width: 768px) { .testimonial-card { padding: 2rem; } }
.testimonial-card:hover {
  transform: translateY(-0.5rem);
  background-color: rgba(255,255,255,.15);
  box-shadow: var(--shadow-elevated);
}

.testimonial-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 1rem;
}
.star-icon { width: 16px; height: 16px; }
.star-filled { color: var(--color-accent); }
.star-empty { color: rgba(255,255,255,.3); }
.testimonial-text {
  font-size: 0.875rem;
  line-height: 1.7;
  opacity: 0.85;
}

/* -----------------------------------------------------------------
   12. CTA SECTION
   ----------------------------------------------------------------- */
.cta-section {
  position: relative;
  color: #fff;
  padding: 7rem 0;
  text-align: center;
  overflow: hidden;
}
@media (min-width: 768px) { .cta-section { padding: 10rem 0; } }

.cta-bg-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(30,40,30,.6);
}
.cta-content {
  position: relative;
  z-index: 10;
}
.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}
.cta-subtext {
  opacity: 0.9;
  max-width: 28rem;
  margin: 0 auto 2rem;
  font-family: var(--font-body);
  line-height: 1.7;
}
.cta-btn {
  background-color: var(--color-secondary);
  color: var(--color-foreground);
  border-color: var(--color-secondary);
}
.cta-btn:hover { opacity: 0.9; }

/* -----------------------------------------------------------------
   13. CONTACT SECTION
   ----------------------------------------------------------------- */
.contact-section {
  background-color: var(--color-foreground);
  color: #fff;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  scroll-margin-top: 6rem;
}
.contact-inner { padding: 5rem 0; }
@media (min-width: 768px) { .contact-inner { padding: 7rem 0; } }

.contact-header { text-align: center; margin-bottom: 4rem; }
.contact-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  display: block;
  margin-bottom: 0.75rem;
}
.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
.contact-subtext {
  color: rgba(255,255,255,.6);
  max-width: 28rem;
  margin: 0 auto;
  line-height: 1.7;
}

.contact-grid {
  max-width: 56rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.contact-form-col { order: 2; }
@media (min-width: 1024px) { .contact-form-col { order: 1; } }
.contact-info-col { order: 1; }
@media (min-width: 1024px) { .contact-info-col { order: 2; } }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }

.contact-form__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,.5);
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
}
.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0.75rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 0.875rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s ease;
}
.contact-form__input::placeholder,
.contact-form__textarea::placeholder { color: rgba(255,255,255,.3); }
.contact-form__input:focus,
.contact-form__textarea:focus { border-bottom-color: var(--color-primary); }
.contact-form__textarea { resize: none; rows: 8; }

.contact-form__actions { padding-top: 0.5rem; }

.contact-submit-btn {
  width: 100%;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
}
@media (min-width: 768px) { .contact-submit-btn { width: auto; } }

/* Success state */
.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  text-align: center;
  animation: fadeIn 0.5s ease;
}
.contact-success__icon {
  width: 4rem; height: 4rem;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.contact-success__heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.contact-success__text { color: rgba(255,255,255,.6); }

/* Info card */
.contact-info-card {
  background-color: rgba(255,255,255,.05);
  border-radius: 0.5rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-info__heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.contact-info__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255,255,255,.7);
  font-size: 0.875rem;
  font-family: var(--font-body);
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-info__item:hover { color: #fff; }
.contact-info__icon-wrap {
  width: 2.5rem; height: 2.5rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}
.contact-info__item:hover .contact-info__icon-wrap { background-color: rgba(255,255,255,.1); }

.contact-social { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; }
.contact-social__label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 1rem;
}
.contact-social__icons { display: flex; gap: 0.75rem; }
.contact-social__btn {
  width: 2.5rem; height: 2.5rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.contact-social__btn:hover {
  background-color: rgba(255,255,255,.1);
  color: #fff;
}

/* -----------------------------------------------------------------
   14. FOOTER
   ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--color-border); }
.site-footer .container-wide {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
@media (min-width: 1024px) {
  .site-footer .container-wide {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.footer-logo-link { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.site-logo-img--footer { height: 2.5rem !important; width: auto !important; }
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-foreground);
}

.footer-brand-text {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  max-width: 20rem;
  line-height: 1.7;
}
.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.footer-social-link {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-family: var(--font-body);
}
.footer-social-link:hover { color: var(--color-foreground); }

.footer-col-heading {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

/* Footer nav (wp_nav_menu output) */
.footer-nav-list,
.theme-footer-nav-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-nav-list li a,
.theme-footer-nav-list li a {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}
.footer-nav-list li a:hover,
.theme-footer-nav-list li a:hover { color: var(--color-foreground); }

.footer-contact-list { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-family: var(--font-body);
}
.footer-contact-link {
  text-decoration: none;
  color: var(--color-muted);
  transition: color 0.2s ease;
}
.footer-contact-link:hover { color: var(--color-foreground); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
.footer-copyright, .footer-credit {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: var(--font-body);
}
.footer-credit { text-decoration: none; transition: color 0.2s ease; }
.footer-credit:hover { color: var(--color-foreground); }

/* -----------------------------------------------------------------
   15. CART DRAWER
   ----------------------------------------------------------------- */
body.cart-open { overflow: hidden; }

#theme-cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(30,40,30,.2);
  z-index: 1100;
  cursor: pointer;
}
body.cart-open #theme-cart-overlay { display: block; }

#theme-cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 100%;
  max-width: 28rem;
  background-color: var(--color-background);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-elevated);
  transform: translateX(100%);
  transition: transform 0.35s var(--transition);
}
body.cart-open #theme-cart-drawer { transform: translateX(0); }

#theme-cart-drawer.is-updating {
  opacity: 0.6;
  pointer-events: none;
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.cart-drawer__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.cart-drawer__close {
  padding: 0.25rem;
  transition: opacity 0.2s ease;
  color: var(--color-foreground);
}
.cart-drawer__close:hover { opacity: 0.6; }

.cart-drawer__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  gap: 1.5rem;
  color: var(--color-muted);
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
}
.cart-item__img-link {
  position: relative;
  display: block;
  width: 5rem;
  height: 6rem;
  background-color: var(--color-secondary);
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
#theme-cart-drawer .cart-item__img-link .cart-item__img,
body.woocommerce #theme-cart-drawer .cart-item__img {
  max-width: none;
  max-height: none;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
}
.cart-item__details { flex: 1; min-width: 0; }
.cart-item__name {
  font-size: 0.875rem;
  font-weight: 500;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-body);
  color: var(--color-foreground);
  text-decoration: none;
  transition: opacity 0.2s;
}
.cart-item__name:hover { opacity: 0.7; }
.cart-item__variation {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}
.cart-item__price {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  font-family: var(--font-body);
}
.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.cart-qty-btn {
  padding: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0.25rem;
  color: var(--color-foreground);
}
.cart-qty-btn:hover { background-color: var(--color-secondary); }
.cart-item__qty {
  font-size: 0.875rem;
  min-width: 1.5rem;
  text-align: center;
  font-family: var(--font-body);
}
.cart-item__remove {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}
.cart-item__remove:hover { color: var(--color-foreground); }

.cart-drawer__footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}
.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-family: var(--font-body);
}
.cart-subtotal-label { color: var(--color-muted); }
.cart-subtotal-value { font-weight: 500; }
.cart-free-shipping {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-family: var(--font-body);
}
.cart-checkout-btn { width: 100%; }

/* -----------------------------------------------------------------
   16. WOOCOMMERCE ADD-TO-CART BUTTON (Section 11.4.1)
   ----------------------------------------------------------------- */
.single_add_to_cart_button.button,
.add_to_cart_button.button,
a.single_add_to_cart_button,
a.add_to_cart_button {
  background-color: var(--color-primary) !important;
  color: var(--color-primary-fg) !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  min-height: var(--btn-height) !important;
  padding: var(--btn-padding) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: var(--font-body) !important;
  font-size: var(--btn-font-size) !important;
  font-weight: var(--btn-font-weight) !important;
  letter-spacing: var(--btn-letter-spacing) !important;
  text-transform: var(--btn-text-transform) !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease !important;
  text-decoration: none !important;
}
.single_add_to_cart_button.button:hover,
.add_to_cart_button.button:hover {
  opacity: 0.85 !important;
  background-color: var(--color-primary) !important;
  color: var(--color-primary-fg) !important;
}

/* Disabled state (Section 11.4.1) */
.single_add_to_cart_button.button:disabled,
.single_add_to_cart_button.button.disabled,
.add_to_cart_button.button:disabled,
.add_to_cart_button.button.disabled {
  cursor: not-allowed !important;
  opacity: 0.4 !important;
  pointer-events: none !important;
}
.single_add_to_cart_button.button:disabled:hover,
.single_add_to_cart_button.button.disabled:hover,
.add_to_cart_button.button:disabled:hover,
.add_to_cart_button.button.disabled:hover {
  opacity: 0.4 !important;
  background-color: var(--color-primary) !important;
}

/* Button lock during AJAX request (Section 31.8) */
.ajax_add_to_cart.theme-btn-loading {
  opacity: 0.6 !important;
  pointer-events: none !important;
  cursor: wait !important;
}

/* Hide "View cart" after AJAX add (Section 11.4.2) */
.woocommerce-page a.added_to_cart.wc-forward,
.single-product a.added_to_cart.wc-forward,
body a.added_to_cart.wc-forward { display: none !important; }

/* -----------------------------------------------------------------
   17. SINGLE PRODUCT PAGE
   ----------------------------------------------------------------- */
.single-product {
  padding-top: var(--header-height);
  min-height: 100vh;
}

.single-product-container { padding-bottom: 5rem; }

.single-product-back { padding: 1.5rem 0; }
.back-to-shop-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  text-decoration: none;
  font-family: var(--font-body);
  transition: color 0.2s ease;
}
.back-to-shop-link:hover { color: var(--color-foreground); }

/* Two-column layout */
.theme-product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 5rem;
}
@media (min-width: 1024px) {
  .theme-product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Gallery */
.theme-product-gallery { min-width: 0; }
.theme-product-main-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  background-color: var(--color-secondary);
  overflow: hidden;
  margin-bottom: 1rem;
}
.theme-product-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Gana a `img, video { height: auto }` (tema) y a `.woocommerce img` (WooCommerce). */
body.single-product .theme-product-main-img-wrap img.theme-product-main-img#product-main-img,
body.woocommerce .theme-product-main-img-wrap img.theme-product-main-img#product-main-img,
body.single-product .theme-product-gallery .theme-product-main-img-wrap .theme-product-main-img,
body.woocommerce .theme-product-gallery .theme-product-main-img-wrap .theme-product-main-img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.theme-product-thumbnails {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
}
.theme-product-thumb {
  aspect-ratio: 1/1;
  width: 5rem;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  padding: 0;
  background: none;
  flex-shrink: 0;
}
.theme-product-thumb:not(.is-active) { opacity: 0.6; }
.theme-product-thumb.is-active { border-color: var(--color-primary); opacity: 1; }
.theme-product-thumb:hover { opacity: 1; }
.theme-product-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Product info */
.theme-product-info { min-width: 0; max-width: 100%; }
@media (min-width: 1024px) { .theme-product-info { padding-top: 2.5rem; } }

.product-categories {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}
.product-categories a { color: var(--color-muted); text-decoration: none; }
.product-categories a:hover { color: var(--color-foreground); }

.product-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}
.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
}
.product-price .woocommerce-Price-amount { color: var(--color-primary); }

.woocommerce-product-details__description {
  color: var(--color-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Add to cart area */
.theme-add-to-cart-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.single_add_to_cart_button { flex: 1 1 auto; min-width: 160px; }

/* Variations table layout (Section 11.5.1) */
.single-product .variations.shop_attributes tbody,
.single-product .variations tbody tr,
.single-product .variations tbody td {
  display: block;
  width: 100%;
}
.single-product .variations tbody td.label { padding-bottom: 0.25rem; }
.single-product .variations tbody td.value { padding-top: 0; }

/* Hidden variation select (Section 11.5.2) */
.theme-attr-select-hidden { display: none !important; }

/* Quantity control */
.theme-quantity-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.theme-qty-minus,
.theme-qty-plus {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-foreground);
  transition: background-color 0.2s ease;
}
.theme-qty-minus:hover,
.theme-qty-plus:hover { background-color: var(--color-secondary); }
.theme-qty-input {
  width: 3rem;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: var(--font-body);
  color: var(--color-foreground);
  padding: 0.75rem 0;
  -moz-appearance: textfield;
}
.theme-qty-input::-webkit-inner-spin-button,
.theme-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.theme-qty-input:focus { outline: none; }

/* Product details section */
.product-details-section {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}
.product-details-heading {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.woocommerce-product-details__short-description {
  color: var(--color-muted);
  line-height: 1.75;
  font-family: var(--font-body);
  overflow-wrap: break-word;
  word-break: break-word;
}
.woocommerce-product-details__short-description ul { list-style: none; padding: 0; }
.woocommerce-product-details__short-description > ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}
.woocommerce-product-details__short-description ul li {
  font-size: 0.875rem;
  color: var(--color-muted);
  display: flex;
  align-items: flex-start;
  padding: 0.25rem 0;
}
.woocommerce-product-details__short-description > ul li {
  padding: 0;
}
.woocommerce-product-details__short-description ul li::before {
  content: '';
  display: inline-block;
  width: 0.375rem; height: 0.375rem;
  background-color: var(--color-primary);
  border-radius: 50%;
  margin-top: 0.45rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Related products */
.related-products-section {
  border-top: 1px solid var(--color-border);
  padding: 5rem 0;
}
.related-products-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}
.related-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .related-products-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
}

/* WooCommerce notices (Section 14.1) */
.single-product .woocommerce-message,
.single-product .woocommerce-info { display: none; }
#theme-cart-drawer .woocommerce-message { display: none; }

/* -----------------------------------------------------------------
   18. ARCHIVE PRODUCT PAGE
   ----------------------------------------------------------------- */
.archive-product-page {
  padding-top: var(--header-height);
  min-height: 100vh;
}
.archive-product-page .shop-header {
  padding-top: 3rem;
  margin-bottom: 2rem;
}
.archive-shop-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .archive-shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .archive-shop-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

/* Pagination */
.page-numbers {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
}
.page-numbers li a,
.page-numbers li span {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-foreground);
  transition: background-color 0.2s, color 0.2s;
}
.page-numbers li .current,
.page-numbers li a:hover {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  border-color: var(--color-primary);
}

/* -----------------------------------------------------------------
   19. PAGE (page.php / checkout / thank-you)
   ----------------------------------------------------------------- */
.page-content {
  padding-top: var(--header-height);
  min-height: 60vh;
}
.page-content .container-wide { padding-top: 3rem; padding-bottom: 5rem; }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 2rem;
  color: var(--color-foreground);
}
.entry-content {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Bloques alignwide/alignfull dentro del contenedor: evitan desbordes (checkout, carrito) */
.woocommerce .entry-content .alignwide,
.woocommerce .entry-content .alignfull,
.woocommerce .entry-content .wp-block-woocommerce-checkout {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/* -----------------------------------------------------------------
   20. CHECKOUT (Section 13)
   ----------------------------------------------------------------- */
body.woocommerce-checkout .site-main,
body.woocommerce-checkout .page-content {
  padding-top: var(--header-height);
  padding-bottom: 4rem;
}

body.woocommerce-checkout .entry-content { max-width: 100%; }

body.woocommerce-checkout .wc-block-checkout {
  display: block;
}

@media (min-width: 768px) {
  body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout.is-large {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--checkout-gap, 2rem);
    align-items: start;
  }
}

body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
  min-width: 0;
  width: 100%;
  max-width: none;
}
body.woocommerce-checkout .wc-block-checkout__sidebar {
  background-color: var(--color-secondary);
  border-radius: var(--card-radius);
  padding: var(--section-padding, 2rem);
}

body.woocommerce-checkout .wc-block-components-text-input input,
body.woocommerce-checkout .wc-block-components-select select {
  width: 100% !important;
  max-width: none !important;
  border: 1px solid var(--color-border);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-foreground);
  background-color: var(--color-background);
}
body.woocommerce-checkout .wc-block-components-text-input input:focus,
body.woocommerce-checkout .wc-block-components-select select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(61,110,61,.2);
}

body.woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background-color: var(--color-primary);
  color: var(--color-primary-fg);
  border: none;
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
  min-height: 3rem;
}
body.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover { opacity: 0.88; }

/* -----------------------------------------------------------------
   21. THANK YOU PAGE (Section 22.8)
   ----------------------------------------------------------------- */
body.theme-thankyou-page .woocommerce-order { max-width: 56rem; margin: 0 auto; }
body.theme-thankyou-page .woocommerce-order h2,
body.theme-thankyou-page .woocommerce-order-details__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  padding: 0 0 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
body.theme-thankyou-page .woocommerce-order-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}
body.theme-thankyou-page .woocommerce-order-overview li {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-family: var(--font-body);
  padding: 0.75rem 1.25rem;
  background-color: var(--color-secondary);
}
body.theme-thankyou-page .woocommerce-order-details table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
body.theme-thankyou-page .woocommerce-order-details table th,
body.theme-thankyou-page .woocommerce-order-details table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-family: var(--font-body);
  overflow-wrap: break-word;
}
body.theme-thankyou-page .woocommerce-order-details tfoot th { text-align: left; }
body.theme-thankyou-page .woocommerce-order-details tfoot td { text-align: right; }
body.theme-thankyou-page .woocommerce-customer-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: hidden;
}
body.theme-thankyou-page .woocommerce-customer-details address {
  max-width: 100%;
  overflow-wrap: break-word;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.7;
}
body.theme-thankyou-page { overflow-x: hidden; }

/* -----------------------------------------------------------------
   22. 404 PAGE
   ----------------------------------------------------------------- */
.not-found-page {
  padding-top: var(--header-height);
  min-height: 60vh;
  background-color: var(--color-secondary);
}
.not-found-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  text-align: center;
  min-height: calc(60vh - var(--header-height));
  gap: 1.5rem;
}
.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  color: var(--color-muted);
  line-height: 1;
}
.not-found-msg {
  font-size: 1.25rem;
  color: var(--color-muted);
  font-family: var(--font-body);
}

/* -----------------------------------------------------------------
   23. WOOCOMMERCE GENERAL OVERRIDES
   ----------------------------------------------------------------- */
/* Remove default WC styles that clash */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { margin: 0 !important; }

.woocommerce-loop-product__title {
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  padding: 0 !important;
}

/* Notices */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* -----------------------------------------------------------------
   24. ANIMATIONS & UTILITIES
   ----------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInFromRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* Scroll animations (easing alineado con Lovable / framer) */
.anim-fade-up {
  opacity: 0;
  transform: translateY(2.5rem);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.4, 0.25, 1),
    transform 0.7s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.anim-fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.anim-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.6s cubic-bezier(0.25, 0.4, 0.25, 1),
    transform 0.6s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.anim-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}
.anim-slide-left {
  opacity: 0;
  transform: translateX(-3.75rem);
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.4, 0.25, 1),
    transform 0.8s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.anim-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.anim-slide-right {
  opacity: 0;
  transform: translateX(3.75rem);
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.4, 0.25, 1),
    transform 0.8s cubic-bezier(0.25, 0.4, 0.25, 1);
}
.anim-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .anim-scale-in,
  .anim-slide-left,
  .anim-slide-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .theme-product-card:hover,
  .btn:hover {
    transform: none;
  }
}

/* -----------------------------------------------------------------
   25. RESPONSIVE MISC
   ----------------------------------------------------------------- */
@media (max-width: 767px) {
  .cart-btn.desktop-only { display: none !important; }
}

/* Inner pages header spacing */
.theme-no-hero main { padding-top: var(--header-height); }

/* Responsive single product */
.single-product .theme-product-layout { min-width: 0; }
.single-product .theme-product-gallery,
.single-product .theme-product-info { min-width: 0; max-width: 100%; }
.single-product .theme-product-thumbnails { flex-wrap: wrap; max-width: 100%; }
.single-product .theme-add-to-cart-area { flex-wrap: wrap; gap: 0.75rem; }
.single-product .single_add_to_cart_button { flex: 1 1 auto; min-width: 160px; }
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-variation-description,
.single-product .posted_in { overflow-wrap: break-word; word-break: break-word; }

/* Product card <a> display fix (Section 31.3) */
.theme-product-card__image-wrapper a {
  display: block;
  overflow: hidden;
}
.theme-product-card__image-wrapper a img { display: block; width: 100%; }
