/*
 * deals_docs — «Каталоги та інструкції» на вітрині: плитки документів, сторінка документа, блок «Каталоги бренду»,
 * вкладка «Документи» в товарі у режимі «Список». 1.11.0 (#D107): плиток у рядку на ПК — 4 / 3 / 2.
 * Кольори й рамки — змінні теми oct_deals (є і в темній темі). Версія в імені файла: nginx віддає статику з expires max.
 */
.dd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.dd-tile { display: flex; flex-direction: column; padding: .75rem; min-width: 0; }
.dd-tile-image {
	position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; overflow: hidden;
	border: var(--ds-main-border, 1px solid #e5e7eb); border-radius: 6px; background: #fff;
}
.dd-tile-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.dd-tile-image:hover img { transform: scale(1.03); }
.dd-lang {
	position: absolute; top: .5rem; right: .5rem; padding: .125rem .375rem; border-radius: 4px; font-size: .6875rem; font-weight: 700;
	line-height: 1.2; letter-spacing: .02em; color: #fff; background: var(--ds-primary-color, #00a7e1);
}
.dd-pdf {
	display: flex; align-items: center; justify-content: center; width: 46%; aspect-ratio: 3 / 4; border: 2px solid #d9534f; border-radius: 4px;
	color: #d9534f; font-weight: 700; font-size: 1.125rem; background: #fff; position: relative;
}
.dd-pdf::before { content: ''; position: absolute; top: -2px; right: -2px; width: 28%; aspect-ratio: 1; background: linear-gradient(225deg, var(--ds-white-color, #fff) 50%, #d9534f 50%); }
.dd-pdf-sm { width: 100%; font-size: .625rem; border-width: 1px; }
.dd-pdf-lg { width: 40%; font-size: 2rem; }
.dd-tile-body { display: flex; flex-direction: column; flex: 1 1 auto; gap: .375rem; padding-top: .625rem; }
.dd-tile-name {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .875rem; line-height: 1.3;
	overflow-wrap: anywhere;
}
.dd-tile-name:hover { color: var(--ds-links-color, #1e7fd0); }
.dd-tile-meta { display: flex; flex-wrap: wrap; gap: .125rem .625rem; }
.dd-tile-buttons { display: flex; flex-direction: column; gap: .375rem; margin-top: auto; padding-top: .25rem; }
.dd-tile-buttons .button { justify-content: center; min-height: 2.25rem; padding: .375rem .5rem; white-space: nowrap; }
.dd-tiles-product { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ds-product-tab-content-text .dd-tiles { font-weight: 400; }
/* У вкладці товару тема підкреслює й фарбує всі посилання тексту вкладки — плитки виглядають як у розділі. */
.ds-product-tab-content-text .dd-tiles a { text-decoration: none; }
.ds-product-tab-content-text .dd-tiles .dd-tile-name { color: var(--ds-dark-text-color, #1f2937); }
.ds-product-tab-content-text .dd-tiles .dd-tile-name:hover { color: var(--ds-links-color, #1e7fd0); }
.ds-product-tab-content-text .dd-tiles .button-primary { color: var(--ds-white-color, #fff); }
.ds-product-tab-content-text .dd-tiles .button-outline-primary { color: var(--ds-primary-color); }

.dd-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem; }
.dd-search { display: flex; flex: 1 1 320px; gap: .5rem; max-width: 560px; }
.dd-search .form-control { flex: 1 1 auto; min-width: 0; }
.dd-sort { display: flex; align-items: center; gap: .5rem; }
.dd-sort .form-select { width: auto; }
.dd-results { font-size: .875rem; }
.dd-empty { padding: 1.5rem; text-align: center; }
.dd-description { padding: 1rem; font-size: .875rem; }
.dd-document-text { padding: 1rem; font-size: .875rem; }
.dd-description-text { overflow-wrap: anywhere; }
.dd-description-text > :last-child { margin-bottom: 0; }
.dd-description-text img { max-width: 100%; height: auto; }
.dd-description-text iframe { max-width: 100%; }
.dd-description-text table { display: block; max-width: 100%; overflow-x: auto; }
.dd-fold-input { position: absolute; opacity: 0; pointer-events: none; }
.dd-fold .dd-description-text { position: relative; max-height: 10.5em; overflow: hidden; }
.dd-fold .dd-description-text::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.dd-fold-input:checked ~ .dd-description-text { max-height: none; }
.dd-fold-input:checked ~ .dd-description-text::after { display: none; }
.dd-fold-toggle { display: inline-block; cursor: pointer; margin-bottom: 0; }
.dd-fold-less, .dd-fold-input:checked ~ .dd-fold-toggle .dd-fold-more { display: none; }
.dd-fold-input:checked ~ .dd-fold-toggle .dd-fold-less { display: inline; }
.dd-fold-input:focus-visible ~ .dd-fold-toggle { outline: 2px solid currentColor; outline-offset: 2px; }

.dd-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.dd-section { display: grid; grid-template-columns: 2.5rem 1fr; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; padding: .875rem; }
.dd-section:hover .dd-section-name { color: var(--ds-links-color, #1e7fd0); }
.dd-section-icon {
	grid-row: 1 / 3; width: 2.5rem; height: 2rem; border-radius: 4px; position: relative;
	background: linear-gradient(var(--ds-primary-color, #00a7e1), var(--ds-primary-color, #00a7e1)) 0 0 / 45% 30% no-repeat, color-mix(in srgb, var(--ds-primary-color, #00a7e1) 70%, #fff);
}
.dd-section-name { font-size: .9375rem; line-height: 1.25; overflow-wrap: anywhere; }

.dd-document { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 1.5rem; padding: 1.25rem; }
.dd-document-image a { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border: var(--ds-main-border, 1px solid #e5e7eb); border-radius: 8px; overflow: hidden; background: #fff; }
.dd-document-image img { width: 100%; height: 100%; object-fit: contain; }
.dd-specs { width: 100%; max-width: 520px; margin-bottom: 1rem; border-collapse: collapse; }
.dd-specs th, .dd-specs td { padding: .5rem .25rem; border-bottom: var(--ds-main-border, 1px solid #e5e7eb); vertical-align: top; text-align: left; }
.dd-specs th { width: 40%; font-weight: 500; color: var(--ds-secondary-text-color, #6b7280); }
.dd-document-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.dd-document-buttons .button { min-width: 10rem; justify-content: center; }
.dd-hint { margin: .75rem 0 0; }

.dd-products { padding: 1.25rem; }
.dd-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.dd-product { display: flex; flex-direction: column; gap: .25rem; padding: .5rem; border: var(--ds-main-border, 1px solid #e5e7eb); border-radius: 6px; min-width: 0; }
.dd-product img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 4px; }
.dd-product-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; overflow-wrap: anywhere; }
.dd-product:hover .dd-product-name { color: var(--ds-links-color, #1e7fd0); }

.dd-tree .current { color: var(--ds-links-color, #1e7fd0); }

/* Блок «Каталоги бренду» — під «Категоріями бренду» в лівій колонці. */
.dd-brand-docs { gap: .25rem; margin-top: .75rem; }
.dd-brand-list { display: flex; flex-direction: column; gap: .25rem; }
.dd-brand-list li { padding: .5rem .75rem; }
.dd-brand-item { display: flex; align-items: center; gap: .625rem; }
.dd-brand-thumb { flex: 0 0 2.25rem; display: flex; align-items: center; justify-content: center; height: 3rem; overflow: hidden; border-radius: 3px; background: #fff; border: var(--ds-main-border, 1px solid #e5e7eb); }
.dd-brand-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dd-brand-text { display: flex; flex-direction: column; min-width: 0; }
.dd-brand-name { font-size: .8125rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dd-brand-item:hover .dd-brand-name { color: var(--ds-links-color, #1e7fd0); }
.dd-brand-meta { font-size: .6875rem; }
.dd-brand-more { padding: .5rem .75rem; }

/* Вкладка «Документи» в товарі, режим «Список»: назва (відкривається в новій вкладці), іконка завантаження, мова й розмір дрібно. */
.dd-rows { display: flex; flex-direction: column; }
.dd-row { display: flex; flex-wrap: wrap; align-items: center; gap: .125rem .625rem; padding: .5rem 0; border-bottom: var(--ds-main-border, 1px solid #e5e7eb); }
.dd-row:last-child { border-bottom: 0; }
.dd-row-name { flex: 0 1 auto; min-width: 0; font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.dd-row-name:hover { color: var(--ds-links-color, #1e7fd0); }
.dd-row-download { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 6px; color: var(--ds-primary-color, #00a7e1); }
.dd-row-download:hover { background: color-mix(in srgb, var(--ds-primary-color, #00a7e1) 12%, transparent); }
.dd-row-meta { flex: 1 1 auto; text-align: right; white-space: nowrap; }
.ds-product-tab-content-text .dd-rows a { text-decoration: none; }
.ds-product-tab-content-text .dd-rows .dd-row-name { color: var(--ds-dark-text-color, #1f2937); }
.ds-product-tab-content-text .dd-rows .dd-row-name:hover { color: var(--ds-links-color, #1e7fd0); }
.ds-product-tab-content-text .dd-rows .dd-row-download { color: var(--ds-primary-color, #00a7e1); }
@media (max-width: 575.98px) {
	.dd-row-meta { flex-basis: 100%; text-align: left; white-space: normal; }
}

@media (max-width: 767.98px) {
	.dd-document { grid-template-columns: 1fr; padding: 1rem; }
	.dd-document-image a { max-width: 320px; margin: 0 auto; }
	.dd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
	.dd-tile { padding: .5rem; }
	.dd-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1.10.0 (#D79): власна іконка розділу — у тій самій коробці, що й папка (2.5 × 2 rem); картка не змінюється.
   Сторінка з логотипами брендів: колонка іконки 4 × 2.25 rem (16:9, як мініатюри логотипів) у всіх карток, папка — по центру колонки. */
.dd-section-icon--img { background: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dd-section-icon--img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dd-sections--logos .dd-section { grid-template-columns: 4rem 1fr; }
.dd-sections--logos .dd-section-icon { justify-self: center; }
.dd-section-icon--logo { width: 4rem; height: 2.25rem; border-radius: 0; }

/* 1.11.0 (#D107): плиток у рядку на ПК (≥ 1200 px — брейкпоінт теми) — налаштування «Плиток у рядку (ПК)»: 3 або 2; 4 — сітка як була
   (auto-fill). Планшет і телефон — без змін. Мініатюра — srcset із чіткою копією 1200 px. */
@media (min-width: 1200px) {
	.dd-tiles.dd-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
	.dd-tiles.dd-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
	.dd-tiles.dd-cols-3 .dd-tile-name, .dd-tiles.dd-cols-2 .dd-tile-name { font-size: .9375rem; }
}

/* 1.11.1 (#D107): плиток розділів у рядку на ПК — налаштування «Плиток у рядку (ПК) — розділи «Бібліотеки»»: 3 або 2 (4 — auto-fill, як було). */
@media (min-width: 1200px) {
	.dd-sections.dd-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dd-sections.dd-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1.12.0 (#D112): плитка розділу — зображення пропорційно ширині плитки. Сітка (кількість колонок) — без змін.
   ≥ 576 px (кілька колонок): вертикальна плитка — зображення зверху по центру, під ним назва й кількість; логотип бренду — 56 % ширини плитки
   (коробка 16:9), значок теки й власна іконка — 34 % (5:4); на сторінці з логотипами тека — 30 % (5:4) з полями до висоти коробки логотипа.
   < 576 px (одна колонка): горизонтально — зображення 38 % (логотип) / 26 % (тека) ширини плитки, назва й кількість праворуч.
   Зображення не ширше за натуральну ширину оригіналу (max-width у розмітці), без розтягування; розмір коробки задано відсотком і aspect-ratio
   (width / height у <img>) — без зсуву макета. Відступи плитки й між плитками — менші. */
.dd-sections { gap: .625rem; }
.dd-section { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .375rem; text-align: center; padding: .75rem .75rem .875rem; min-height: 0; }
.dd-section-icon { grid-row: auto; flex: none; width: 34%; height: auto; aspect-ratio: 5 / 4; margin-bottom: .25rem; }
.dd-section-icon--img { border-radius: 0; }
.dd-section-icon--img img { width: 100%; height: 100%; object-fit: contain; }
.dd-sections--logos .dd-section-icon { width: 30%; margin: 3.75% 0 calc(3.75% + .25rem); }   /* тека серед логотипів: висота 24 % + поля = висота коробки логотипа (31,5 %) */
.dd-sections--logos .dd-section-icon--logo { margin: 0 0 .25rem; }
.dd-sections--logos .dd-section-icon--logo { width: 56%; aspect-ratio: 16 / 9; height: auto; }
.dd-section-name { font-size: 1rem; line-height: 1.25; }
.dd-section-count { font-size: .8125rem; }
@media (min-width: 1200px) {
	.dd-sections.dd-cols-2 { gap: .875rem; }
	.dd-sections.dd-cols-2 .dd-section { padding: 1rem 1rem 1.125rem; }
	.dd-sections.dd-cols-2 .dd-section-name { font-size: 1.125rem; }
	.dd-sections.dd-cols-2 .dd-section-count { font-size: .875rem; }
}
@media (max-width: 575.98px) {
	.dd-section { display: grid; grid-template-columns: 26% 1fr; grid-template-rows: auto auto; column-gap: .75rem; row-gap: .125rem; align-items: center; text-align: left; padding: .625rem .75rem; }
	.dd-section-icon { grid-row: 1 / 3; width: 100%; margin: 0; }
	.dd-sections--logos .dd-section { grid-template-columns: 38% 1fr; }
	.dd-sections--logos .dd-section-icon { width: 68.4%; margin: 0; justify-self: center; }
	.dd-sections--logos .dd-section-icon--logo { width: 100%; }
	.dd-section-name, .dd-section-count { align-self: end; }
	.dd-section-count { align-self: start; }
}

/* 1.13.0 (#D115): картки розділів «Бібліотеки» (макет програміста, розділ «Оснащення»): квадратна картка — зверху зображення плитки 4:3
   на всю ширину (біле поле, без обрізання; довга назва — картка трохи вища, текст не обрізається; немає — власна іконка або значок теки на білому), знизу червона смуга (фірмовий червоний теми,
   --ds-primary-color) з назвою (жирний, великі літери, по центру) і «N документів» дрібніше. Текст — HTML (великі літери — CSS).
   Сітка: ПК (≥ 1200 px) — налаштування «Плиток у рядку (ПК) — розділи» (4 / 3 / 2), 992–1199 px — 3, 576–991 px — 2, телефон — 1.
   Квадрат: зображення 4:3 (75 % ширини заввишки) + смуга не нижча за 25 % ширини (25cqi); довга назва — смуга вища, картки рядка — однакової
   висоти (сітка розтягує). Розміри — aspect-ratio і width / height у <img>: без зсуву макета. Наведення — підняття й тінь, фокус з клавіатури — рамка. */
.dd-sections.dd-sections--cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 576px) { .dd-sections.dd-sections--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .dd-sections.dd-sections--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 1200px) {
	.dd-sections.dd-sections--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.dd-sections.dd-sections--cards.dd-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
	.dd-sections.dd-sections--cards.dd-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
.dd-card {
	display: flex; flex-direction: column; min-width: 0; container-type: inline-size;
	background: #fff; border: var(--ds-main-border, 1px solid #e5e7eb); border-radius: 8px;
	color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease;
}
.dd-card:hover, .dd-card:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(17, 24, 39, .14); text-decoration: none; }
.dd-card:focus-visible { outline: 3px solid var(--ds-links-color, #cc3f43); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .dd-card { transition: box-shadow .2s ease; } .dd-card:hover, .dd-card:focus-visible { transform: none; } }
.dd-card-media { flex: none; position: relative; aspect-ratio: 4 / 3; background: #fff; border-radius: 7px 7px 0 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dd-card-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.dd-card-icon { width: 46%; aspect-ratio: 5 / 4; display: flex; align-items: center; justify-content: center; }
.dd-card-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dd-card-media .dd-card-folder { grid-row: auto; width: 34%; height: auto; aspect-ratio: 5 / 4; margin: 0; }
.dd-card-band {
	flex: 1 0 auto; min-height: 25cqi; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25em;
	padding: .75rem 1rem; border-radius: 0 0 7px 7px; background: var(--ds-primary-color, #cc3f43); color: #fff; text-align: center;
}
.dd-card-name { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; font-size: 1.0625rem; font-size: clamp(.875rem, 5.6cqi, 1.375rem); overflow-wrap: break-word; hyphens: auto; }
.dd-card-count { text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; font-size: .75rem; font-size: clamp(.6875rem, 3.6cqi, .875rem); opacity: .92; }
