/* E-catalogue (V2). Builds on home.css tokens, division.css (intro, quote card) and company.css (CTA band). */
.ec-section { padding: 48px 0 16px; }
.ec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 20px; }
.ec-head h2 { font-size: 28px; margin: 6px 0 0; }
.ec-head > p { max-width: 420px; font-size: 14.5px; line-height: 1.6; color: var(--gx-muted); margin: 0 !important; }

/* brochures */
.ec-broch { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; }
.ec-b { display: flex; flex-direction: column; border: 1px solid var(--gx-line); border-radius: 14px; overflow: hidden; background: #fff; }
.ec-b__cover { position: relative; display: flex; align-items: flex-start; justify-content: center; height: 300px; padding: 16px 16px 0; border: 0; background: var(--gx-surface); overflow: hidden; cursor: zoom-in; }
.ec-b__cover img { width: 88%; height: auto; box-shadow: 0 6px 20px rgba(13, 34, 48, .18); transition: transform .3s ease; }
.ec-b__cover:hover img { transform: translateY(-6px); }
.ec-b__cover > i { margin: auto; font-size: 48px; color: var(--gx-blue); }
.ec-b__tag { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 8px; border-radius: 6px; background: var(--gx-blue-900); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ec-b__body { padding: 14px 16px 16px; }
.ec-b__body h3 { font-family: var(--gx-body) !important; font-size: 16.5px; font-weight: 600; letter-spacing: 0 !important; margin: 0 0 4px; }
.ec-b__body p { font-size: 13px; color: var(--gx-muted); margin: 0 0 12px !important; }
.ec-b__act { display: flex; gap: 8px; }
.ec-b__act .gx-btn { flex: 1; height: 40px; padding: 0 10px; }
.ec-b--ask { align-items: center; justify-content: center; padding: 24px; text-align: center; border-style: dashed; background: #f7fafc; }
.ec-b--ask > i { font-size: 30px; color: var(--gx-blue); }
.ec-b--ask h3 { font-family: var(--gx-body) !important; font-size: 16px; font-weight: 600; letter-spacing: 0 !important; margin: 12px 0 6px; }
.ec-b--ask p { font-size: 13.5px; line-height: 1.55; color: var(--gx-muted); margin: 0 0 14px !important; }

/* category catalogues */
.ec-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gx-line); }
.ec-tabs button { padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 15px; font-weight: 600; color: var(--gx-ink-2); white-space: nowrap; }
.ec-tabs button small { font-weight: 400; color: var(--gx-muted); margin-left: 4px; }
.ec-tabs button[aria-selected="true"] { color: var(--gx-ink); border-bottom-color: var(--gx-orange); }
.ec-div { display: flex; align-items: center; gap: 16px; margin: 20px 0 6px; padding: 18px 20px; border: 1px solid var(--gx-sky); border-radius: 14px; background: var(--gx-sky-50); }
.ec-div > i { font-size: 26px; color: var(--gx-blue); }
.ec-div > div { flex: 1; }
.ec-div strong { display: block; font-size: 16px; }
.ec-div small { font-size: 13.5px; color: var(--gx-muted); }
.ec-div .gx-btn { white-space: nowrap; }
.ec-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; margin: 0; padding: 0; }
.ec-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--gx-line); }
.ec-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: var(--gx-ink) !important; }
.ec-row__main img { width: 52px; height: 52px; flex: none; object-fit: contain; border: 1px solid var(--gx-line); border-radius: 8px; background: #fff; }
.ec-row__main span { min-width: 0; }
.ec-row__main strong { display: block; font-size: 14.5px; font-weight: 600; }
.ec-row__main:hover strong { color: var(--gx-blue); }
.ec-row__main small { font-size: 12.5px; color: var(--gx-muted); }
.ec-row__view { font-size: 13px; font-weight: 600; color: var(--gx-blue) !important; white-space: nowrap; }
.ec-pdf { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; padding: 0 12px; border: 1px solid var(--gx-line-2); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--gx-ink) !important; white-space: nowrap; }
.ec-pdf i { font-size: 16px; color: #d93025; }
.ec-pdf:hover { border-color: var(--gx-blue); }
[data-ec-pdf].is-busy { opacity: .6; cursor: progress; }

/* brochure viewer */
.ec-viewer { width: min(1000px, 94vw); height: min(860px, 92vh); max-height: 92vh; padding: 0; border: 0; border-radius: 16px; overflow: hidden; }
.ec-viewer[open] { display: flex; flex-direction: column; }
.ec-viewer::backdrop { background: rgba(6, 50, 74, .75); }
.ec-viewer__bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--gx-line); }
.ec-viewer__bar p { flex: 1; min-width: 0; margin: 0 !important; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-viewer__btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--gx-line-2); border-radius: 9px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--gx-ink) !important; }
.ec-viewer__btn--x { width: 38px; padding: 0; justify-content: center; border-radius: 50%; }
.ec-viewer__stage { flex: 1; min-height: 0; overflow: auto; background: #525659; display: flex; justify-content: center; }
.ec-viewer__stage iframe { width: 100%; height: 100%; border: 0; background: #525659; }
.ec-viewer__stage img { width: 100%; height: auto; align-self: flex-start; }
.ec-viewer__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--gx-line); font-size: 14px; color: var(--gx-ink-2); }

