/**
 * Werfftocs — HP "Produkt detail" stylesheet
 *
 * Loaded only on single produkty CPT in HP scope (see functions.php
 * → werfftocs_hp_assets). Builds on hp.css design tokens — every rule
 * is scoped under .hp-section so nothing leaks outside the HP section.
 *
 * Namespace: .hp-product-* (avoids colliding with .hp-card / .hp-blog-*
 * / .hp-contact-* / .hp-kategorie-*).
 */


/* ===================================================================
   PAGE WRAPPER — same width / centering pattern as .hp-home / .hp-kategorie
   =================================================================== */
.hp-section .hp-product {
	max-width: 1340px;
	margin: 0 auto;
	padding: 0 2rem 4rem;
	background: transparent;
}
.hp-section .hp-product .container {
	background: transparent !important;
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}


/* ===================================================================
   HEADER — big red title + orange subtitle
   =================================================================== */
.hp-section .hp-product-header {
	max-width: 1100px;
	margin: 3rem auto 2.5rem;
}
.hp-section .hp-product-header__title {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	font-size: clamp(2.2rem, 4vw, 3rem);
	color: var(--hp-red);
	margin: 0 0 0.5rem;
	line-height: 1.1;
}
.hp-section .hp-product-header__subtitle {
	font-size: clamp(1.15rem, 1.6vw, 1.5rem);
	color: var(--hp-orange);
	margin: 0;
	line-height: 1.3;
}


/* ===================================================================
   BODY — 2-col grid (info left, sidebar right)
   =================================================================== */
.hp-section .hp-product-body {
	margin-bottom: 3rem;
}
.hp-section .hp-product-body__grid {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 4rem;
	max-width: 1100px;
	margin: 0 auto;
}


/* ----- LEFT — info sections ----- */
.hp-section .hp-product-section-title {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	font-size: 1.3rem;
	color: var(--hp-red);
	margin: 2rem 0 0.85rem;
	line-height: 1.2;
}
.hp-section .hp-product-section-title:first-child {
	margin-top: 0;
}
.hp-section .hp-product-section-body {
	font-size: 1rem;
	line-height: 1.65;
	color: var(--hp-text);
	margin-bottom: 1.5rem;
}
.hp-section .hp-product-section-body p {
	margin: 0 0 0.85rem;
}
.hp-section .hp-product-section-body p:last-child {
	margin-bottom: 0;
}
.hp-section .hp-product-section-body strong,
.hp-section .hp-product-section-body b {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	color: var(--hp-text);
}
.hp-section .hp-product-section-body ul,
.hp-section .hp-product-section-body ol {
	margin: 0.5rem 0 1rem;
	padding-left: 1.5rem;
}
.hp-section .hp-product-section-body li {
	margin-bottom: 0.4rem;
	line-height: 1.6;
}
.hp-section .hp-product-section-body li ul,
.hp-section .hp-product-section-body li ol {
	margin-top: 0.4rem;
	margin-bottom: 0.4rem;
}
.hp-section .hp-product-section-body h3,
.hp-section .hp-product-section-body h4 {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	font-size: 1.05rem;
	color: var(--hp-text);
	margin: 1.25rem 0 0.5rem;
}

/* Tabulka (např. "Balení" — Reference / Velikost / Počet ks / Dostupnost) */
.hp-section .hp-product-section-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.5rem 0;
	background: transparent !important;
	border: 0;
}
.hp-section .hp-product-section-body table th,
.hp-section .hp-product-section-body table td {
	padding: 0.6rem 1rem 0.6rem 0;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-bottom: 1px solid #E5E5E5;
	font-size: 0.95rem;
	line-height: 1.4;
}
.hp-section .hp-product-section-body table th {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	color: var(--hp-text);
}

/* Zpět na všechny produkty */
.hp-section .hp-product-back {
	margin-top: 3rem;
	padding-top: 1.5rem;
}
.hp-section .hp-product-back a {
	color: var(--hp-red);
	text-decoration: none;
	font-size: 0.95rem;
}
.hp-section .hp-product-back a:hover,
.hp-section .hp-product-back a:focus {
	color: var(--hp-red-dark);
	text-decoration: underline;
}


