/* Datenblätter & ETA — karty techniczne. Styl 1:1 z katalogiem (.fwsm-card) i PDP (.dl/.ext).
   Tokeny: tokens.css (--paper, --signal, --r, --display, --mono, --maxw, --pad). */

/* ---- PEŁNA SZEROKOŚĆ — wyłamanie z kontenera Astry (standard jak template-about) ---- */
.page-template-template-datasheets .ast-single-entry-banner,
.page-template-template-datasheets .entry-header,
.page-template-template-datasheets .page-title { display: none !important; }
.page-template-template-datasheets #content .ast-container,
.page-template-template-datasheets #primary,
.page-template-template-datasheets #main,
.page-template-template-datasheets .site-content,
.page-template-template-datasheets .ast-container,
.page-template-template-datasheets .entry-content,
.page-template-template-datasheets .ast-article-single,
.page-template-template-datasheets article.page {
	max-width: 100% !important; width: 100% !important;
	margin: 0 !important; padding: 0 !important; border: 0 !important;
	display: block !important;
}
.page-template-template-datasheets #content { overflow-x: clip; }

.fws-datasheets .fws-wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---- HERO ---- */
.fws-datasheets .ds-hero { padding: clamp(40px, 6vw, 80px) 0 24px; }
.fws-datasheets .ds-eyebrow {
	font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em;
	text-transform: uppercase; color: var(--signal);
}
.fws-datasheets .ds-hero h1 {
	font-family: var(--display); font-weight: 800; letter-spacing: -.015em; line-height: 1.05;
	font-size: clamp(28px, 4vw, 44px); color: var(--ink); margin: 8px 0 12px;
}
.fws-datasheets .ds-lead { font-family: var(--body); color: var(--c-body); max-width: 64ch; margin: 0; }

/* ---- PASEK SKOKÓW (gdy >1 kategoria) ---- */
.fws-datasheets .ds-jump {
	position: sticky; top: 0; z-index: 5;
	background: var(--paper); border-block: 1px solid var(--c-border);
}
.fws-datasheets .ds-jump .fws-wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block: 12px; }
.fws-datasheets .ds-jump a {
	font-family: var(--mono); font-size: 12px; letter-spacing: .03em; text-decoration: none;
	color: var(--c-muted);
}
.fws-datasheets .ds-jump a:hover { color: var(--signal); }

/* ---- TOOLBAR (szukaj + filtr typu + licznik) ---- */
.fws-datasheets .ds-toolbar {
	position: sticky; top: 0; z-index: 6;
	background: var(--paper); border-block: 1px solid var(--c-border);
}
.fws-datasheets .ds-toolbar-grid {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-block: 14px;
}
.fws-datasheets .ds-search-wrap { position: relative; flex: 1 1 280px; min-width: 220px; }
.fws-datasheets .ds-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.fws-datasheets .ds-search {
	width: 100%; font-family: var(--body); font-size: 14px; color: var(--ink);
	padding: 11px 14px 11px 40px; background: #fff;
	border: 1px solid var(--c-border); border-radius: var(--r); outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.fws-datasheets .ds-search:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(226,84,28,.14); outline: 2px solid transparent; outline-offset: 2px; }
.fws-datasheets .ds-search::-webkit-search-cancel-button { cursor: pointer; }

.fws-datasheets .ds-doctypes { display: flex; flex-wrap: wrap; gap: 6px; }
.fws-datasheets .ds-doc-filter {
	font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--c-body);
	background: #fff; border: 1px solid var(--c-border); border-radius: 999px; padding: 7px 13px;
	transition: background .15s, border-color .15s, color .15s;
}
.fws-datasheets .ds-doc-filter:hover { border-color: var(--steel-line); }
.fws-datasheets .ds-doc-filter.is-active { background: var(--signal); border-color: var(--signal); color: #fff; }

.fws-datasheets .ds-clear {
	font-family: var(--body); font-size: 12px; color: var(--c-muted);
	background: none; border: none; padding: 6px 4px; cursor: pointer; text-decoration: underline;
	text-underline-offset: 2px; transition: color .15s;
}
.fws-datasheets .ds-clear:hover { color: var(--signal); }
.fws-datasheets .ds-clear[hidden] { display: none; }

.fws-datasheets .ds-sort-wrap { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.fws-datasheets .ds-sort-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.fws-datasheets .ds-sort {
	font-family: var(--body); font-size: 13px; color: var(--ink);
	padding: 8px 30px 8px 12px; background: #fff;
	border: 1px solid var(--c-border); border-radius: var(--r); cursor: pointer; outline: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%237A7E83' stroke-width='2.5' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center;
	-webkit-appearance: none; appearance: none;
}
.fws-datasheets .ds-sort:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(226,84,28,.14); outline: 2px solid transparent; outline-offset: 2px; }

/* widoczny fokus klawiatury na linkach (kafelka, nazwa, pobieranie) — Astra czasem gasi outline */
.fws-datasheets .ds-thumb:focus-visible,
.fws-datasheets .ds-name a:focus-visible,
.fws-datasheets .dl:focus-visible,
.fws-datasheets .ds-doc-filter:focus-visible,
.fws-datasheets .ds-clear:focus-visible {
	outline: 2px solid var(--signal); outline-offset: 2px; border-radius: var(--r);
}

.fws-datasheets .ds-count { font-family: var(--mono); font-size: 12px; color: var(--c-muted); white-space: nowrap; }

.fws-datasheets .ds-card[hidden],
.fws-datasheets .ds-section[hidden] { display: none !important; }
.fws-datasheets .ds-noresults { font-family: var(--body); color: var(--c-muted); padding: 32px 0; text-align: center; }

@media (max-width: 600px) {
	.fws-datasheets .ds-count { margin-left: 0; }
	.fws-datasheets .ds-doctypes { width: 100%; }
}

/* ---- BODY ---- */
.fws-datasheets .ds-body { padding: 24px 0 64px; }
.fws-datasheets .ds-cat {
	font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2vw, 22px);
	color: var(--ink); margin: 32px 0 16px; scroll-margin-top: 64px;
}
.fws-datasheets .ds-cat:first-child { margin-top: 0; }
.fws-datasheets .ds-empty { font-family: var(--body); color: var(--c-muted); padding: 24px 0; }

