/**
 * TiendaPocket — Variantes de diseño
 * CSS para las 5 variantes de header, 5 de footer y 4 de tarjeta de producto.
 * También incluye las variantes de altura del hero.
 *
 * @package TiendaPocket
 */

/* ============================================================
   FEATURES — ícono emoji/unicode del customizer
   ============================================================ */
.tp-feature-item__icon-char {
  font-size: 2rem;
  line-height: 1;
  display: block;
}

/* ============================================================
   VARIABLES BASE para header/footer/topbar
   ============================================================ */
:root {
  --topbar-bg:         #0f172a;
  --topbar-text:       #ffffff;
  --footer-bg:         #0f172a;
  --footer-text:       #ffffff;
  --footer-text-muted: rgba(255, 255, 255, 0.6);
}

/* Aplicar colores de topbar y footer via variables */
.tp-topbar {
  background: var(--topbar-bg);
  color: var(--topbar-text);
}
.tp-topbar__close {
  color: var(--topbar-text);
}
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
}
.site-footer a {
  color: var(--footer-text);
}
.site-footer a:hover {
  color: var(--color-accent);
}
.site-footer__tagline,
.site-footer__copyright {
  color: var(--footer-text-muted);
  font-size: 0.875rem;
}
.site-footer__menu-title {
  color: var(--footer-text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.footer-menu li {
  list-style: none;
  margin-bottom: 0.5rem;
}
.footer-menu a {
  color: var(--footer-text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-menu a:hover {
  color: var(--footer-text);
}

/* ============================================================
   HERO — variantes de altura
   ============================================================ */
.tp-hero--full   { min-height: 100dvh; }
.tp-hero--large  { min-height: 70vh; }
.tp-hero--medium { min-height: 50vh; }

/* ============================================================
   HEADER 2 — Logo centrado, nav abajo full-width
   ============================================================ */
.site-header--centered .site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height, 64px);
}

.site-header--centered .site-header__logo--centered {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-header--centered .site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header--centered .site-header__actions--left {
  order: -1;
}

/* Nav full-width row 2 */
.site-header__nav-full {
  border-top: 1px solid var(--color-border, rgba(0,0,0,0.08));
  padding: 0;
}

.site-header__nav-full .container {
  display: flex;
  justify-content: center;
}

.site-header__nav-full .nav-menu--centered {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav-full .nav-menu--centered > li > a {
  padding: 0.75rem 1.25rem;
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

/* En mobile: ocultar nav full y mostrar hamburger normal */
@media (max-width: 1023px) {
  .site-header--centered .site-header__logo--centered {
    position: static;
    transform: none;
  }
  .site-header--centered .site-header__actions--left {
    display: none;
  }
  .site-header__nav-full {
    display: none;
  }
}

/* ============================================================
   HEADER 3 — Barra utilitaria arriba
   ============================================================ */
.site-header-utility {
  background: var(--color-surface, #f8fafc);
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.08));
  padding: 0.4rem 0;
  font-size: 0.8125rem;
}

.site-header-utility__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header-utility__search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 100px;
  overflow: hidden;
  background: #fff;
}

.site-header-utility__search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  background: transparent;
  color: var(--color-text);
}

.site-header-utility__search-btn {
  padding: 0.35rem 0.75rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.site-header-utility__search-btn:hover {
  background: var(--color-accent-hover);
}

.site-header-utility__phone {
  color: var(--color-text-muted, #64748b);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  text-decoration: none;
}

.site-header-utility__phone:hover {
  color: var(--color-accent);
}

.site-header-utility__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-header-utility__link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-text-muted, #64748b);
  text-decoration: none;
  font-size: 0.8125rem;
}

.site-header-utility__link:hover {
  color: var(--color-accent);
}

/* El header con utility no muestra search toggle (la búsqueda ya está arriba) */
.site-header--with-utility #search-toggle {
  display: none;
}

@media (max-width: 1023px) {
  .site-header-utility {
    display: none;
  }
  .site-header--with-utility #search-toggle {
    display: flex;
  }
}

/* ============================================================
   HEADER 4 — Minimal (hamburger siempre visible)
   ============================================================ */
/* Ocultar nav en desktop */
.site-header--minimal .site-header__nav {
  display: none !important;
}

/* Hamburger siempre visible */
.site-header--minimal .tp-mobile-toggle,
.tp-mobile-toggle--always {
  display: flex !important;
}

/* ============================================================
   HEADER 5 — Mega Menú
   ============================================================ */
/* El elemento padre del item con hijos se posiciona static
   para que el sub-menu tome todo el ancho del header */
.site-header--mega .nav-menu--mega > .menu-item-has-children {
  position: static;
}

/* Panel mega: full-width, grid de columnas */
.site-header--mega .nav-menu--mega > .menu-item-has-children > .sub-menu {
  position: absolute;
  left: 0;
  right: 0;
  min-width: auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
  padding: 1.5rem 2rem;
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  z-index: 999;
}

.site-header--mega .nav-menu--mega > .menu-item-has-children > .sub-menu > li > a {
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  border-radius: var(--radius-sm, 6px);
  display: block;
}

.site-header--mega .nav-menu--mega > .menu-item-has-children > .sub-menu > li > a:hover {
  background: var(--color-surface, #f8fafc);
  color: var(--color-accent);
}

/* Cerrar mega en mobile (usa drawer normal) */
@media (max-width: 1023px) {
  .site-header--mega .nav-menu--mega > .menu-item-has-children > .sub-menu {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    box-shadow: none;
    border: none;
    padding: 0 0 0 1rem;
  }
  .site-header--mega .nav-menu--mega > .menu-item-has-children.is-active > .sub-menu {
    display: grid;
  }
}

/* ============================================================
   FOOTER 2 — Centrado
   ============================================================ */
.site-footer--centered .site-footer__centered-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 0;
  text-align: center;
}

.site-footer--centered .footer-logo,
.site-footer--centered .footer-logo--centered {
  display: block;
  margin: 0 auto;
}

.site-footer--centered .site-footer__nav-centered .footer-menu--horizontal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer--centered .footer-menu--horizontal li {
  margin: 0;
}

.site-footer--centered .footer-menu--horizontal a {
  color: var(--footer-text-muted);
  font-size: 0.875rem;
}

.site-footer--centered .footer-menu--horizontal a:hover {
  color: var(--footer-text);
}

.site-footer--centered .site-footer__copyright--centered {
  font-size: 0.8125rem;
  margin: 0;
}

/* ============================================================
   FOOTER 3 — 4 columnas iguales
   ============================================================ */
.site-footer--four-col .site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

.site-footer--four-col .site-footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer--four-col .site-footer__col--newsletter {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 1024px) {
  .site-footer--four-col .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .site-footer--four-col .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER 4 — Split (contacto + newsletter)
   ============================================================ */
.site-footer--split .site-footer__split-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
  padding: 3.5rem 0;
}

.site-footer--split .site-footer__split-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer--split .site-footer__contact-phone a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer--split .site-footer__contact-phone a:hover {
  color: var(--footer-text);
}

.site-footer--split .site-footer__split-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-footer--split .site-footer__newsletter {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-footer--split .site-footer__newsletter-title,
.site-footer--split .site-footer__newsletter-subtitle {
  margin-bottom: 0.5rem;
}

.site-footer--split .site-footer__newsletter-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--footer-text);
}