/* ----- RIGHT sidebar — photo + downloads ----- */
.hp-section .hp-product-body__sidebar {
	align-self: start;
}
.hp-section .hp-product-photo {
	background: #FFFFFF;
	padding: 1.5rem;
	margin-bottom: 1rem;
}
.hp-section .hp-product-photo img {
	width: 100%;
	height: auto;
	display: block;
}

.hp-section .hp-product-downloads {
	background: #ECECEC;
	padding: 1.5rem 1.75rem;
}
.hp-section .hp-product-downloads__title {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-weight: normal;
	font-size: 1.05rem;
	color: var(--hp-text);
	margin: 0 0 1rem;
}
.hp-section .hp-product-downloads__list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.hp-section .hp-product-downloads__list li {
	margin-bottom: 0.45rem;
	font-size: 0.85rem;
	line-height: 1.4;
}
.hp-section .hp-product-downloads__list a {
	color: var(--hp-text);
	text-decoration: none;
	word-break: break-all;
	display: inline-block;
}
.hp-section .hp-product-downloads__list a:hover,
.hp-section .hp-product-downloads__list a:focus {
	color: var(--hp-red);
	text-decoration: underline;
}


/* ===================================================================
   RESPONSIVE — collapse to single column on tablet/mobile
   =================================================================== */
@media (max-width: 900px) {
	.hp-section .hp-product {
		padding: 0 1rem 3rem;
	}
	.hp-section .hp-product-header {
		margin: 2rem auto 2rem;
	}
	.hp-section .hp-product-body__grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.hp-section .hp-product-body__sidebar {
		}
	.hp-section .hp-product-photo {
		padding: 1rem;
	}
}


/* ===================================================================
   ROUND 8 (2026-04-28) — produkt detail
   - Section titles light+red+bigger
   - h3/h4 v body taky red+light
   - strong v body víc bold
   - File icons (image vs video) v downloads list
   - Photo flush (no margin/padding) + matching width sidebar
   - Bullets aligned outside-top (above optical center)
   - Mobile: info first, sidebar second
   - Table "Balení" responsive na mobile
   =================================================================== */

/* Section titles — light + bigger */
.hp-section .hp-product-section-title {
	font-family: 'work_sans_lightregular', 'work_sansregular', sans-serif !important;
	font-weight: normal !important;
	font-size: 1.55rem;
	margin: 2.25rem 0 0.85rem;
}

/* H3/H4 v body (např. "Čištění" subheading) — red + light */
.hp-section .hp-product-section-body h3,
.hp-section .hp-product-section-body h4 {
	font-family: 'work_sans_lightregular', 'work_sansregular', sans-serif !important;
	font-weight: normal !important;
	color: var(--hp-red) !important;
	font-size: 1.2rem !important;
	margin: 1.5rem 0 0.6rem !important;
}

/* Strong v body — víc bold (fake heavier via font-weight 900 on top of medium) */
.hp-section .hp-product-section-body strong,
.hp-section .hp-product-section-body b {
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif !important;
	font-weight: 900 !important;
	color: var(--hp-text);
}

/* Bullets — list-style outside, top-aligned (above optical center) */
.hp-section .hp-product-section-body ul {
	list-style: none;
	padding-left: 0;
	margin: 0.5rem 0 1rem;
}
.hp-section .hp-product-section-body ul li {
	position: relative;
	padding-left: 1.4rem;
	margin-bottom: 0.5rem;
	line-height: 1.6;
}
.hp-section .hp-product-section-body ul li::before {
	content: '';
	position: absolute;
	left: 0.25rem;
	top: 0.55em;       /* nad optickým středem */
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #1A1A1A;
}
/* Nested ul (sub-bullets) — open circle */
.hp-section .hp-product-section-body ul ul li::before {
	background: transparent;
	border: 1.5px solid #1A1A1A;
}
/* Ordered list — keep numbers, just align top */
.hp-section .hp-product-section-body ol {
	list-style-position: outside;
	padding-left: 1.5rem;
}
.hp-section .hp-product-section-body ol li::marker {
	font-weight: normal;
}

