/* Portada Absolut 360: tienda primero, producto visible y copy claro. */
:root {
  --home-ink: #241a2d;
  --home-muted: #726b76;
  --home-paper: #f7f4ef;
  --home-line: #e8e2eb;
  --home-brand: #6d28d9;
  --home-brand-deep: #51218f;
  --home-serif: "Instrument Serif", Georgia, serif;
  --home-sans: "DM Sans", "Segoe UI", sans-serif;
}

body {
  font-family: var(--home-sans) !important;
  color: var(--home-ink);
  background: #fff !important;
}

/* Una sola franja útil, sin mensajes repetidos ni promesas inventadas. */
.live-ticker {
  min-height: 34px;
  padding: 7px 16px !important;
  background: #24152f !important;
  color: #fff !important;
  overflow: hidden;
}
.ticker-track {
  display: flex !important;
  justify-content: center;
  gap: clamp(18px, 4vw, 54px);
  width: 100%;
  animation: none !important;
  transform: none !important;
}
.ticker-item {
  flex: 0 0 auto;
  color: inherit !important;
  font-size: 11px !important;
  letter-spacing: .035em;
}
.ticker-item strong { color: #e5c7ff; }

.site-header {
  background: rgba(255,255,255,.96) !important;
  border-color: var(--home-line) !important;
  box-shadow: 0 4px 18px rgba(36,26,45,.04) !important;
}
.logo { background: none !important; -webkit-text-fill-color: initial !important; color: var(--home-ink) !important; }
.logo-img { width: 42px; height: 42px; object-fit: contain; }
.logo-text { color: var(--home-ink); }
.logo-tagline { color: var(--home-muted); }
.main-nav { background: transparent !important; border: 0 !important; }
.main-nav a { color: #62596a !important; }
.main-nav a.active,
.main-nav a:hover { color: var(--home-brand-deep) !important; background: #f3ebfc !important; }
.header-actions-icons button { transition: transform .18s ease, background .18s ease; }
.header-actions-icons button:hover { transform: translateY(-1px); }

/* La portada es de exploración: el producto comparte protagonismo con el catálogo. */
.cv-hero.redesign-hero {
  padding: clamp(40px, 6vw, 78px) 24px !important;
  background: var(--home-paper) !important;
  border: 0 !important;
}
.cv-hero-inner {
  max-width: 1240px;
  min-height: 380px;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr) !important;
  gap: clamp(32px, 6vw, 84px) !important;
}
.cv-hero-copy { max-width: 610px; }
.cv-kicker {
  padding: 0 !important;
  margin-bottom: 18px !important;
  color: var(--home-brand-deep) !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: 11px !important;
  letter-spacing: .16em !important;
}
.cv-hero-copy h1 {
  max-width: 11ch;
  margin: 0 0 20px !important;
  color: var(--home-ink) !important;
  font-family: var(--home-serif) !important;
  font-size: clamp(3.2rem, 6.2vw, 5.4rem) !important;
  font-weight: 400 !important;
  letter-spacing: -.035em !important;
  line-height: .96 !important;
  text-wrap: balance;
}
.cv-hero-copy h1 em { color: var(--home-brand); font-weight: 400; }
.cv-lead {
  max-width: 38rem;
  margin: 0 0 28px !important;
  color: #62596a !important;
  font-size: clamp(1rem, 1.4vw, 1.15rem) !important;
  line-height: 1.7 !important;
}
.cv-hero-cta { gap: 12px !important; }
.cv-btn-primary,
a.cv-btn-primary {
  min-height: 48px;
  padding: 13px 22px !important;
  border-radius: 8px !important;
  background: var(--home-brand) !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}
.cv-btn-primary:hover { background: var(--home-brand-deep) !important; box-shadow: none !important; }
.cv-btn-outline {
  min-height: 48px;
  padding: 12px 20px !important;
  border: 1px solid #d7c8e4 !important;
  border-radius: 8px !important;
  color: var(--home-brand-deep) !important;
  background: transparent !important;
}
.cv-btn-outline:hover { background: #efe6f7 !important; }
.cv-btn-ghost {
  min-height: 48px;
  padding: 12px 16px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #62596a !important;
  background: transparent !important;
}
.cv-btn-ghost:hover { color: var(--home-brand-deep) !important; background: #efe6f7 !important; }
.cv-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: none !important;
  margin: 0 !important;
}
.cv-hero-product-frame {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1.16;
  overflow: hidden;
  border: 1px solid rgba(78,52,94,.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(49,31,59,.10);
}
.cv-hero-product {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(8px, 2vw, 22px);
  object-fit: contain;
}
.cv-hero-product-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  padding: 8px 12px;
  border: 1px solid rgba(36,26,45,.08);
  border-radius: 6px;
  background: rgba(255,255,255,.92);
  color: var(--home-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cv-trust-bar { display: none !important; }

/* Búsqueda y productos: menos cajas, más aire para encontrar. */
.store-container {
  max-width: 1280px !important;
  padding-top: 44px !important;
  gap: 28px !important;
}
.main-content { min-width: 0; }
.sidebar .filter-section {
  border-radius: 10px !important;
  box-shadow: none !important;
}
.products-header {
  align-items: end;
  margin: 20px 0 16px !important;
}
.products-header h1 {
  color: var(--home-ink) !important;
  font-family: var(--home-serif) !important;
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  font-weight: 400 !important;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.currency-note { color: var(--home-muted) !important; font-size: 12px !important; }
.abs-toolbar {
  padding: 10px !important;
  border: 1px solid var(--home-line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.abs-toolbar input,
.abs-toolbar select {
  min-height: 44px;
  border-radius: 7px !important;
}
.abs-toolbar button { min-height: 44px; border-radius: 7px !important; }
.products-grid,
#productsGrid { gap: 16px !important; }
.product-card,
.product-card.abs-card {
  border: 1px solid #ebe6ed !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 14px rgba(36,26,45,.035) !important;
}
.product-card:hover,
.product-card.abs-card:hover {
  transform: translateY(-3px);
  border-color: #d8c6e8 !important;
  box-shadow: 0 14px 34px rgba(36,26,45,.09) !important;
}
.product-card .product-image { background: #f7f5f2 !important; }
.product-card .product-image img { object-fit: contain; mix-blend-mode: multiply; }
.product-info { padding: 16px !important; gap: 9px !important; }
.product-name { color: var(--home-ink) !important; font-size: 14px !important; }
.product-category { color: var(--home-brand-deep) !important; }
.price-row .price { color: var(--home-ink) !important; }
.product-card .btn-add-cart,
.product-cta-row .btn-add-cart,
button.btn-add-cart.abs-add {
  min-height: 42px;
  border-radius: 7px !important;
  background: var(--home-brand) !important;
  box-shadow: none !important;
}
.product-card .btn-add-cart:hover,
.product-cta-row .btn-add-cart:hover { background: var(--home-brand-deep) !important; }
.btn-card-secondary { min-height: 38px; border-radius: 7px !important; }

body.dark-mode {
  --home-ink: #f4edf8;
  --home-muted: #b5aabb;
  --home-paper: #211a27;
  --home-line: #493d50;
  background: #17121b !important;
}
body.dark-mode .site-header { background: rgba(23,18,27,.96) !important; }
body.dark-mode .cv-hero.redesign-hero { background: var(--home-paper) !important; }
body.dark-mode .cv-lead,
body.dark-mode .main-nav a { color: #cbbfd2 !important; }
body.dark-mode .cv-hero-product-frame { background: #fff; }
body.dark-mode .product-card,
body.dark-mode .sidebar .filter-section,
body.dark-mode .abs-toolbar { background: #211a27 !important; border-color: #493d50 !important; }
body.dark-mode .product-card .product-image { background: #2b2331 !important; }

@media (max-width: 900px) {
  .cv-hero.redesign-hero { padding: 38px 20px !important; }
  .cv-hero-inner { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .cv-hero-copy h1 { font-size: clamp(2.7rem, 6vw, 4rem) !important; }
  .cv-hero-cta { flex-direction: row !important; align-items: center !important; }
  .cv-hero-cta a { width: auto !important; }
  .cv-hero-product-frame { aspect-ratio: .96; }
  .cv-trust-bar { display: none !important; }
  .store-container { padding-top: 30px !important; }
}
@media (max-width: 640px) {
  .live-ticker { padding: 7px 12px !important; }
  .ticker-track { gap: 18px; justify-content: flex-start; overflow: auto; scrollbar-width: none; }
  .ticker-track::-webkit-scrollbar { display: none; }
  .ticker-item { font-size: 10px !important; }
  .cv-hero.redesign-hero { padding: 26px 16px 30px !important; }
  .cv-hero-inner { grid-template-columns: 1fr !important; gap: 22px !important; }
  .cv-hero-copy { order: 0; }
  .cv-hero-visual { order: 1; }
  .cv-hero-copy h1 { max-width: 12ch; font-size: clamp(2.75rem, 12vw, 3.75rem) !important; }
  .cv-lead { font-size: 1rem !important; }
  .cv-hero-cta { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
  .cv-hero-cta a { width: 100% !important; padding-inline: 12px !important; font-size: 13px !important; }
  .cv-hero-cta .cv-btn-ghost { grid-column: 1 / -1; }
  .cv-hero-product-frame { width: 100%; max-width: 540px; aspect-ratio: 1.2; }
  .store-container { padding: 24px 14px 44px !important; }
  .products-header { align-items: start; flex-direction: column; }
  .products-header h1 { font-size: 2.25rem !important; }
  .products-grid,
  #productsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .product-info { padding: 11px !important; gap: 7px !important; }
  .product-name { font-size: 12.5px !important; }
  .product-card .btn-add-cart { font-size: 11px !important; padding-inline: 8px !important; }
  .btn-wa-card { width: 36px; height: 38px; }
  .btn-card-secondary { font-size: 10px !important; }
}
@media (max-width: 380px) {
  .products-grid,
  #productsGrid { grid-template-columns: 1fr !important; }
  .cv-hero-cta { grid-template-columns: 1fr; }
  .cv-hero-cta .cv-btn-ghost { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* app.js no debe duplicar la promoción que ya muestra la portada. */
@media (max-width: 640px) {
  #promoTicker .ticker-track { justify-content: center; overflow: hidden; }
  #promoTicker .ticker-item:nth-child(2) { display: none; }
}
@media (max-width: 900px) {
  .cv-hero.redesign-hero .cv-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
  .cv-hero.redesign-hero .cv-hero-visual {
    order: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }
}
.cv-hero.redesign-hero { padding: clamp(32px, 4.2vw, 52px) 24px !important; }
.cv-hero-inner { min-height: 340px; }
.cv-hero-product-frame { aspect-ratio: 1.27; }
@media (min-width: 1101px) {
  .cv-hero.redesign-hero { padding: 28px 24px !important; }
  .cv-hero-inner { min-height: 310px; }
  .cv-hero-product-frame { aspect-ratio: 1.55; }
  .store-container { padding-top: 24px !important; }
}
@media (max-width: 640px) {
  .site-header { padding: 0 !important; min-height: 0 !important; }
  .header-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 12px !important;
    gap: 8px;
    flex-wrap: nowrap !important;
    justify-content: space-between;
  }
  .header-left { gap: 6px; }
  .logo-tagline { display: none; }
  .header-actions { flex: 0 1 auto; min-width: 0; gap: 4px; justify-content: flex-end; }
  .header-actions-icons { gap: 2px; }
  .header-actions-icons button { min-width: 34px; min-height: 34px; padding: 4px !important; }
  .auth-area button { padding: 8px 10px !important; font-size: 12px !important; white-space: nowrap; }
  .cv-hero.redesign-hero .cv-hero-inner { grid-template-columns: 1fr !important; gap: 12px !important; }
  .cv-hero.redesign-hero .cv-hero-copy { order: 0 !important; }
  .cv-hero.redesign-hero .cv-hero-visual { order: 1 !important; width: 100%; max-width: none !important; margin: 0 !important; }
  .cv-hero.redesign-hero { padding: 18px 16px 20px !important; }
  .cv-kicker { margin-bottom: 9px !important; font-size: 10px !important; line-height: 1.2; letter-spacing: .1em; }
  .cv-hero-copy h1 { max-width: 13ch; margin-bottom: 12px !important; font-size: clamp(34px, 9vw, 38px) !important; line-height: .98 !important; }
  .cv-lead { margin-bottom: 15px !important; font-size: 14px !important; line-height: 1.45 !important; }
  .cv-hero-product-frame { aspect-ratio: 1.6; }
  .cv-hero-product-label { left: 10px; bottom: 10px; padding: 6px 8px; font-size: 9px; }
  .cv-hero-cta { gap: 7px !important; }
  .cv-hero-cta a { min-height: 42px; padding: 10px 8px !important; font-size: 12px !important; }
  .store-container { padding-top: 14px !important; }
  #categoryChips { margin-bottom: 10px; }
}
@media (min-width: 1101px) {
  .cv-hero.redesign-hero { padding: 20px 24px !important; }
  .cv-hero-product-frame { aspect-ratio: 1.72; }
  .store-container { padding-top: 18px !important; }
  .products-header { margin: 12px 0 !important; }
}
@media (max-width: 900px) {
  #absToolbar { display: block !important; padding: 10px !important; }
  #absToolbar .abs-search-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }
  #absToolbar #absSearchInput { grid-column: 1 / -1; }
  #absToolbar #absPriceMin,
  #absToolbar #absPriceMax { grid-column: span 2; }
  #absToolbar #absSort { grid-column: span 2; }
  #absToolbar #absFilterBtn,
  #absToolbar #absClearBtn { grid-column: span 1; }
  #absToolbar input,
  #absToolbar select,
  #absToolbar button { width: 100%; min-width: 0; margin: 0; }
  #categoryChips {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #categoryChips::-webkit-scrollbar { display: none; }
  #categoryChips .cat-chip { flex: 0 0 auto; white-space: nowrap; }
  .filter-toggle-btn { min-height: 44px; border-radius: 8px !important; }
}
@media (max-width: 640px) {
  #absToolbar .abs-search-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #absToolbar #absSearchInput,
  #absToolbar #absSort { grid-column: 1 / -1; }
  #absToolbar #absPriceMin,
  #absToolbar #absPriceMax,
  #absToolbar #absFilterBtn,
  #absToolbar #absClearBtn { grid-column: span 1; }
  .products-header { display: grid !important; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 !important; }
  .products-header h1 { font-size: 30px !important; }
  .products-header > select { width: 100%; min-height: 42px; }
  .currency-note { font-size: 11px !important; }
}

/* Cabecera: navegación limpia en PC y marca legible en pantallas táctiles. */
@media (min-width: 901px) {
  body:not(.admin-body) .nav-toggle { display: none !important; }
  body:not(.admin-body) .site-header .header-inner { flex-wrap: nowrap !important; }
}
@media (max-width: 900px) {
  body:not(.admin-body) .site-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  body:not(.admin-body) .site-header .header-inner {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 8px 16px !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
  }
  body:not(.admin-body) .header-left { flex: 0 0 auto !important; gap: 8px !important; }
  body:not(.admin-body) .logo {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    gap: 7px !important;
    overflow: visible !important;
  }
  body:not(.admin-body) .logo-img {
    width: auto !important;
    height: 34px !important;
    max-width: 92px !important;
    padding: 2px 4px !important;
  }
  body:not(.admin-body) .logo-text-wrap {
    display: flex !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    overflow: visible !important;
  }
  body:not(.admin-body) .logo-text {
    display: block !important;
    color: var(--home-ink) !important;
    -webkit-text-fill-color: var(--home-ink) !important;
    font-size: 14px !important;
  }
  body:not(.admin-body) .logo-tagline { display: none !important; }
  body:not(.admin-body) .header-actions {
    flex: 0 0 auto !important;
    gap: 5px !important;
    margin-left: auto !important;
  }
  body:not(.admin-body) .main-nav { display: none !important; }
}
@media (max-width: 640px) {
  body:not(.admin-body) .site-header .header-inner { padding: 7px 12px !important; gap: 8px !important; }
  body:not(.admin-body) .nav-toggle,
  body:not(.admin-body) .header-actions-icons button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }
  body:not(.admin-body) .theme-toggle { display: none !important; }
  body:not(.admin-body) .header-actions-icons { gap: 3px !important; }
  body:not(.admin-body) .header-actions { gap: 5px !important; }
  body:not(.admin-body) .nav-toggle,
  body:not(.admin-body) .header-actions-icons button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  body:not(.admin-body) .logo-img { max-width: 52px !important; height: 30px !important; }
  body:not(.admin-body) .logo-text { font-size: 13px !important; }
  body:not(.admin-body) #authArea .btn-auth { padding: 8px 10px !important; font-size: 11px !important; }
}
@media (max-width: 380px) {
  body:not(.admin-body) .header-fav-btn { display: none !important; }
  body:not(.admin-body) .logo-img { max-width: 72px !important; }
  body:not(.admin-body) .logo-text { font-size: 13px !important; }
}

/* Catálogo: quitar scrolls innecesarios y respetar el header fijo al navegar. */
#productsGrid { scroll-margin-top: 104px; }
#categoryChips {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
#categoryChips::-webkit-scrollbar { display: none; }
#categoryChips .cat-chip { scroll-snap-align: start; }
@media (min-width: 901px) {
  .sidebar { max-height: none !important; height: auto !important; overflow: visible !important; }
}

/* En móvil, cada producto ocupa el ancho disponible: foto a un lado, acciones al otro. */
@media (max-width: 640px) {
  .products-grid,
  #productsGrid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .product-card,
  .product-card.abs-card {
    display: grid !important;
    grid-template-columns: minmax(140px, .65fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(190px, auto);
    align-items: stretch;
  }
  .product-card .product-image {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 1 !important;
    align-self: center;
  }
  .product-card .product-image img { object-fit: contain; }
  .product-card .product-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding: 12px !important;
    gap: 7px !important;
  }
  .product-meta-row { flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .product-category { font-size: 10px !important; }
  .product-rating { font-size: 11px !important; }
  .product-name { font-size: 14px !important; line-height: 1.3 !important; -webkit-line-clamp: 3; }
  .price-row.dual-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
  .price-row .price { font-size: 1rem !important; }
  .product-cta-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 40px; gap: 6px; }
  .product-cta-row .btn-add-cart {
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px !important;
    font-size: 12px !important;
    white-space: nowrap;
  }
  .product-cta-row .btn-wa-card { width: 40px; height: 42px; }
  .product-card .btn-card-secondary { min-height: 38px; font-size: 11px !important; }
  html body:not(.admin-body) #floatingWhatsApp,
  html body:not(.admin-body) #cartFloating,
  html body:not(.admin-body) .chat-toggle { display: none !important; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 380px) {
  .product-card,
  .product-card.abs-card { grid-template-columns: 96px minmax(0, 1fr) !important; }
  .product-card .product-info { padding: 10px !important; }
}
/* La cotización y el WhatsApp por producto quedan visibles; se evita tapar filtros. */
html body:not(.admin-body) #floatingWhatsApp { display: none !important; }

