/* =========================================================================
   PS Beton – detail produktu
   Vše pod body.psb-detail; vlastní CSS webu a šablona Envo se přebíjí.
   ====================================================================== */
body.psb-detail {
	--psb-brand: #103B87;
	--psb-brand-dark: #0A2454;
	--psb-ink: #0F1E33;
	--psb-muted: #55606B;
	--psb-accent: #F5B400;
	--psb-line: #E2E0DB;
	--psb-ok: #1F6B3A;
	--psb-font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.psb-detail div.product { font-family: var(--psb-font); color: var(--psb-ink); }
.psb-detail div.product a:focus-visible,
.psb-detail div.product button:focus-visible { outline: 3px solid var(--psb-accent); outline-offset: 2px; }

/* Šipky na předchozí/další produkt (šablona Envo) – odstraněno */
.psb-detail #product-nav { display: none !important; }

/* ---------- Galerie ---------- */
.psb-detail div.product .woocommerce-product-gallery { margin-bottom: 32px; }
.psb-detail div.product .wpgs-for,
.psb-detail div.product .woocommerce-product-gallery__wrapper {
	background: #FFFFFF; border: 1px solid var(--psb-line); border-radius: 12px; overflow: hidden;
}
.psb-detail div.product .wpgs-for img,
.psb-detail div.product .woocommerce-product-gallery__image img {
	width: 100%; height: 520px !important; object-fit: contain; background: #FFFFFF; padding: 16px; border-radius: 0 !important;
}
.psb-detail div.product .wpgs-nav { margin-top: 12px; }
.psb-detail div.product .wpgs-nav img {
	width: 100%; height: 84px !important; object-fit: contain; background: #FFFFFF;
	border: 1px solid var(--psb-line); border-radius: 8px; padding: 6px; cursor: pointer; opacity: .75;
	transition: opacity .15s, border-color .15s;
}
.psb-detail div.product .wpgs-nav .slick-current img,
.psb-detail div.product .wpgs-nav img:hover { opacity: 1; border-color: var(--psb-brand); }
.psb-detail div.product .wpgs-nav .slick-slide { padding: 0 5px; }

/* ---------- Pravý sloupec ---------- */
.psb-detail div.product .summary { font-family: var(--psb-font); }
.psb-detail div.product .summary .product_title {
	margin: 0 0 16px; font-family: var(--psb-font); font-weight: 700;
	font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -0.01em;
	color: var(--psb-ink); text-transform: none;
}

/* Cena (vlastní výpis s DPH / bez DPH) */
.psb-detail.woocommerce div.product .summary p.price,
.psb-detail.woocommerce div.product .summary span.price {
	display: flex; flex-direction: column; gap: 2px;
	margin: 0 0 18px; padding: 18px 20px;
	background: #F4F6FA; border-radius: 12px;
	color: var(--psb-ink); font-size: 16px;
}
.psb-detail div.product .summary p.price br { display: none; }
.psb-detail div.product .summary span.custom-price-with-vat {
	font-size: 32px; font-weight: 700; line-height: 1.15; color: var(--psb-ink);
}
.psb-detail div.product .summary span.custom-price-without-vat {
	font-size: 15px; font-weight: 400; color: var(--psb-muted);
}
/* Obal přepínače měn (WOOCS) – řádky pod sebou */
.psb-detail div.product .summary p.price .woocs_price_code { display: flex; flex-direction: column; gap: 4px; }
/* Akční cena: nová velká, původní menší přeškrtnutá vedle */
.psb-detail div.product .summary span.custom-price-with-vat,
.psb-detail div.product .summary span.custom-price-without-vat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.psb-detail div.product .summary span.custom-price-with-vat ins,
.psb-detail div.product .summary span.custom-price-without-vat ins {
	order: 1; text-decoration: none; background: none; font-weight: inherit; font-size: inherit; color: inherit;
}
.psb-detail div.product .summary span.custom-price-with-vat del,
.psb-detail div.product .summary span.custom-price-without-vat del {
	order: 2; opacity: 1; font-weight: 400; color: var(--psb-muted); text-decoration-thickness: 1px;
}
.psb-detail div.product .summary span.custom-price-with-vat del { font-size: 17px; }
.psb-detail div.product .summary span.custom-price-without-vat del { font-size: 13px; }
.psb-detail div.product .summary span.custom-price-with-vat ins { color: #B42318; } /* akční cena */
.psb-detail div.product .summary p.price del .amount,
.psb-detail div.product .summary p.price ins .amount { font-size: inherit; color: inherit; font-weight: inherit; }

/* Štítek slevy nad cenou */
.psb-dsale {
	display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; padding: 5px 12px; border-radius: 4px;
	background: var(--psb-accent); color: var(--psb-ink); font-size: 14px; font-weight: 700;
}

/* Krátký popis */
.psb-detail div.product .woocommerce-product-details__short-description {
	margin: 0 0 18px; font-size: 16px; line-height: 1.65; color: #2D3A48;
}
.psb-detail div.product .woocommerce-product-details__short-description p { margin: 0 0 10px; }
.psb-detail div.product .woocommerce-product-details__short-description ul { margin: 0 0 10px 18px; }

/* Dostupnost */
.psb-detail.woocommerce div.product .summary p.stock {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 0 18px; padding: 6px 12px; border-radius: 999px;
	font-size: 14px; font-weight: 600;
	background: #EAF4EC; color: var(--psb-ok);
}
.psb-detail.woocommerce div.product .summary p.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.psb-detail.woocommerce div.product .summary p.stock.out-of-stock { background: #F1F2F4; color: var(--psb-muted); }
.psb-detail.woocommerce div.product .summary p.stock.available-on-backorder { background: #FFF4D6; color: #7A5200; }

/* Košík: množství + tlačítko */
.psb-detail div.product form.cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin: 0 0 20px; }
.psb-detail div.product form.cart .quantity { margin: 0 !important; float: none; }
.psb-detail div.product form.cart .minus,
.psb-detail div.product form.cart .plus {
	width: 44px; height: 52px; padding: 0; margin: 0; float: none;
	border: 1px solid #C9C6C0; background: #FFFFFF !important; color: var(--psb-ink);
	font-size: 20px; line-height: 1; cursor: pointer;
}
.psb-detail div.product form.cart .minus { border-radius: 8px 0 0 8px; border-right: 0; margin-right: -12px; }
.psb-detail div.product form.cart .plus { border-radius: 0 8px 8px 0; border-left: 0; margin-left: -12px; }
.psb-detail div.product form.cart .quantity input.qty {
	width: 60px; height: 52px; padding: 0; margin: 0;
	border: 1px solid #C9C6C0; border-radius: 0; background: #FFFFFF;
	font-size: 16px; font-weight: 600; text-align: center; color: var(--psb-ink);
	-moz-appearance: textfield;
}
.psb-detail div.product form.cart .quantity input.qty::-webkit-inner-spin-button,
.psb-detail div.product form.cart .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.psb-detail.woocommerce div.product form.cart .single_add_to_cart_button.button.alt {
	flex: 1 1 220px; min-height: 52px; height: auto; padding: 0 28px; margin: 0; float: none;
	border: 0; border-radius: 8px;
	background: var(--psb-brand) !important; color: #FFFFFF !important;
	font-family: var(--psb-font); font-size: 17px; font-weight: 600; text-transform: none; letter-spacing: 0;
	transition: background-color .15s;
}
.psb-detail.woocommerce div.product form.cart .single_add_to_cart_button.button.alt:hover { background: var(--psb-brand-dark) !important; }
.psb-detail.woocommerce div.product form.cart .single_add_to_cart_button.loading { opacity: .7; }

/* Poptávka místo košíku */
.psb-detail .ratcw-message { display: none !important; }
.psb-dcta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.psb-detail .psb-dbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 26px; border-radius: 8px; border: 1.5px solid transparent;
	font-family: var(--psb-font); font-size: 17px; font-weight: 600; text-decoration: none;
	transition: background-color .15s, border-color .15s, color .15s;
}
.psb-detail .psb-dbtn--accent { flex: 1 1 220px; background: var(--psb-accent); color: var(--psb-ink); }
.psb-detail .psb-dbtn--accent:hover { background: #FFC61A; color: var(--psb-ink); }
.psb-detail .psb-dbtn--ghost { border-color: var(--psb-brand); color: var(--psb-brand); }
.psb-detail .psb-dbtn--ghost:hover { background: var(--psb-brand); color: #FFFFFF; }
.psb-dcta__note { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--psb-muted); }

/* Výhody */
.psb-dusp { list-style: none; margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid var(--psb-line); display: grid; gap: 10px; }
.psb-dusp li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; color: #2D3A48; }
.psb-dusp .psb-icon { color: var(--psb-brand); flex: none; }
.psb-dusp a { color: var(--psb-brand); font-weight: 600; text-decoration: none; }
.psb-dusp a:hover { text-decoration: underline; }

/* Kód a kategorie */
.psb-detail div.product .product_meta {
	display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 14px; border-top: 1px solid var(--psb-line);
	font-size: 13px; color: var(--psb-muted);
}
.psb-detail div.product .product_meta > span { display: inline; }
.psb-detail div.product .product_meta a { color: var(--psb-brand); }

/* Sdílení – jen ikony */
.psb-detail .the-product-share { clear: both; margin: 4px 0 24px; }
.psb-detail .the-product-share ul.the-social-share { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.psb-detail .the-product-share li { margin: 0; }
.psb-detail .the-product-share a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--psb-line); background: #FFFFFF;
}
.psb-detail .the-product-share a:hover { border-color: var(--psb-brand); }
.psb-detail .the-product-share .the-icon { width: 18px; height: 18px; fill: var(--psb-brand); }
.psb-detail .the-product-share .product-share-text { display: none; }

/* ---------- Záložky ---------- */
.psb-detail.woocommerce div.product .woocommerce-tabs { clear: both; margin-top: 16px; }
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0 !important;
	border-bottom: 2px solid var(--psb-line); overflow: visible;
}
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0 0 -2px; padding: 0; border: 0; border-radius: 0; background: none;
}
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	display: block; padding: 12px 18px; border-bottom: 3px solid transparent;
	font-family: var(--psb-font); font-size: 16px; font-weight: 600; color: var(--psb-muted); text-transform: none;
}
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover { color: var(--psb-brand); }
.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--psb-brand); border-bottom-color: var(--psb-brand); }
.psb-detail.woocommerce div.product .woocommerce-tabs .panel {
	margin: 0; padding: 28px 0 8px; font-size: 16px; line-height: 1.7; color: #2D3A48; max-width: 900px;
}
.psb-detail.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; } /* opakuje název záložky */
.psb-detail.woocommerce div.product .woocommerce-tabs .panel h2,
.psb-detail.woocommerce div.product .woocommerce-tabs .panel h3 { font-family: var(--psb-font); font-weight: 700; color: var(--psb-ink); margin: 24px 0 10px; }
.psb-detail.woocommerce div.product .woocommerce-tabs .panel table {
	width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px;
	border: 1px solid var(--psb-line); border-radius: 8px; overflow: hidden;
}
.psb-detail.woocommerce div.product .woocommerce-tabs .panel table th,
.psb-detail.woocommerce div.product .woocommerce-tabs .panel table td {
	padding: 10px 14px; border-bottom: 1px solid var(--psb-line); text-align: left; vertical-align: top;
}
.psb-detail.woocommerce div.product .woocommerce-tabs .panel table tr:nth-child(even) { background: #F7F8FA; }
.psb-detail.woocommerce div.product .woocommerce-tabs .panel table th { width: 40%; font-weight: 600; color: var(--psb-ink); }

/* ---------- Stávající formulář „Dotaz na produkt“ ---------- */
html { scroll-behavior: smooth; }
.psb-detail #poptavka { scroll-margin-top: 110px; }
.psb-detail h2.formular-nadpis {
	clear: both; margin: 48px 0 0; padding: 32px 36px 0;
	background: #FFFFFF; border: 1px solid var(--psb-line); border-bottom: 0; border-radius: 16px 16px 0 0;
	font-family: var(--psb-font); font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; line-height: 1.2;
	color: var(--psb-ink); text-transform: none;
}
.psb-detail h2.formular-nadpis::after {
	content: "Napište, co potřebujete, a pošleme vám nabídku. Nebo volejte +420 606 681 030.";
	display: block; margin-top: 8px;
	font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--psb-muted);
}
.psb-detail h2.formular-nadpis + style + .wpforms-container,
.psb-detail h2.formular-nadpis + .wpforms-container {
	margin: 0 0 40px !important; padding: 24px 36px 36px;
	background: #FFFFFF; border: 1px solid var(--psb-line); border-top: 0; border-radius: 0 0 16px 16px;
}
/* Pole formuláře */
.psb-detail .wpforms-container .wpforms-form .wpforms-field { padding: 0 0 18px; }
.psb-detail .wpforms-container .wpforms-form .wpforms-field-label {
	font-family: var(--psb-font); font-size: 14px; font-weight: 600; margin-bottom: 8px;
}
.psb-detail .wpforms-container .wpforms-form input[type="text"],
.psb-detail .wpforms-container .wpforms-form input[type="email"],
.psb-detail .wpforms-container .wpforms-form input[type="tel"],
.psb-detail .wpforms-container .wpforms-form input[type="number"],
.psb-detail .wpforms-container .wpforms-form select,
.psb-detail .wpforms-container .wpforms-form textarea {
	width: 100%; max-width: 100%; min-height: 48px; padding: 10px 14px;
	font-family: var(--psb-font); font-size: 15px; color: var(--psb-ink);
	background: #FAFAF8; border: 1px solid #C9C6C0; border-radius: 8px; box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.psb-detail .wpforms-container .wpforms-form textarea { min-height: 130px; resize: vertical; }
.psb-detail .wpforms-container .wpforms-form input:focus,
.psb-detail .wpforms-container .wpforms-form select:focus,
.psb-detail .wpforms-container .wpforms-form textarea:focus {
	outline: none; border-color: var(--psb-brand); box-shadow: 0 0 0 3px rgba(16,59,135,.18); background: #FFFFFF;
}
.psb-detail .wpforms-container .wpforms-form .wpforms-field-gdpr-checkbox label,
.psb-detail .wpforms-container .wpforms-form .wpforms-field-checkbox label { font-size: 14px; font-weight: 400; color: var(--psb-muted) !important; }
.psb-detail .wpforms-container .wpforms-form input[type="checkbox"] { accent-color: var(--psb-brand); }
.psb-detail .wpforms-container .wpforms-form button[type="submit"],
.psb-detail .wpforms-container .wpforms-form .wpforms-submit {
	min-height: 52px; height: auto; padding: 0 34px;
	font-family: var(--psb-font); font-size: 16px; font-weight: 600; line-height: 1.2;
	background: var(--psb-accent) !important; color: var(--psb-ink) !important;
	border: 0 !important; border-radius: 8px; box-shadow: none; cursor: pointer;
}
.psb-detail .wpforms-container .wpforms-form button[type="submit"]:hover,
.psb-detail .wpforms-container .wpforms-form .wpforms-submit:hover { background: #FFC61A !important; }
.psb-detail .wpforms-container .wpforms-form label.wpforms-error,
.psb-detail .wpforms-container .wpforms-form em.wpforms-error { font-size: 13px; color: #B42318; }
.psb-detail .wpforms-container .wpforms-confirmation-container-full {
	background: #EAF4EC; border: 1px solid #B8D9BF; color: var(--psb-ok); border-radius: 8px; padding: 20px 22px; font-size: 16px;
}
@media (min-width: 700px) {
	.psb-detail .wpforms-container .wpforms-field-container { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
	.psb-detail .wpforms-container .wpforms-field-container > .wpforms-field { grid-column: 1 / -1; float: none; width: auto; margin-left: 0; }
	.psb-detail .wpforms-container .wpforms-field-container > .wpforms-field-name,
	.psb-detail .wpforms-container .wpforms-field-container > .wpforms-field-email,
	.psb-detail .wpforms-container .wpforms-field-container > .wpforms-field-phone,
	.psb-detail .wpforms-container .wpforms-field-container > .wpforms-field-select { grid-column: auto; }
}
@media (max-width: 600px) {
	.psb-detail h2.formular-nadpis { padding: 24px 20px 0; }
	.psb-detail h2.formular-nadpis + style + .wpforms-container,
	.psb-detail h2.formular-nadpis + .wpforms-container { padding: 20px 20px 28px; }
	.psb-detail .wpforms-container .wpforms-form .wpforms-submit { width: 100%; }
}

/* ---------- Související produkty ---------- */
.psb-detail .related.products,
.psb-detail .upsells.products { clear: both; margin-top: 40px; }
.psb-detail .related.products > h2,
.psb-detail .upsells.products > h2 {
	margin: 0 0 20px; font-family: var(--psb-font); font-size: 28px; font-weight: 700; color: var(--psb-ink); text-transform: none;
}

/* ---------- Mobil ---------- */
@media (max-width: 768px) {
	.psb-detail div.product .wpgs-for img,
	.psb-detail div.product .woocommerce-product-gallery__image img { height: 340px !important; }
	.psb-detail div.product .wpgs-nav img { height: 64px !important; }
	.psb-detail div.product .summary span.custom-price-with-vat { font-size: 28px; }
	.psb-detail .psb-dbtn { width: 100%; }
	.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs { flex-wrap: nowrap; overflow-x: auto; }
	.psb-detail.woocommerce div.product .woocommerce-tabs ul.tabs li a { white-space: nowrap; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.psb-detail div.product * { transition: none !important; }
}

/* WPForms pole „Jméno“ (křestní + příjmení) vedle sebe */
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-row {
	display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
	width: 100% !important; max-width: none !important; margin: 0 !important;
}
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-row::before,
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-row::after { display: none !important; content: none !important; }
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-row-block {
	width: auto !important; max-width: none !important; float: none !important;
	margin: 0 !important; padding: 0 !important;
}
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-row-block input { width: 100% !important; max-width: none !important; }
.psb-detail .wpforms-container .wpforms-field-name .wpforms-field-sublabel { margin-top: 6px; }

/* Štítek slevy jen jednou – skrýt štítek šablony v rohu galerie (zůstává náš „Sleva X %“ nad cenou) */
.psb-detail.woocommerce div.product > span.onsale,
.psb-detail.woocommerce div.product .woocommerce-product-gallery span.onsale,
.psb-detail.woocommerce span.onsale { display: none !important; }
