/* V52 — la cabecera fija conserva su altura y un solo acceso al asistente. */
:root {
  --v52-header-offset: calc(var(--site-header-height, 220px) + 16px);
  scroll-padding-top: var(--v52-header-offset);
}

html,
body.ttz-app { overscroll-behavior-y: none; }

body.ttz-app > #siteHeader {
  z-index: 240;
  box-sizing: border-box;
  width: 100%;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(137, 211, 197, .23), transparent 36%),
    radial-gradient(ellipse at 0% 0%, rgba(255, 192, 155, .24), transparent 35%),
    linear-gradient(105deg, #fff3e9 0%, #fffaf5 48%, #eff8f4 100%);
  border-bottom: 1px solid rgba(202, 168, 144, .7);
  box-shadow: 0 10px 28px rgba(79, 47, 37, .1);
  backdrop-filter: none;
}

body.ttz-app > #siteHeader::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(79, 47, 37, .08) .7px, transparent .8px);
  background-size: 22px 22px;
  opacity: .22;
  content: "";
  pointer-events: none;
}

body.ttz-app > #siteHeader > .container { position: relative; z-index: 1; }
body.ttz-app > #siteHeader .nav { min-width: 0; flex-wrap: nowrap; }
body.ttz-app > #siteHeader .nav-actions { min-width: 0; max-width: 100%; flex-wrap: nowrap; gap: clamp(5px, .7vw, 10px); }
body.ttz-app > #siteHeader .nav-actions > * { min-width: 0; flex: 0 1 auto; }
body.ttz-app > #siteHeader .header-assistant { max-width: 156px; overflow: hidden; white-space: nowrap; }
body.ttz-app > #siteHeader #headerAssistant { display: none !important; }
body.ttz-app > #siteHeader #aiLauncher { position: static; width: auto; min-width: 46px; max-width: 156px; min-height: 46px; flex: 0 1 auto; transform: none; }
body.ttz-app > #siteHeader #aiLauncher span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ttz-app > #siteHeader .site-quick-tools { position: relative; z-index: 1; min-width: 0; }
body.ttz-app > #siteHeader .site-quick-tools .search-panel { min-width: 0; }

body.ttz-app main > section[id],
body.ttz-app #directorio,
body.ttz-app #marketplace,
body.ttz-app #comunidad,
body.ttz-app #accesibilidad {
  scroll-margin-top: var(--v52-header-offset);
}

#marketplace .v51-market-empty {
  flex: 1 0 100%;
  width: 100%;
  box-sizing: border-box;
}

.v52-demo-catalog {
  margin: 24px 0 8px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #d8e5dc;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(249, 253, 249, .98), rgba(255, 248, 240, .98));
  box-shadow: 0 14px 36px rgba(55, 77, 62, .07);
}
.v52-demo-catalog[hidden] { display: none !important; }
.v52-demo-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v52-demo-heading h3 { margin: 10px 0 6px; color: #173f38; font-size: clamp(22px, 3vw, 30px); }
.v52-demo-heading p { max-width: 75ch; margin: 0; color: #53685d; line-height: 1.6; }
.v52-demo-badge { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; padding: 6px 10px; border: 1px solid #dfc889; border-radius: 999px; background: #fff5d9; color: #6a5127; font-size: 11px; font-weight: 850; letter-spacing: .04em; line-height: 1.3; overflow-wrap: anywhere; }
.v52-demo-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.v52-demo-filter { min-height: 42px; padding: 8px 13px; border: 1px solid #cdded2; border-radius: 999px; background: #fff; color: #285b4d; font-weight: 750; }
.v52-demo-filter[aria-pressed="true"] { background: #145f53; border-color: #145f53; color: #fff; }
.v52-demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.v52-demo-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 8px; padding: 17px; border: 1px solid #e6d9ca; border-radius: 20px; background: rgba(255, 255, 255, .96); box-shadow: 0 7px 18px rgba(79, 47, 37, .045); }
.v52-demo-card-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #ffedda, #e3f4ee); font-size: 24px; }
.v52-demo-category { color: #285b4d; font-size: 12px; font-weight: 800; }
.v52-demo-card h4 { margin: 0; color: #4f2f25; font-size: 18px; line-height: 1.3; }
.v52-demo-card p { margin: 0; color: #74645b; font-size: 13px; line-height: 1.55; }
.v52-demo-card .v52-demo-metadata { color: #58675e; font-size: 12px; font-weight: 700; }
.v52-demo-detail-button { width: 100%; min-height: 44px; margin-top: auto; padding: 9px 12px; border: 1px solid #b7cfc0; border-radius: 12px; background: #eef6ef; color: #145f53; font-weight: 800; }
.v52-demo-no-match { margin: 0; color: #58675e; line-height: 1.5; }
.v52-demo-no-match[hidden] { display: none !important; }
.v52-demo-detail-title { margin: 14px 0 8px; color: #4f2f25; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(24px, 4vw, 34px); }
.v52-demo-detail-description, .v52-demo-detail-note { max-width: 65ch; line-height: 1.65; }
.v52-demo-detail-note { padding: 12px 14px; border: 1px solid #e5d9c5; border-radius: 14px; background: #fff8e9; color: #5e4b2c; }

@media (max-width: 960px) {
  .v52-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .v52-demo-catalog { padding: 16px; border-radius: 20px; }
  .v52-demo-grid { grid-template-columns: minmax(0, 1fr); }
  .v52-demo-filters { flex-wrap: nowrap; overflow-x: auto; padding: 2px 1px 9px; scrollbar-width: thin; }
  .v52-demo-filter { flex: 0 0 auto; }
}

body.easy.ttz-app :where(h1, h2, h3, p, small, strong, a, button, label, span) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.easy.ttz-app :where(img, video, canvas) { max-width: 100%; }
body.easy.ttz-app .card,
body.easy.ttz-app .product-card,
body.easy.ttz-app .body-card,
body.easy.ttz-app .product-body,
body.easy.ttz-app .card-actions,
body.easy.ttz-app .meta { min-width: 0; }
body.easy.ttz-app .media img,
body.easy.ttz-app .product-media img { display: block; max-width: 100%; object-fit: cover; }

@media (max-width: 1500px) {
  body.ttz-app > #siteHeader .nav-links { display: none !important; }
  body.ttz-app > #siteHeader #menu { display: inline-flex !important; align-items: center; justify-content: center; }
}

@media (max-width: 960px) {
  :root { --v52-header-offset: calc(var(--site-header-height, 210px) + 12px); }
  body.ttz-app > #siteHeader { box-shadow: 0 7px 20px rgba(79, 47, 37, .1); }
  body.ttz-app > #siteHeader .nav { min-height: 62px; }
  body.ttz-app > #siteHeader #aiLauncher { width: 46px; min-width: 46px; max-width: 46px; padding: 9px; justify-content: center; }
  body.ttz-app > #siteHeader #aiLauncher span:last-child { display: none !important; }
  body.ttz-app > #siteHeader .site-quick-tools { padding: 0 0 10px; }
}

@media (max-width: 620px) {
  body.ttz-app > #siteHeader .site-quick-tools .search-panel { grid-template-columns: minmax(0, 1fr) auto; }
  body.ttz-app > #siteHeader .site-quick-tools .search-panel .search-btn { display: none; }
  body.ttz-app > #siteHeader .site-quick-tools .search-panel input { min-width: 0; width: 100%; }
  body.ttz-app #marketplace .v51-market-empty { min-height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  body.ttz-app *, body.ttz-app *::before, body.ttz-app *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
