/* Deprma Extra Tabs 1.8.0 — component-scoped, direction-aware, responsive. */
.woocommerce .deprma-tab-panel, .deprma-tab-panel, .woocommerce .deprma-tab-panel * { box-sizing: border-box; }
.woocommerce .deprma-tab-panel, .deprma-tab-panel { --deprma-accent: #0b7861; --deprma-line: #e2e9e7; --deprma-ink: #203431; --deprma-muted: #677c77; --deprma-heading:#203431; --deprma-card-bg:#fff; --deprma-gallery-bg:#f5f7f6; --deprma-preview-bg:#fff; --deprma-preview-text:#18614f; --deprma-download-bg:#0b7861; --deprma-download-text:#fff; --deprma-table-head-bg:#f1f7f5; --deprma-table-head-text:#27463f; width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 6px 0 15px; color: var(--deprma-ink); text-align: start; }
.woocommerce .woocommerce-tabs, .woocommerce .woocommerce-tabs .panel, .woocommerce .woocommerce-tabs .wc-tab, .woocommerce .woocommerce-tabs .entry-content { min-width: 0; max-width: 100%; }
.woocommerce .deprma-tab-panel img, .deprma-tab-panel img { max-width: 100%; }
.deprma-tab-empty { padding: 24px 18px; border: 1px dashed var(--deprma-line); background: #fafcfb; border-radius: 12px; color: var(--deprma-muted); text-align: center; }

/* Gallery */
.deprma-gallery { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 185px), 1fr)); gap: clamp(9px, 1.5vw, 17px); }
.deprma-gallery-item { position: relative; display: block; min-width: 0; overflow: hidden; border: 1px solid var(--deprma-line); border-radius: 12px; background: var(--deprma-gallery-bg); aspect-ratio: 4 / 3; box-shadow: 0 3px 12px rgba(19,44,38,.045); text-decoration: none !important; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.deprma-gallery-item img { display: block; width: 100%; height: 100% !important; max-width: 100%; object-fit: cover; transition: transform .25s ease; }
.deprma-gallery-item:hover, .deprma-gallery-item:focus-visible { border-color: var(--deprma-accent); box-shadow: 0 8px 24px rgba(19,44,38,.13); transform: translateY(-2px); outline-offset: 3px; }
.deprma-gallery-item:hover img, .deprma-gallery-item:focus-visible img { transform: scale(1.04); }
.deprma-gallery-zoom { position: absolute; inset-inline-end: 9px; inset-block-end: 9px; width: 31px; height: 31px; display: grid; place-items: center; font-size: 22px; line-height: 1; font-weight: 400; color: #1a3c32; background: rgba(255,255,255,.94); border-radius: 50%; box-shadow: 0 2px 9px rgba(0,0,0,.1); }

/* Mixed-format videos: 16:9 occupies a full row, 9:16 takes half a row. */
.deprma-videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 940px; margin-inline: auto; gap: clamp(12px, 2vw, 23px); min-width: 0; }
.deprma-video-card { display: block; width: 100%; min-width: 0; border: 1px solid var(--deprma-line); border-radius: 14px; padding: 5px; background: var(--deprma-card-bg); box-shadow: 0 4px 20px rgba(30,54,47,.07); overflow: hidden; }
.deprma-video-card--standard { grid-column: 1 / -1; max-width: 100%; }
.deprma-video-card--short { grid-column: span 1; max-width: 395px; justify-self: center; }
.deprma-video-frame { position: relative; display: block; width: 100%; min-width: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #151f20; }
.deprma-video-card--short .deprma-video-frame { aspect-ratio: 9 / 16; }
.deprma-video-frame iframe, .deprma-video-frame video { display: block; position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; border: 0; object-fit: contain; background: #111c1b; }
.deprma-video-link-fallback { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 13px; align-items: center; justify-content: center; text-align: center; padding: 15px; }
.deprma-video-link-fallback span { color: #d6e9e2; font-size: 38px; }
.deprma-video-link-fallback a { color: white !important; text-decoration: underline !important; overflow-wrap: anywhere; }

/* Specifications: large / fixed-width HTML tables must scroll INSIDE this viewport. */
.deprma-specifications-panel { overflow: hidden; }
.deprma-specifications-viewport { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto !important; overflow-y: auto !important; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #a8c4bc #eff4f2; border-radius: 8px; color: inherit; }
.deprma-specifications-viewport:focus-visible { outline: 2px solid var(--deprma-accent); outline-offset: -2px; }
.deprma-specifications-viewport table { width: max-content !important; max-width: none !important; min-width: 100%; margin: 0 0 15px; border-collapse: collapse; table-layout: auto; }
.deprma-specifications-viewport th, .deprma-specifications-viewport td { padding: 10px 12px; border: 1px solid var(--deprma-line); min-width: 85px; max-width: 420px; text-align: start; vertical-align: middle; overflow-wrap: break-word; box-sizing: border-box; }
.deprma-specifications-viewport th { background: var(--deprma-table-head-bg); font-weight: 700; color: var(--deprma-table-head-text); }
.deprma-specifications-viewport tr:nth-child(even) td { background: #fbfcfc; }
.deprma-specifications-viewport img, .deprma-specifications-viewport video { height: auto; max-width: 100%; }
.deprma-specifications-viewport pre, .deprma-specifications-viewport code { white-space: pre; }
.deprma-specifications-viewport pre { max-width: 100%; overflow: auto; }
.deprma-specifications-viewport iframe { max-width: 100%; }
.deprma-table-scroll-hint { margin: 7px 0 0; font-size: 12px; color: #57786e; text-align: start; }
.deprma-table-scroll-hint::before { content: '↔'; display: inline-block; margin-inline-end: 7px; }
.deprma-table-scroll-hint[hidden] { display: none !important; }

/* Catalog card */
.deprma-catalog-card { width: 100%; max-width: 780px; display: flex; align-items: center; gap: 16px; padding: clamp(14px, 2.3vw, 23px); border: 1px solid var(--deprma-line); background: var(--deprma-card-bg); border-radius: 14px; box-shadow: 0 4px 20px rgba(23,47,40,.04); }
.deprma-catalog-symbol { flex: 0 0 59px; width: 59px; height: 59px; display: grid; place-items: center; border-radius: 13px; background: var(--deprma-gallery-bg); color: var(--deprma-accent); }
.deprma-catalog-symbol svg { width: 30px; height: 30px; }
.deprma-catalog-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
.deprma-catalog-info strong { color: var(--deprma-heading); font-weight: 700; font-size: clamp(14px, 1.5vw, 17px); }
.deprma-catalog-info span { color: var(--deprma-muted); font-size: 12px; font-weight: 600; letter-spacing: .07em; }
.woocommerce .deprma-catalog-button, .deprma-catalog-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; background: #0b7861; color: #fff !important; padding: 11px 18px; border-radius: 9px; min-height: 42px; font-weight: 700; line-height: 1.3; text-decoration: none !important; text-align: center; border: 1px solid #0b7861; transition: background .2s ease; }
.deprma-catalog-button:hover, .deprma-catalog-button:focus-visible { background: var(--deprma-download-bg); color: var(--deprma-download-text) !important; filter: brightness(.9); }

/* Gallery viewer is appended to body, avoiding theme stacking contexts. */
body.deprma-lightbox-open { overflow: hidden; }
.deprma-lightbox { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 45px 57px; background: rgba(8,18,18,.94); color: #fff; direction: inherit; }
.deprma-lightbox[hidden], .deprma-lightbox button[hidden] { display: none !important; }
.deprma-lightbox-image { display: block; max-width: 100%; max-height: calc(100vh - 95px); max-height: calc(100dvh - 95px); width: auto; height: auto; object-fit: contain; border-radius: 5px; }
.deprma-lightbox button { position: absolute; width: 42px; height: 42px; background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.2); cursor: pointer; display: grid; place-items: center; border-radius: 50%; padding: 0; line-height: 1; }
.deprma-lightbox button:hover, .deprma-lightbox button:focus-visible { background: rgba(255,255,255,.3); outline: 2px solid #fff; outline-offset: 2px; }
.deprma-lightbox button span { font-size: 30px; line-height: 1; }
.deprma-lightbox-close { inset-block-start: 15px; inset-inline-end: 16px; }
.deprma-lightbox-prev { inset-inline-start: 11px; top: 50%; transform: translateY(-50%); }
.deprma-lightbox-next { inset-inline-end: 11px; top: 50%; transform: translateY(-50%); }
.deprma-lightbox-counter { position: absolute; inset-block-end: 17px; inset-inline-start: 50%; transform: translateX(-50%); font-size: 13px; font-variant-numeric: tabular-nums; color: #edf7f4; direction: ltr; }
[dir='rtl'] .deprma-lightbox-prev span, [dir='rtl'] .deprma-lightbox-next span { transform: scaleX(-1); }

@media (max-width: 767px) {
    .woocommerce .deprma-tab-panel, .deprma-tab-panel { padding-block: 5px 13px; }
    .woocommerce div.product .woocommerce-tabs > ul.tabs { max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; white-space: nowrap; }
    .woocommerce div.product .woocommerce-tabs > ul.tabs > li { white-space: nowrap; }
    .deprma-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .deprma-gallery-item { aspect-ratio: 1 / 1; border-radius: 9px; }
    .deprma-gallery-zoom { width: 27px; height: 27px; font-size: 20px; }
    .deprma-videos { gap: 9px; }
    .deprma-video-card { padding: 3px; border-radius: 10px; }
    .deprma-video-frame { border-radius: 7px; }
    .deprma-specifications-viewport { max-height: 68vh; max-height: 68dvh; }
    .deprma-specifications-viewport table th, .deprma-specifications-viewport table td { padding: 8px 10px; min-width: 90px; }
    .deprma-catalog-card { flex-wrap: wrap; gap: 12px; padding: 15px; }
    .deprma-catalog-symbol { flex-basis: 47px; width: 47px; height: 47px; }
    .deprma-catalog-button { width: 100%; }
    .deprma-lightbox { padding: 45px 39px; }
    .deprma-lightbox button { width: 32px; height: 32px; }
    .deprma-lightbox button span { font-size: 24px; }
    .deprma-lightbox-prev { inset-inline-start: 4px; }
    .deprma-lightbox-next { inset-inline-end: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .deprma-gallery-item, .deprma-gallery-item img { transition: none; }
}

/* 1.7: product-specific PDFs and shared PDFs in independent responsive groups. */
.deprma-catalog-section-heading { margin: 8px 0 14px; padding-block: 0 9px; border-block-end: 1px solid var(--deprma-line); color: var(--deprma-heading); font-size: clamp(15px, 2vw, 19px); font-weight: 700; text-align: start; }
.deprma-catalog-cards { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 12px; margin-block: 0 23px; }
.deprma-catalog-cards .deprma-catalog-card { max-width: 900px; }
.deprma-catalog-cards:last-child { margin-bottom: 0; }
.deprma-catalog-section-heading:not(:first-child) { margin-top: 22px; }
@media (max-width:767px) { .deprma-catalog-section-heading {margin-bottom: 12px;} .deprma-catalog-cards {gap: 10px;margin-bottom: 19px;} }

/* 1.7.1: separate preview and download actions; scoped to the catalog tab. */
.deprma-catalog-actions { display: flex; flex: 0 1 auto; gap: 9px; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; margin-inline-start: auto; }
.woocommerce .deprma-catalog-actions .deprma-catalog-button, .deprma-catalog-actions .deprma-catalog-button { gap: 7px; min-height: 42px; padding: 10px 13px; white-space: nowrap; font-size: 13px; }
.deprma-catalog-actions .deprma-catalog-button svg { width: 17px; height: 17px; flex: 0 0 17px; }
.woocommerce .deprma-catalog-actions .deprma-catalog-button--preview, .deprma-catalog-actions .deprma-catalog-button--preview { background: var(--deprma-preview-bg); border-color: var(--deprma-accent); color: var(--deprma-preview-text) !important; }
.woocommerce .deprma-catalog-actions .deprma-catalog-button--preview:hover, .woocommerce .deprma-catalog-actions .deprma-catalog-button--preview:focus-visible, .deprma-catalog-actions .deprma-catalog-button--preview:hover, .deprma-catalog-actions .deprma-catalog-button--preview:focus-visible { background: var(--deprma-preview-bg); border-color: var(--deprma-accent); color: var(--deprma-preview-text) !important; filter: brightness(.93); }
.woocommerce .deprma-catalog-actions .deprma-catalog-button--download, .deprma-catalog-actions .deprma-catalog-button--download { background: var(--deprma-download-bg); border-color: var(--deprma-download-bg); color: var(--deprma-download-text) !important; }
.woocommerce .deprma-catalog-actions .deprma-catalog-button--download:hover, .woocommerce .deprma-catalog-actions .deprma-catalog-button--download:focus-visible, .deprma-catalog-actions .deprma-catalog-button--download:hover, .deprma-catalog-actions .deprma-catalog-button--download:focus-visible { background: var(--deprma-download-bg); color: var(--deprma-download-text) !important; filter: brightness(.9); }
.deprma-catalog-actions .deprma-catalog-button:focus-visible { outline: 2px solid var(--deprma-accent); outline-offset: 3px; }
@media (max-width: 800px) {
    .deprma-catalog-card { flex-wrap: wrap; }
    .deprma-catalog-actions { flex-basis: 100%; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline-start: 0; }
    .woocommerce .deprma-catalog-actions .deprma-catalog-button, .deprma-catalog-actions .deprma-catalog-button { width: 100%; min-width: 0; padding-inline: 7px; white-space: normal; }
}
@media (max-width: 360px) {
    .woocommerce .deprma-catalog-actions .deprma-catalog-button, .deprma-catalog-actions .deprma-catalog-button { gap: 5px; font-size: 11.5px; }
    .deprma-catalog-actions .deprma-catalog-button svg { flex-basis: 15px; width: 15px; height: 15px; }
}

/* Optional groups are styled only within catalog tabs; no changes to WooCommerce theme UI. */
.deprma-catalog-group-heading{font-size:clamp(13px,1.8vw,16px);font-weight:700;color:var(--deprma-heading);border-inline-start:3px solid var(--deprma-accent);padding-inline-start:10px;margin:14px 0 12px;text-align:start;}

/* 1.8: all color settings apply to visitor-facing plugin elements only. */
.deprma-tab-empty{background:var(--deprma-empty-bg);}
.deprma-gallery-zoom{background:var(--deprma-gallery-zoom-bg);color:var(--deprma-gallery-zoom-text);}
.deprma-video-frame{background:var(--deprma-video-bg);}
.deprma-catalog-info strong{color:var(--deprma-catalog-title);}
.deprma-specifications-viewport tr td{background:var(--deprma-table-row-bg);}
.deprma-specifications-viewport tr:nth-child(even) td{background:var(--deprma-table-even-bg);}
.woocommerce .deprma-catalog-actions .deprma-catalog-button--preview:hover,.woocommerce .deprma-catalog-actions .deprma-catalog-button--preview:focus-visible,.deprma-catalog-actions .deprma-catalog-button--preview:hover,.deprma-catalog-actions .deprma-catalog-button--preview:focus-visible{background:var(--deprma-preview-hover-bg);color:var(--deprma-preview-hover-text)!important;filter:none;}
.woocommerce .deprma-catalog-actions .deprma-catalog-button--download:hover,.woocommerce .deprma-catalog-actions .deprma-catalog-button--download:focus-visible,.deprma-catalog-actions .deprma-catalog-button--download:hover,.deprma-catalog-actions .deprma-catalog-button--download:focus-visible{background:var(--deprma-download-hover-bg);color:var(--deprma-download-hover-text)!important;filter:none;}
.woocommerce .woocommerce-tabs ul.tabs li.specifications_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.gallery_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.videos_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.catalog_tab>a{color:var(--deprma-tab-text,#203431);}
.woocommerce .woocommerce-tabs ul.tabs li.active.specifications_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.active.gallery_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.active.videos_tab>a,.woocommerce .woocommerce-tabs ul.tabs li.active.catalog_tab>a{color:var(--deprma-tab-active-text,#0b7861);}
body .deprma-lightbox{background:var(--deprma-lightbox-bg,#081212);}
body .deprma-lightbox button{background:var(--deprma-lightbox-btn-bg,#303c3c);color:var(--deprma-lightbox-btn-text,#fff);}