/* PHOTO — flush (no padding, no margin-bottom) */
.hp-section .hp-product-photo {
	padding: 0;
	margin-bottom: 0;
	background: transparent;
}
.hp-section .hp-product-photo img {
	width: 100%;
	height: auto;
	display: block;
}

/* DOWNLOADS — title light+red+bigger */
.hp-section .hp-product-downloads {
	margin-top: 0;       /* rovnou pod foto, žádná mezera */
}
.hp-section .hp-product-downloads__title {
	font-family: 'work_sans_lightregular', 'work_sansregular', sans-serif !important;
	font-weight: normal !important;
	color: var(--hp-red) !important;
	font-size: 1.3rem !important;
}

/* DOWNLOADS list items — file icons via CSS class on li */
.hp-section .hp-product-downloads__list li {
	position: relative;
	padding-left: 1.6rem;
	margin-bottom: 0.55rem;
	line-height: 1.4;
}
.hp-section .hp-product-downloads__list li::before {
	content: '📄';
	position: absolute;
	left: 0;
	top: 0;
	font-size: 0.9rem;
	line-height: 1.4;
}
.hp-section .hp-product-downloads__list li.is-image::before { content: '🖼️'; }
.hp-section .hp-product-downloads__list li.is-video::before { content: '🎬'; }
.hp-section .hp-product-downloads__list li.is-pdf::before   { content: '📄'; }
.hp-section .hp-product-downloads__list li.is-doc::before   { content: '📝'; }
.hp-section .hp-product-downloads__list li.is-archive::before { content: '📦'; }

/* "Stáhnout vše najednou" button */
.hp-section .hp-product-downloads__all {
	margin-top: 1.25rem;
	padding: 0.5rem 1rem;
	background: var(--hp-red);
	color: #FFFFFF;
	border: 0;
	font-family: 'work_sans_mediumregular', 'work_sansregular', sans-serif;
	font-size: 0.85rem;
	cursor: pointer;
	display: inline-block;
	text-decoration: none;
	transition: background 0.2s;
}
.hp-section .hp-product-downloads__all:hover,
.hp-section .hp-product-downloads__all:focus {
	background: var(--hp-red-dark);
	color: #FFFFFF;
	text-decoration: none;
}

/* TABLE responsive na mobile — horizontal scroll wrap (lepší UX než stack
   protože tabulka v ACF wysiwyg nemá data-label atributy) */
@media (max-width: 700px) {
	.hp-section .hp-product-section-body {
		/* container scrollable */
	}
	.hp-section .hp-product-section-body table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
		max-width: 100%;
	}
	.hp-section .hp-product-section-body table th,
	.hp-section .hp-product-section-body table td {
		white-space: nowrap;
		padding: 0.5rem 1rem 0.5rem 0;
		font-size: 0.9rem;
	}
	.hp-section .hp-product-section-body table tbody {
		display: table-row-group;
	}
}

/* MOBILE — info first, sidebar second (override Round 1 order: -1) */
@media (max-width: 900px) {
	.hp-section .hp-product-body__sidebar {
		order: 0 !important;
	}
}


/* ===================================================================
   ROUND 9 (2026-04-28) — produkt detail
   - Bílé pozadí pod obsahem (skryje rušivé bg-dots za textem)
   - Bullets ještě výše (top z 0.55em na 0.3em)
   =================================================================== */

/* Bílé pozadí pod obsahem — skryje bg-dots motif za info+sidebar */
.hp-section .hp-product {
	background: #FFFFFF;
}
.hp-section .hp-product-header {
	background: #FFFFFF;
	padding: 1rem 0 0;
}