.site-footer--split .site-footer__newsletter-subtitle {
  font-size: 0.875rem;
  color: var(--footer-text-muted);
}

.site-footer--split .site-footer__menus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .site-footer--split .site-footer__split-grid {
    grid-template-columns: 1fr;
  }
  .site-footer--split .site-footer__menus-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   FOOTER 5 — Minimal
   ============================================================ */
.site-footer--minimal .site-footer__minimal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  flex-wrap: wrap;
}

.site-footer--minimal .site-footer__copyright {
  font-size: 0.8125rem;
  color: var(--footer-text-muted);
  margin: 0;
}

.site-footer--minimal .site-footer__payment-icons {
  display: flex;
  gap: 0.5rem;
}

.site-footer--minimal .footer-social--minimal .footer-social__link {
  width: 28px;
  height: 28px;
}

/* ============================================================
   NEWSLETTER FORM — compartido entre footer 3 y footer 4
   ============================================================ */
.tp-newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tp-newsletter-form__input {
  flex: 1;
  min-width: 160px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--footer-text);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.tp-newsletter-form__input::placeholder {
  color: var(--footer-text-muted);
}

.tp-newsletter-form__input:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
}

.tp-newsletter-form__btn {
  white-space: nowrap;
  border-radius: var(--radius-sm, 6px);
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   PRODUCT CARD 2 — Hover Overlay
   ============================================================ */
.tp-product-card--overlay .tp-product-card__img-wrap {
  position: relative;
  overflow: hidden;
}

.tp-product-card--overlay .tp-product-card__hover-panel {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.tp-product-card--overlay:hover .tp-product-card__hover-panel,
.tp-product-card--overlay:focus-within .tp-product-card__hover-panel {
  opacity: 1;
}

.tp-product-card--overlay .tp-product-card__name-overlay {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.3;
}

.tp-product-card--overlay .tp-product-card__price-overlay {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.tp-product-card--overlay .tp-product-card__price-overlay del {
  color: rgba(255, 255, 255, 0.5);
}

.tp-product-card--overlay .tp-product-card__rating {
  color: rgba(255, 255, 255, 0.9);
}

.tp-product-card--overlay .tp-product-card__cta-overlay {
  font-size: 0.8125rem;
  padding: 0.45rem 1.25rem;
  border-radius: 100px;
  background: #fff;
  color: var(--color-primary);
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}

.tp-product-card--overlay .tp-product-card__cta-overlay:hover {
  background: var(--color-accent);
  color: #fff;
}

.tp-product-card--overlay .tp-product-card__body--compact {
  padding-top: 0.75rem;
}

.tp-product-card--overlay .tp-product-card__body--compact .tp-product-card__name {
  font-size: 0.875rem;
}

/* ============================================================
   PRODUCT CARD 3 — Horizontal
   ============================================================ */
.tp-product-card--horizontal {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  box-shadow: none;
  background: var(--color-bg, #fff);
}

.tp-product-card--horizontal .tp-product-card__img-wrap--thumb {
  flex-shrink: 0;
  width: 120px;
  position: relative;
}

.tp-product-card--horizontal .tp-product-card__img {
  border-radius: var(--radius-sm, 6px);
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.tp-product-card--horizontal .tp-product-card__body--horizontal {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.tp-product-card--horizontal .tp-product-card__name {
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.35;
}

.tp-product-card--horizontal .tp-product-card__actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ============================================================
   PRODUCT CARD 4 — Minimalista
   ============================================================ */
.tp-product-card--minimal {
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.tp-product-card--minimal .tp-product-card__img-wrap {
  border-radius: 0;
}

.tp-product-card--minimal .tp-product-card__img {
  border-radius: var(--radius-sm, 6px);
}

.tp-product-card--minimal .tp-product-card__body--minimal {
  padding: 0.625rem 0;
}

.tp-product-card--minimal .tp-product-card__name {
  font-size: 0.9rem;
  font-weight: 400;
}

.tp-product-card--minimal .tp-product-card__price {
  font-weight: 600;
}

.tp-product-card--minimal .tp-product-card__cta--text {
  all: unset;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  display: inline-block;
  margin-top: 0.4rem;
}

.tp-product-card--minimal .tp-product-card__cta--text:hover {
  color: var(--color-accent-hover);
}

/* ============================================================
   PRODUCT CARD — efectos de hover en imagen
   ============================================================ */
/* Zoom */
.tp-product-card .tp-product-card__img {
  transition: transform 0.4s ease;
}

.tp-product-card:hover .tp-product-card__img {
  transform: scale(1.04);
}

/* Sin efecto (body class: card-hover--none) */
.card-hover--none .tp-product-card .tp-product-card__img {
  transform: none !important;
  transition: none !important;
}

/* Overlay (agrega efecto oscuro sobre toda la imagen al hover) */
.card-hover--overlay .tp-product-card .tp-product-card__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
}

.card-hover--overlay .tp-product-card:hover .tp-product-card__img-wrap::after {
  opacity: 1;
}

/* Segunda imagen: siempre oculta y superpuesta — solo el modo flip la activa */
.tp-product-card__img--secondary {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
/* Card7 usa tp-card7__img en lugar de tp-product-card__img */
.tp-card7__media .tp-product-card__img--secondary {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

/* Flip — segunda foto crossfade (body class: card-hover-flip / grid class: card-hover--flip) */
/* Requiere que el template renderice .tp-product-card__img--secondary */
.card-hover-flip .tp-product-card__img--secondary,
.card-hover--flip .tp-product-card__img--secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity .45s ease;
  z-index: 2;
}
.card-hover-flip .tp-product-card__img--primary,
.card-hover--flip .tp-product-card__img--primary {
  transition: opacity .45s ease;
  z-index: 1;
  position: relative;
}
.card-hover-flip .tp-product-card:hover .tp-product-card__img--primary,
.card-hover--flip .tp-product-card:hover .tp-product-card__img--primary {
  opacity: 0;
  transform: none !important; /* cancela zoom */
}
.card-hover-flip .tp-product-card:hover .tp-product-card__img--secondary,
.card-hover--flip .tp-product-card:hover .tp-product-card__img--secondary {
  opacity: 1;
}

/* Card-8 con flip */
.card-hover-flip .tp-card8__img--secondary,
.card-hover--flip .tp-card8__img--secondary {
  opacity: 0;
  transition: opacity .45s ease;
}
.card-hover-flip .tp-card8:hover .tp-card8__img--primary,
.card-hover--flip .tp-card8:hover .tp-card8__img--primary  { opacity: 0; }
.card-hover-flip .tp-card8:hover .tp-card8__img--secondary,
.card-hover--flip .tp-card8:hover .tp-card8__img--secondary { opacity: 1; }

/* ============================================================
   PRODUCT CARD 5 — Soft Background
   Fondo pastel suave, imagen con object-fit: contain, botón pill.
   ============================================================ */
.tp-product-card--soft {
  box-shadow: none;
  border: none;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.tp-product-card__img-wrap--soft {
  background: var(--soft-bg, #f0f4ff);
  border-radius: var(--radius-md, 10px) var(--radius-md, 10px) 0 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.tp-product-card__img--contain {
  object-fit: contain !important;
  padding: 1rem;
  transition: transform 0.4s ease;
}

.tp-product-card--soft:hover .tp-product-card__img--contain {
  transform: scale(1.05);
}

.tp-product-card__badges--soft {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tp-product-card__body--soft {
  padding: 0.875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.tp-product-card__body--soft .tp-product-card__name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-product-card__body--soft .tp-product-card__price {
  font-weight: 700;
  font-size: 0.9375rem;
}

/* Botón pill al pie */
.tp-product-card__cta-pill {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1.5px solid var(--color-primary, #0f172a);
  border-radius: 100px;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary, #0f172a);
  background: transparent;
  transition: background 0.2s, color 0.2s;
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
}

.tp-product-card__cta-pill:hover {
  background: var(--color-primary, #0f172a);
  color: #fff;
}

.tp-product-card__cta-pill--outline {
  /* mismo estilo, solo hereda */
}

/* ============================================================
   PRODUCT CARD 6 — Editorial
   Imagen full-bleed, botón "+" circular en hover, body minimalista.
   ============================================================ */
.tp-product-card--editorial {
  box-shadow: none;
  border: none;
  background: transparent;
  border-radius: 0;
}

.tp-product-card__img-wrap--editorial {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm, 6px);
  background: #f1f5f9;
  aspect-ratio: 3 / 4;
}

.tp-product-card--editorial .tp-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tp-product-card--editorial:hover .tp-product-card__img {
  transform: scale(1.04);
}

/* Badge mínimo: posicionado en esquina superior izquierda */
.tp-product-card__badges--editorial {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  display: flex;
  gap: 0.25rem;
}

.tp-product-card__badges--editorial .tp-badge {
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Botón "+" circular en hover */
.tp-product-card__quick-add--circle {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary, #0f172a);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(6px) scale(0.85);
  transition: opacity 0.25s, transform 0.25s;
  text-decoration: none;
}

.tp-product-card--editorial:hover .tp-product-card__quick-add--circle,
.tp-product-card--editorial:focus-within .tp-product-card__quick-add--circle {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tp-product-card__quick-add--circle:hover {
  background: var(--color-accent, #6366f1);
  color: #fff;
}

/* Body editorial: fila nombre + precio */
.tp-product-card__body--editorial {
  padding: 0.625rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.tp-product-card__editorial-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.tp-product-card__name--editorial {
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-product-card__name--editorial a {
  color: var(--color-text);
  text-decoration: none;
}

.tp-product-card__name--editorial a:hover {
  color: var(--color-accent);
}

.tp-product-card__price--editorial {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.tp-product-card__rating--editorial {
  font-size: 0.75rem;
  opacity: 0.75;
}

/* ============================================================
   CATEGORÍAS — Estilo GRID OVERLAY
   Grilla de tarjetas altas con overlay oscuro + texto al pie.
   Inspirado en Shopify Release / Impulse.
   ============================================================ */
.tp-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tp-cat-grid__item {
  /* nada extra; la card se encarga */
}

.tp-cat-grid__card {
  position: relative;
  display: block;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface, #f1f5f9);
}

.tp-cat-grid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tp-cat-grid__card:hover .tp-cat-grid__img {
  transform: scale(1.06);
}

.tp-cat-grid__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #94a3b8);
}

.tp-cat-grid__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.tp-cat-grid__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.70) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
  transition: background 0.3s;
}

.tp-cat-grid__card:hover .tp-cat-grid__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}

/* Primera tarjeta más grande (hero) — ocupa 2 columnas */
.tp-cat-grid__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

/* Responsive */
@media (max-width: 1024px) {
  .tp-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tp-cat-grid__item:first-child {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .tp-cat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }
  .tp-cat-grid__item:first-child {
    grid-column: span 2;
  }
  .tp-cat-grid__card {
    aspect-ratio: 1 / 1;
  }
}

/* ============================================================
   CATEGORÍAS — Estilo CIRCLES
   Imágenes circulares en scroll horizontal con nombre debajo.
   ============================================================ */
.tp-cat-circles {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: 1rem;
  padding: 0.5rem 0.25rem 0.75rem;
}

.tp-cat-circles::-webkit-scrollbar {
  display: none;
}

.tp-cat-circle {
  flex: 0 0 130px;
  width: 130px;
  scroll-snap-align: start;
  transition: transform 0.25s;
}

.tp-cat-circle:hover {
  transform: scale(1.06);
}

.tp-cat-circle__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
}

.tp-cat-circle__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface, #f1f5f9);
  border: 3px solid transparent;
  transition: border-color 0.25s;
  position: relative;
  padding: 14%;
  box-sizing: border-box;
}

.tp-cat-circle:hover .tp-cat-circle__img-wrap {
  border-color: var(--color-accent);
}

.tp-cat-circle__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.tp-cat-circle__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #94a3b8);
}

.tp-cat-circle__placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.5;
}

.tp-cat-circle__name {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  color: var(--color-text);
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tp-cat-circle:hover .tp-cat-circle__name {
  color: var(--color-accent);
}

@media (max-width: 1024px) {
  .tp-cat-circle {
    flex: 0 0 110px;
    width: 110px;
  }
}

@media (max-width: 640px) {
  .tp-cat-circles {
    gap: 0.75rem;
  }
  .tp-cat-circle {
    flex: 0 0 90px;
    width: 90px;
  }
}

@media (max-width: 420px) {
  .tp-cat-circle {
    flex: 0 0 80px;
    width: 80px;
  }
}

/* ============================================================
   CATEGORÍAS — Estilo CARDS (color)
   Tarjetas con fondo suave por categoría. Imagen enmarcada dentro
   de la tarjeta, con mix-blend-mode para fundir el fondo blanco
   del producto con el color de la card.
   ============================================================ */
.tp-cat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.tp-cat-card-item__link {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg, 16px);
  background: var(--card-bg, #fde8e8);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
}

.tp-cat-card-item__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}

.tp-cat-card-item__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  padding: 2rem;
}

.tp-cat-card-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}

.tp-cat-card-item__link:hover .tp-cat-card-item__img {
  transform: scale(1.04) translateY(-4px);
}

.tp-cat-card-item__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #94a3b8);
}

.tp-cat-card-item__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.tp-cat-card-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
}

.tp-cat-card-item__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.tp-cat-card-item__arrow {
  color: var(--color-accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.tp-cat-card-item__link:hover .tp-cat-card-item__arrow {
  transform: translateX(3px);
}

@media (max-width: 1024px) {
  .tp-cat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .tp-cat-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }
}

/* ============================================================
   CATEGORÍAS — Estilo MASONRY
   Grilla irregular: primer item ocupa 2 filas (hero).
   Funciona con CSS Grid y grid-template-rows.
   ============================================================ */
.tp-cat-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}

.tp-cat-masonry__card {
  position: relative;
  display: block;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--color-surface, #f1f5f9);
}

.tp-cat-masonry__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.tp-cat-masonry__card:hover .tp-cat-masonry__img {
  transform: scale(1.06);
}

.tp-cat-masonry__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #94a3b8);
}

.tp-cat-masonry__placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.tp-cat-masonry__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.10) 50%, transparent 100%);
}

/* Hero: primera tarjeta ocupa 2 filas y 2 columnas */
.tp-cat-masonry__item--hero {
  grid-row: span 2;
  grid-column: span 2;
}

/* Responsive */
@media (max-width: 768px) {
  .tp-cat-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .tp-cat-masonry__item--hero {
    grid-column: span 2;
    grid-row: span 1;
  }
  .tp-cat-masonry__item--hero .tp-cat-masonry__name {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .tp-cat-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
    gap: 0.625rem;
  }
}

/* ============================================================
   DESCRIPCIÓN DE CATEGORÍA — compartida entre carousel, grid y masonry
   ============================================================ */

/* ── Carrusel ── */
.tp-category-card--has-desc .tp-category-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.20) 60%, transparent 100%);
}

