/* Centro de descargas (/catalogos, /pt/catalogos, /en/catalogs). Design: design_handoff_catalogos, October 2026.
   Breakpoints follow Bootstrap: lg >= 992 (sidebar), md 768-991 (chips, desktop cards), sm < 768 (compact cards,
   collapsible lines). Everything is scoped to .cd-page: the layout styles bare span/a/p/input globally. */

/* Bootstrap's reboot makes every scroll smooth; on this page the JS asks for smooth scrolling where it wants it. */
html:has(.cd-page) { scroll-behavior: auto; }

.cd-page {
  --cd-text: #101010; --cd-muted: #808080; --cd-brand: #9D1B37; --cd-ctl: #c5c5c5; --cd-line: #e5e5e5;
  --cd-rule: #eee; --cd-tint: #f5f5f5; --cd-tint2: #f0f0f0; --cd-wa: #4DC65A;
  background: #fff; color: var(--cd-text); font-family: 'Wix Madefor Text', sans-serif; line-height: normal;
  -webkit-font-smoothing: antialiased;
}
.cd-page *, .cd-page *::before, .cd-page *::after { box-sizing: border-box; }
.cd-page [hidden] { display: none !important; }
.cd-page a { color: var(--cd-text); text-decoration: none; }
.cd-page button { font-family: inherit; border-radius: 0; }
.cd-page span, .cd-page a, .cd-page button, .cd-page input { font-family: 'Wix Madefor Text', sans-serif; }
.cd-page input:focus-visible, .cd-page button:focus-visible, .cd-page a:focus-visible { outline: 2px solid var(--cd-brand); outline-offset: 2px; }