/* Bullets — top alignment ještě výše */
.hp-section .hp-product-section-body ul li::before {
	top: 0.3em !important;
}


/* ===================================================================
   ROUND 10 — bullets přesně na střed první řádky textu
   =================================================================== */
.hp-section .hp-product-section-body ul li::before {
	top: 0.7em !important;
	transform: translateY(-50%) !important;
}

/* Two-button CTA on product page (Koupit online + Koupit v lékárně) — added 2026-05-05; revised */
.hp-product__cta--double { display: flex; flex-wrap: wrap; gap: 1.75rem; margin: 1.5rem 0 0; }
.hp-section .hp-product__cta--double .hp-btn {
	background-color: var(--hp-red);
	color: var(--hp-white) !important;
	text-decoration: none !important;
	flex: 0 0 auto;
	padding: 0.65rem 2rem;
	font-weight: 900;
	text-align: center;
}
.hp-section .hp-product__cta--double .hp-btn:hover,
.hp-section .hp-product__cta--double .hp-btn:focus {
	background-color: var(--hp-red-dark);
	color: var(--hp-white) !important;
	text-decoration: none !important;
}
@media (max-width: 600px) {
	.hp-product__cta--double { flex-direction: column; gap: 0.75rem; }
	.hp-product__cta--double .hp-btn { flex: 1 1 auto; width: 100%; }
}

/* HP Dokumenty repeater (od 2026-05-05) — image / video / file items */
.hp-product-docs { margin-top: 1.5rem; }
.hp-product-docs__title { font-size: 1.1rem; font-weight: 700; color: var(--hp-text); margin: 0 0 1rem; }
.hp-product-docs__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.hp-product-docs__item { background: #fff; border: 1px solid #eee; border-radius: 4px; overflow: hidden; }
.hp-product-docs__image { display: block; text-decoration: none; color: inherit; }
.hp-product-docs__image img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.hp-product-docs__caption { display: block; padding: 0.5rem 0.75rem; font-size: 0.9rem; color: #555; }
.hp-product-docs__video { position: relative; width: 100%; padding-bottom: 56.25%; }
.hp-product-docs__video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.hp-product-docs__file { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.85rem; text-decoration: none; color: var(--hp-text); }
.hp-product-docs__file:hover { background: #faf6f4; }
.hp-product-docs__ext { background: var(--hp-red); color: #fff; font-size: 0.7rem; font-weight: 900; padding: 0.25rem 0.5rem; border-radius: 2px; min-width: 38px; text-align: center; }
.hp-product-docs__file-label { flex: 1 1 auto; font-size: 0.95rem; }
.hp-product-docs__download { color: var(--hp-red); font-weight: 900; font-size: 0.85rem; text-transform: uppercase; }
.hp-product-docs__link { display: inline-block; padding: 0.5rem 0.75rem; color: var(--hp-red); }


/* Lightbox pro HP Dokumenty obrázky (klient 2026-05-05) */
.hp-product-docs__image { cursor: zoom-in; }
.hp-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.88);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	cursor: zoom-out;
}
.hp-lightbox[hidden] { display: none; }
.hp-lightbox__img {
	max-width: 95%;
	max-height: 92vh;
	object-fit: contain;
	box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.hp-lightbox__close {
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
	background: #fff;
	border: 0;
	width: 48px;
	height: 48px;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: #222;
	transition: background 0.15s ease;
}
.hp-lightbox__close:hover,
.hp-lightbox__close:focus { background: var(--hp-red); color: #fff; }
@media (max-width: 600px) {
	.hp-lightbox { padding: 1rem; }
	.hp-lightbox__close { top: 0.75rem; right: 0.75rem; width: 40px; height: 40px; font-size: 1.6rem; }
}


/* Fix 2026-05-20: HTML5 video element vyplni aspect-ratio wrapper (iframe ho vyplnil; video ne, vznikal 200px white space pod). Caption skryta — klient nepouziva. */
.hp-product-docs__video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.hp-product-docs__caption { display: none; }
