/* Media gallery: theme-aware cards, native modal, no automatic animation. */
.ec-gallery { --gallery-line: rgba(128, 145, 135, .28); margin: 32px 0 48px; min-width: 0; }
.ec-gallery [hidden], .ec-gallery-viewer [hidden] { display: none !important; }
.ec-gallery__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.ec-gallery .ec-gallery__eyebrow { margin: 0 0 8px; color: var(--pa-internal-muted, inherit); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.ec-gallery h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -.035em; }
.ec-gallery .ec-gallery__intro { margin: 8px 0 0; color: var(--pa-internal-muted, inherit); }
.ec-gallery__filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--gallery-line); border-radius: 12px; }
.ec-gallery__filters button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: .88rem; cursor: pointer; }
.ec-gallery__filters button[aria-pressed="true"] { background: #40d66f; color: #061009; font-weight: 750; }
.ec-gallery__filters button span { min-width: 20px; font-size: .75rem; opacity: .8; }
.ec-gallery__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ec-gallery .ec-gallery__card { display: flex; flex-direction: column; min-width: 0; margin: 0; border: 1px solid var(--gallery-line); border-radius: 14px; overflow: hidden; background: rgba(128, 145, 135, .06); }
.ec-gallery .ec-gallery__visual { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 0; overflow: hidden; background: #14221c; cursor: zoom-in; text-decoration: none; }
.ec-gallery__visual img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.ec-gallery__visual:hover img { transform: scale(1.025); }
.ec-gallery__badge, .ec-gallery__expand { position: absolute; display: grid; place-items: center; color: #fff; background: rgba(8, 18, 13, .86); }
.ec-gallery__badge { top: 12px; left: 12px; padding: 5px 10px; border-radius: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.ec-gallery__expand { bottom: 12px; right: 12px; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; font-size: 1.35rem; }
.ec-gallery .ec-gallery__visual--video { cursor: pointer; }
.ec-gallery__visual--video img { opacity: .65; }
.ec-gallery__play { display: grid; place-items: center; flex-shrink: 0; width: 62px; height: 62px; margin: 0 auto; padding-left: 3px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: #40d66f; color: #061009; font-size: 1.3rem; box-shadow: 0 8px 25px #0003; }
.ec-gallery__visual .ec-gallery__play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ec-gallery .ec-gallery__card figcaption { display: flex; gap: 12px; align-items: baseline; padding: 15px 16px; font-size: .88rem; font-weight: 600; line-height: 1.5; }
.ec-gallery__card figcaption > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ec-gallery__number { flex-shrink: 0; white-space: nowrap; opacity: .6; font-size: .72rem; font-variant-numeric: tabular-nums; }
.ec-gallery .ec-gallery__hint { margin: 16px 0 0; color: var(--pa-internal-muted, inherit); font-size: .82rem; }
.ec-gallery__video video { background: #080d0b; }
.ec-gallery__video [data-video-placeholder] { display: grid; justify-items: center; align-content: center; gap: 16px; padding: 24px; min-height: 240px; text-align: center; }
.ec-gallery__video [data-video-placeholder] p { max-width: 42ch; margin: 0; }
.ec-gallery__video [data-video-placeholder] a { color: inherit; font-size: .85rem; text-decoration: underline; }
.ec-gallery__video [data-video-placeholder] button { margin: 0; }
.ec-gallery__video details { padding: 0 20px 10px; }
.ec-gallery-open { overflow: hidden; }
dialog.ec-gallery-viewer { box-sizing: border-box; width: min(1280px, calc(100vw - 40px)); max-width: none; height: min(960px, calc(100dvh - 40px)); max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid #35453d; border-radius: 18px; background: #0c1510; color: #f3f6f4; box-shadow: 0 30px 100px #0008; }
dialog.ec-gallery-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.ec-gallery-viewer::backdrop { background: rgba(3, 8, 5, .88); backdrop-filter: blur(8px); }
.ec-gallery-viewer *, .ec-gallery-viewer *::before, .ec-gallery-viewer *::after { box-sizing: border-box; }
.ec-gallery-viewer__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #35453d; }
.ec-gallery-viewer__counter { font-size: .85rem; color: #c4d0c9; font-variant-numeric: tabular-nums; }
.ec-gallery-viewer button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-width: 48px; min-height: 48px; margin: 0; padding: 8px 14px; border: 1px solid #51665a; border-radius: 9px; background: #1d2c23; color: #f3f6f4; font: inherit; line-height: 1.2; cursor: pointer; }
.ec-gallery-viewer button:hover { background: #2d4436; color: #fff; }
.ec-gallery-viewer :is(button, a, summary):focus-visible { outline: 3px solid #40d66f; outline-offset: 3px; }
.ec-gallery-viewer__top button { font-size: .85rem; }
.ec-gallery-viewer__top button span { font-size: 1.6rem; }
.ec-gallery-viewer__stage { display: flex; min-width: 0; min-height: 0; padding: 16px; background: #070c09; }
.ec-gallery-viewer__stage[data-type="photo"] { touch-action: pan-y pinch-zoom; }
.ec-gallery-viewer__media { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; width: 100%; overflow: auto; }
.ec-gallery-viewer__media > img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.ec-gallery-viewer__media .ec-gallery__video { width: 100%; max-height: 100%; overflow: auto; color: #f3f6f4; }
.ec-gallery-viewer__media video { max-height: 62dvh; width: 100%; height: auto; }
.ec-gallery-viewer__media .pouso-product-external { width: 100%; }
.ec-gallery-viewer__media iframe { max-height: 60dvh; width: 100%; aspect-ratio: 16 / 9; }
.ec-gallery-viewer__bottom { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid #35453d; }
.ec-gallery-viewer__caption { grid-column: 2; min-width: 0; max-height: 18dvh; overflow: auto; text-align: center; overflow-wrap: anywhere; }
.ec-gallery-viewer .ec-gallery-viewer__caption h3 { margin: 0; color: #f3f6f4; font-size: 1rem; line-height: 1.4; }
.ec-gallery-viewer .ec-gallery-viewer__caption p { margin: 4px 0 0; color: #c4d0c9; font-size: .8rem; }
.ec-gallery-viewer__bottom button { font-size: 1.35rem; }
.ec-gallery-viewer__thumbs { display: flex; gap: 8px; min-width: 0; padding: 4px 20px 18px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.ec-gallery-viewer__thumbs button { position: relative; flex: 0 0 76px; width: 76px; height: 58px; padding: 0; overflow: hidden; border: 2px solid transparent; opacity: .65; }
.ec-gallery-viewer__thumbs button[aria-current="true"] { opacity: 1; border-color: #40d66f; }
.ec-gallery-viewer__thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ec-gallery-viewer__thumbs span { position: absolute; bottom: 2px; right: 3px; padding: 1px 4px; border-radius: 3px; background: #08120ddd; color: white; font-size: .68rem; }
@media (min-width: 600px) { .ec-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .ec-gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 599px) {
    .ec-gallery__header { gap: 16px; }
    .ec-gallery__filters { width: 100%; }
    .ec-gallery__filters button { flex: 1; justify-content: center; padding-inline: 8px; }
    dialog.ec-gallery-viewer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
    .ec-gallery-viewer__top { padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
    .ec-gallery-viewer__stage { padding: 8px; }
    .ec-gallery-viewer__bottom { gap: 8px; padding: 10px 12px; }
    .ec-gallery-viewer__thumbs { padding: 4px 12px max(12px, env(safe-area-inset-bottom)); }
    .ec-gallery-viewer__caption h3 { font-size: .88rem; }
    .ec-gallery__video [data-video-placeholder] { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .ec-gallery__visual img { transition: none; } .ec-gallery__visual:hover img { transform: none; } }