/* ---- SIATKA + KARTY (jak .fwsm-card) ---- */
.fws-datasheets .ds-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.fws-datasheets .ds-card {
	display: flex; flex-direction: column;
	background: var(--paper); border: 1px solid var(--c-border); border-radius: var(--r); overflow: hidden;
	transition: transform .16s, box-shadow .16s, border-color .16s;
}
.fws-datasheets .ds-card:hover {
	transform: translateY(-4px); box-shadow: 0 14px 30px -18px rgba(20, 22, 26, .45);
	border-color: var(--steel-line);
}
.fws-datasheets .ds-thumb {
	display: flex; align-items: center; justify-content: center;
	background: #fff; padding: 16px; border-bottom: 1px solid #efeae1;
}
.fws-datasheets .ds-thumb-img { width: 100%; height: 185px; object-fit: contain; display: block; margin: 0 auto; }
.fws-datasheets .ds-thumb-ph {
	width: 100%; height: 185px; border-radius: 2px;
	background: repeating-linear-gradient(45deg, #f4f1ea, #f4f1ea 10px, #ece8df 10px, #ece8df 20px);
}
.fws-datasheets .ds-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.fws-datasheets .ds-name {
	font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -.01em; line-height: 1.22;
	margin: 0 0 10px;
}
.fws-datasheets .ds-name a { color: var(--ink) !important; text-decoration: none; }
.fws-datasheets .ds-name a:hover { color: var(--signal) !important; }

/* chipy — jak .fwsm-card-chips .chip */
.fws-datasheets .ds-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.fws-datasheets .ds-chips .chip {
	font-family: var(--mono); font-size: 11px; color: #3b3e43;
	background: #efeae1; border: 1px solid #e0dacf; border-radius: 3px; padding: 3px 7px;
}

/* pobierania — jak PDP .dl/.ext */
.fws-datasheets .ds-files { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 8px; }
.fws-datasheets .dl {
	display: flex; align-items: center; gap: 12px;
	border: 1px solid var(--c-border); border-radius: var(--r); padding: 11px 13px;
	background: var(--paper); text-decoration: none; transition: border-color .15s, background .15s;
}
.fws-datasheets .dl:hover { border-color: var(--steel-line); background: #fff; }
.fws-datasheets .dl-label {
	flex: 1; font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--ink);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fws-datasheets .dl .ext {
	font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .04em;
	background: var(--graphite); color: #fff; padding: 4px 7px; border-radius: 3px; flex-shrink: 0;
}

/* TELEFON: 1 kolumna, karta pozioma (miniatura z lewej, treść+przyciski z prawej) —
   2 kolumny ucinały nazwy i przyciski PDF (karta węższa niż przycisk). */
@media (max-width: 600px) {
	.fws-datasheets .ds-grid { grid-template-columns: 1fr; gap: 12px; }
	.fws-datasheets .ds-card { flex-direction: row; align-items: stretch; }
	.fws-datasheets .ds-thumb {
		width: 104px; flex: none; padding: 12px;
		border-bottom: none; border-right: 1px solid #efeae1;
	}
	.fws-datasheets .ds-thumb-img, .fws-datasheets .ds-thumb-ph { width: 100%; height: auto; max-height: 130px; }
	.fws-datasheets .ds-card-body { min-width: 0; padding: 12px 14px; } /* min-width:0 → tekst się przycina, nie rozpycha */
	.fws-datasheets .ds-name { font-size: 15px; }
	.fws-datasheets .ds-files .dl { padding: 9px 11px; }
}