@media (max-width: 1180px) { .ec-broch { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px) {
    .ec-list { grid-template-columns: 1fr; }
    .ec-broch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .ec h1 { font-size: 28px; }
    .ec-hero .gd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ec-hero .gd-stats div, .ec-hero .gd-stats div:first-child { padding: 0 10px; border-left: 1px solid var(--gx-line); }
    .ec-hero .gd-stats div:first-child { padding-left: 0; border-left: 0; }
    .ec-hero .gd-stats dt { font-size: 19px; }
    .ec-hero .gd-stats dd { font-size: 12px; }
    .ec-hero .gd-quote ul { display: flex; justify-content: space-between; }
    .ec-section { padding: 32px 0 8px; }
    .ec-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 14px; }
    .ec-head h2 { font-size: 22px; }
    /* Brochures: horizontal swipe row with the next card peeking in. */
    .ec-broch { display: flex; overflow-x: auto; gap: 12px; margin: 0 -16px; padding: 0 16px 6px; scroll-snap-type: x mandatory; }
    .ec-b { flex: 0 0 72%; scroll-snap-align: start; }
    .ec-b--ask { flex-basis: 60%; }
    .ec-b__cover { height: 220px; }
    /* Division tabs become scrollable pills. */
    .ec-tabs { overflow-x: auto; gap: 8px; border-bottom: 0; margin: 0 -16px; padding: 0 16px 4px; }
    .ec-tabs button { flex: none; height: 38px; padding: 0 14px; border: 1px solid var(--gx-line-2); border-radius: 999px; font-size: 14px; }
    .ec-tabs button[aria-selected="true"] { background: var(--gx-blue-900); border-color: var(--gx-blue-900); color: #fff; }
    .ec-tabs button[aria-selected="true"] small { color: #a9cbe0; }
    .ec-div { flex-wrap: wrap; padding: 16px; margin-top: 14px; }
    .ec-div > i { display: none; }
    .ec-div .gx-btn { width: 100%; height: 46px; }
    .ec-row { gap: 12px; padding: 12px 0; }
    .ec-row__main img { width: 56px; height: 56px; }
    .ec-row__main strong { font-size: 15px; }
    .ec-row__gen, .ec-row__view { display: none; }
    .ec-pdf { width: 44px; height: 44px; padding: 0; border-radius: 10px; }
    .ec-pdf i { font-size: 20px; }
    .ec-pdf span { display: none; }
    .ec-viewer { width: 100vw; height: 100%; max-width: 100vw; max-height: 100%; border-radius: 0; }
    .ec-viewer__btn:not(.ec-viewer__btn--x) span { display: none; }
    .ec-viewer__btn:not(.ec-viewer__btn--x) { width: 38px; padding: 0; justify-content: center; }
    .ec-viewer__foot { flex-direction: column; align-items: stretch; }
    .ec-viewer__foot .gx-btn { justify-content: center; }
    .gco-cta { padding: 24px 20px; }
    .gco-cta__actions { width: 100%; flex-direction: column; }
    .gco-cta__actions .gx-btn { width: 100%; }
}