.tp-category-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
  margin-top: 0.25rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  /* Posicionada bajo .tp-category-card__name que es absoluto */
  position: absolute;
  bottom: 0.625rem;
  left: 0.75rem;
  right: 0.75rem;
}

/* Cuando hay descripción subir el nombre para que haya espacio */
.tp-category-card--has-desc .tp-category-card__name {
  bottom: auto;
  top: auto;
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 2.25rem; /* deja espacio para la descripción */
}

/* ── Grid overlay ── */
.tp-cat-grid__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.125rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tp-cat-grid__name {
  /* sobreescribe el posicionamiento absolute simple anterior */
  position: static;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.tp-cat-grid__card:hover .tp-cat-grid__footer {
  transform: translateY(-3px);
}

.tp-cat-grid__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Hero item: descripción con fuente algo mayor */
.tp-cat-grid__item:first-child .tp-cat-grid__name {
  font-size: 1.25rem;
}

.tp-cat-grid__item:first-child .tp-cat-grid__desc {
  font-size: 0.8125rem;
}

/* ── Masonry ── */
.tp-cat-masonry__footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tp-cat-masonry__name {
  /* sobreescribe posicionamiento absoluto simple anterior */
  position: static;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  line-height: 1.3;
  transition: transform 0.3s ease;
}

.tp-cat-masonry__card:hover .tp-cat-masonry__footer {
  transform: translateY(-3px);
}

.tp-cat-masonry__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.tp-cat-masonry__item--hero .tp-cat-masonry__name {
  font-size: 1.375rem;
}

.tp-cat-masonry__item--hero .tp-cat-masonry__desc {
  font-size: 0.8125rem;
}

/* En pantallas chicas, ocultar descripción en masonry (poco espacio vertical) */
@media (max-width: 480px) {
  .tp-cat-masonry__desc,
  .tp-cat-grid__desc {
    display: none;
  }
}

/* ============================================================
   GRID SIMPLE — 3 y 4 columnas
   Imagen cuadrada + nombre debajo, sin overlays.
   ============================================================ */
.tp-cat-simple-grid {
  display: grid;
  gap: 1.25rem;
}

.tp-cat-simple-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.tp-cat-simple-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.tp-cat-simple-grid__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tp-cat-simple-grid__card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
}

.tp-cat-simple-grid__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-surface-alt, #f1f5f9);
}

.tp-cat-simple-grid__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tp-cat-simple-grid__card:hover .tp-cat-simple-grid__img {
  transform: scale(1.05);
}

.tp-cat-simple-grid__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #94a3b8);
}

.tp-cat-simple-grid__placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.4;
}

.tp-cat-simple-grid__footer {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tp-cat-simple-grid__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
  line-height: 1.3;
}

.tp-cat-simple-grid__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive — grid3 y grid4: siempre 2 columnas en mobile */
@media (max-width: 768px) {
  .tp-cat-simple-grid--3,
  .tp-cat-simple-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }

  .tp-cat-simple-grid--3 .tp-cat-simple-grid__footer,
  .tp-cat-simple-grid--4 .tp-cat-simple-grid__footer {
    padding: 0.5rem 0.625rem;
  }

  .tp-cat-simple-grid--3 .tp-cat-simple-grid__name,
  .tp-cat-simple-grid--4 .tp-cat-simple-grid__name {
    font-size: 0.8125rem;
  }

  .tp-cat-simple-grid__desc {
    display: none;
  }
}