/* Banner */
.cd-banner { background-size: cover; background-position: top center; padding: 122px 0 32px; }
.cd-page .cd-crumb { background: #fff; padding: 5px 10px; display: inline-flex; gap: 10px; align-items: center; font-size: 12px; }
.cd-page .cd-crumb a, .cd-page .cd-crumb span { font-size: 12px; color: #000; }
.cd-page .cd-crumb b { color: var(--cd-brand); font-size: 12px; font-family: 'Wix Madefor Text', sans-serif; }
.cd-page .cd-h1 { font-family: 'Teko', sans-serif; font-weight: 500; color: #fff; font-size: 64px; line-height: .9; margin: 12px 0 6px; }
.cd-page .cd-lead { color: #d0d0d0; font-size: 14px; line-height: 1.5; margin: 0 0 18px; max-width: 560px; text-wrap: pretty; }
.cd-search { display: flex; align-items: center; background: #fff; max-width: 720px; height: 50px; }
.cd-search > i { font-size: 18px; color: var(--cd-muted); padding: 0 16px 0 20px; }
.cd-page .cd-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; font-size: 15px; color: var(--cd-text); background: transparent; padding: 1px 2px; -webkit-appearance: none; appearance: none; }
.cd-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.cd-page .cd-search__clear { border: 0; background: transparent; padding: 0 18px; height: 100%; cursor: pointer; color: var(--cd-muted); font-size: 16px; }
.cd-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; }
.cd-page .cd-stats span { color: #fff; font-size: 14px; }
.cd-page .cd-stats b { font-family: 'Teko', sans-serif; font-size: 22px; font-weight: 500; margin-right: 5px; }

/* Mobile / tablet filter bar */
.cd-mfilters { display: none; position: sticky; top: 60px; z-index: 50; background: #fff; border-bottom: 1px solid var(--cd-line); padding: 12px 0; }
.cd-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 4px; scrollbar-width: none; }
.cd-chips::-webkit-scrollbar { display: none; }
.cd-page .cd-chip { flex: none; height: 40px; padding: 0 14px; border: 1px solid var(--cd-ctl); background: #fff; color: var(--cd-text); font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cd-page .cd-chip__n { font-size: 11px; opacity: .7; color: inherit; }
.cd-page .cd-chip.is-active { background: #000; color: #fff; border-color: #000; }
.cd-mlang { display: flex; align-items: center; gap: 10px; padding: 8px 0 0; }
.cd-page .cd-mlang__label { font-size: 12px; color: var(--cd-muted); }
.cd-mlang__btns { display: flex; }
.cd-page .cd-mlang__btn { height: 32px; min-width: 44px; padding: 0 10px; border: 1px solid var(--cd-ctl); margin-left: -1px; background: #fff; color: var(--cd-text); font-size: 12px; font-weight: 600; cursor: pointer; }
.cd-page .cd-mlang__btn.is-active { background: #000; color: #fff; border-color: #000; }

/* Main grid */
.cd-main { padding: 32px 0 16px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }

/* Desktop filter panel */
.cd-side { position: sticky; top: 106px; display: flex; flex-direction: column; gap: 24px; }
.cd-side__head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 2px solid #000; }
.cd-page .cd-side__title { display: flex; align-items: center; gap: 10px; font-family: 'Teko', sans-serif; font-size: 24px; font-weight: 500; line-height: 1; }
.cd-side__title i { font-size: 15px; color: var(--cd-brand); }
.cd-page .cd-side__reset { background: transparent; border: 0; padding: 0; font-size: 12px; color: var(--cd-brand); cursor: pointer; text-decoration: underline; }
.cd-side__group { display: flex; flex-direction: column; gap: 6px; }
.cd-side__group--lang { gap: 8px; }
.cd-page .cd-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--cd-muted); }
.cd-side__group:not(.cd-side__group--lang) .cd-label { margin-bottom: 2px; }
.cd-page .cd-lbtn { display: flex; width: 100%; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; background: #fff; border: 1px solid var(--cd-line); cursor: pointer; text-align: left; color: var(--cd-text); transition: background .15s; }
.cd-lbtn__img { width: 36px; height: 36px; object-fit: cover; flex: none; display: block; }
.cd-page .cd-lbtn__icon { width: 36px; height: 36px; flex: none; background: var(--cd-tint2); color: var(--cd-text); display: flex; align-items: center; justify-content: center; }
.cd-lbtn__icon i { font-size: 14px; }
.cd-page .cd-lbtn__name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; line-height: 1.25; color: inherit; }
.cd-page .cd-lbtn__n { font-size: 11px; font-weight: 700; min-width: 24px; height: 20px; padding: 0 6px; display: flex; align-items: center; justify-content: center; background: var(--cd-tint2); color: #555; }
.cd-page .cd-lbtn.is-active { background: #000; color: #fff; border-color: #000; }
.cd-page .cd-lbtn.is-active .cd-lbtn__n, .cd-page .cd-lbtn.is-active .cd-lbtn__icon { background: var(--cd-brand); color: #fff; }
.cd-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--cd-tint); padding: 3px; gap: 3px; }
.cd-page .cd-seg__btn { height: 32px; border: 0; background: transparent; color: var(--cd-text); font-size: 12px; font-weight: 600; cursor: pointer; }
.cd-page .cd-seg__btn.is-active { background: #000; color: #fff; }
.cd-help { background: #000; padding: 18px; }
.cd-help__title { font-family: 'Teko', sans-serif; font-size: 22px; font-weight: 400; color: #fff; line-height: 1; }
.cd-page .cd-help__text { color: var(--cd-muted); font-size: 12px; line-height: 1.5; margin: 6px 0 12px; }
.cd-page .cd-help__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--cd-wa); color: #fff; padding: 8px 12px; font-size: 13px; }
.cd-help__btn i { font-size: 15px; }

/* Results */
.cd-results { min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.cd-resline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 32px; }
.cd-page .cd-resline__text { font-size: 14px; color: var(--cd-muted); }
.cd-tags { display: contents; }
.cd-page .cd-tag { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; background: var(--cd-tint); border: 0; font-size: 12px; cursor: pointer; color: var(--cd-text); }
.cd-tag i { font-size: 11px; }

.cd-page .cd-h2 { font-family: 'Teko', sans-serif; font-weight: 500; font-size: 32px; line-height: 1; margin: 0; color: var(--cd-text); }
.cd-gen__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.cd-page .cd-gen__sub { font-size: 13px; color: var(--cd-muted); }
.cd-gen__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.cd-gcard { display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.cd-page .cd-gcard__cover { position: relative; display: block; aspect-ratio: 4 / 5; background: #000; overflow: hidden; }
.cd-gcard__cover img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .75; }
.cd-page .cd-gcard__shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0) 35%, rgba(0,0,0,.9)); }
.cd-page .cd-gcard__kicker { position: absolute; top: 12px; left: 12px; background: var(--cd-brand); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .08em; padding: 4px 7px; }
.cd-page .cd-gcard__title { position: absolute; left: 14px; right: 14px; bottom: 10px; font-family: 'Teko', sans-serif; font-size: 22px; line-height: .95; color: #fff; font-weight: 400; }
.cd-gcard__btns { display: flex; gap: 6px; }
.cd-page .cd-gbtn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; background: #000; color: #fff; font-size: 12px; font-weight: 600; }
.cd-gbtn i { font-size: 11px; }

.cd-line { scroll-margin-top: 120px; }
.cd-page .cd-line__head { display: flex; width: 100%; align-items: flex-end; justify-content: space-between; gap: 16px; background: transparent; border: 0; padding: 0 0 10px; margin-bottom: 14px; border-bottom: 2px solid #000; cursor: default; text-align: left; color: var(--cd-text); }
.cd-line__titles { display: flex; flex-direction: column; gap: 4px; }
.cd-page .cd-kicker { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--cd-brand); }
.cd-page .cd-line__title { font-family: 'Teko', sans-serif; font-weight: 500; font-size: 32px; line-height: .95; text-transform: uppercase; color: var(--cd-text); }
.cd-page .cd-line__meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--cd-muted); white-space: nowrap; padding-bottom: 4px; }
.cd-page .cd-line__meta span { font-size: 13px; color: var(--cd-muted); }
.cd-chev { display: none; color: var(--cd-text); font-size: 14px; }

/* Regular grid: every card in a row is as tall as the tallest one (products are ordered by number of documents
   in CentroDescargas, so cards of similar height share a row). */
.cd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cd-card { background: #fff; border: 1px solid var(--cd-line); display: flex; flex-direction: column; }
.cd-card__media { aspect-ratio: 16 / 9; background: var(--cd-tint); overflow: hidden; }
.cd-card__media picture { display: block; width: 100%; height: 100%; }
.cd-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-card__info { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 2px; }
.cd-page .cd-card__title { font-family: 'Teko', sans-serif; font-size: 22px; font-weight: 500; line-height: .95; margin: 0; text-wrap: pretty; text-transform: uppercase; color: var(--cd-text); }
.cd-page .cd-card__meta { font-size: 12px; color: var(--cd-muted); }
.cd-card__docs { padding: 0 14px 6px; }
.cd-page .cd-doc { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--cd-rule); color: var(--cd-text); }
.cd-doc__icon { font-size: 16px; color: var(--cd-brand); width: 14px; flex: none; }
.cd-page .cd-doc__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cd-page .cd-doc__title { font-size: 13px; font-weight: 500; line-height: 1.25; color: inherit; }
.cd-page .cd-doc__type { font-size: 11px; color: var(--cd-muted); }
.cd-page .cd-doc__lang { font-size: 11px; font-weight: 700; border: 1px solid var(--cd-ctl); padding: 2px 6px; color: var(--cd-text); flex: none; }
.cd-doc__dl { font-size: 13px; flex: none; }

.cd-page .cd-more { margin-top: 0; height: 40px; padding: 0 18px; background: #000; color: #fff; border: 0; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }

.cd-empty { padding: 56px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cd-empty > i { font-size: 36px; color: var(--cd-ctl); }
.cd-empty__title { font-family: 'Teko', sans-serif; font-size: 36px; font-weight: 500; line-height: 1; }
.cd-page .cd-empty__text { color: var(--cd-muted); font-size: 15px; margin: 0; max-width: 440px; }
.cd-empty__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-page .cd-btn { height: 46px; padding: 0 20px; border: 0; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.cd-page .cd-btn--dark { background: #000; }
.cd-page .cd-btn--wa { background: var(--cd-wa); }

/* Hover only where there is a pointer that hovers: on touch screens :hover sticks to whatever was last tapped. */
@media (hover: hover) {
  .cd-page a:hover { color: var(--cd-brand); }
  .cd-page .cd-search__clear:hover { color: var(--cd-brand); }
  .cd-page .cd-lbtn:hover { border-color: var(--cd-text); }
  .cd-page .cd-seg__btn:hover { color: var(--cd-brand); }
  .cd-page .cd-help__btn:hover { color: #fff; }
  .cd-page .cd-tag:hover { color: var(--cd-brand); }
  .cd-page .cd-gbtn:hover { background: var(--cd-brand); color: #fff; }
  .cd-page .cd-doc:hover { color: var(--cd-brand); }
  .cd-page .cd-more:hover { background: var(--cd-brand); }
  .cd-page .cd-btn--wa:hover { color: #fff; }
}

/* < 992px: no sidebar, sticky chip bar */
@media (max-width: 991.98px) {
  .cd-banner { padding: 84px 0 24px; }
  .cd-mfilters { display: block; }
  .cd-main { padding: 20px 0 8px; grid-template-columns: minmax(0, 1fr); }
  .cd-side { display: none; }
}

/* < 768px: compact cards, scrolling general catalogues, collapsible lines */
@media (max-width: 767.98px) {
  .cd-page .cd-h1 { font-size: 44px; }
  .cd-page .cd-h2, .cd-page .cd-line__title { font-size: 26px; }
  .cd-results { gap: 28px; }
  .cd-gen__grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .cd-gen__grid::-webkit-scrollbar { display: none; }
  .cd-gcard { flex: none; width: 128px; }
  .cd-cards { gap: 10px; margin-bottom: 10px; }
  .cd-card__head { display: flex; gap: 12px; align-items: center; padding: 10px; }
  .cd-card__media { width: 64px; height: 64px; aspect-ratio: auto; flex: none; }
  .cd-card__info { padding: 0; gap: 4px; min-width: 0; }
  .cd-page .cd-card__title { font-size: 21px; }
  .cd-card__docs { padding: 0 12px 6px; }
  .cd-page.cd-acc .cd-line__head { cursor: pointer; }
  .cd-page.cd-acc .cd-chev { display: inline-block; }
  .cd-page.cd-acc .cd-line:not(.is-open) .cd-line__body { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-page .cd-lbtn { transition: none; }
}
