/*
 * Tolarie — detail. Vzor: Portaro apps/tolarie-eshop (design/extracted).
 *
 * Bloky oznacene "prevzato" jsou doslovna kopie z design/extracted:
 * 10-product-detail.css (galerie, nakupni panel, specifikace) a
 * 07-listing-detail.css (drobeckova navigace). Needituji se.
 * Nase odchylky jsou az v sekci "napojeni na Django sablonu" dole.
 */

/* --- prevzato: 07-listing-detail.css (.crumbs) ------------------------- */

/* --- prevzato: 10-product-detail.css ----------------------------------- */
.ppage {
	max-width: 1280px;
	margin: 0 auto;
	padding: 28px 32px;
	display: flex;
	flex-direction: column;
	gap: 48px;
}
.ppage__head {
	margin-bottom: -16px;
}

.ppage__top {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 48px;
	align-items: start;
}

/* ---- gallery ---- */
.pg {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 16px;
}
.pg--m {
	grid-template-columns: 1fr;
	gap: 12px;
}
.pg__thumbs {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.pg__thumb {
	position: relative;
	aspect-ratio: 1/1;
	width: 100%;
	background: var(--bg-sunk);
	border: 1px solid var(--bg-rule);
	border-radius: var(--r-2);
	overflow: hidden;
	padding: 0;
}
.pg__thumb.is-on {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.25);
}
.pg__main {
	position: relative;
	aspect-ratio: 4/3;
	background: var(--bg-sunk);
	border: 1px solid var(--bg-rule);
	border-radius: var(--r-3);
	overflow: hidden;
}
.pg__badge {
	position: absolute;
	left: 14px;
	bottom: 14px;
	font-family: var(--f-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	background: var(--c-ink);
	color: var(--c-gold-soft);
	padding: 5px 10px;
	border-radius: 2px;
}

/* ---- buy panel ---- */
.buy {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.buy__eyebrow {
	font-family: var(--f-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent-deep);
}
.buy__title {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: clamp(26px, 2.6vw, 38px);
	line-height: 1.08;
	letter-spacing: 0.02em;
	margin: 0;
	text-transform: uppercase;
	text-wrap: balance;
}
.buy__rating {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 12px;
}
.buy__sku {
	font-family: var(--f-mono);
	font-size: 11px;
	color: var(--fg-faint);
	margin-left: auto;
}

.buy__pricebox {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 18px 0;
	border-top: 1px solid var(--bg-rule);
	border-bottom: 1px solid var(--bg-rule);
}
.buy__price {
	display: flex;
	align-items: baseline;
	gap: 12px;
}
.buy__price strong {
	font-family: var(--f-display);
	font-weight: 700;
	font-size: 34px;
	color: var(--accent-deep);
	letter-spacing: 0.01em;
}
.buy__vat {
	font-size: 12px;
	color: var(--fg-mute);
}
.buy__stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--f-mono);
	font-size: 12px;
	color: var(--ok);
	letter-spacing: 0.04em;
}
.buy__stock--low {
	color: var(--warn);
}

.buy__actions {
	display: flex;
	gap: 12px;
	align-items: stretch;
}
.buy__add {
	flex: 1;
}

.qty {
	display: flex;
	align-items: center;
	border: 1px solid var(--bg-rule);
	border-radius: var(--r-2);
	overflow: hidden;
}
.qty button {
	width: 44px;
	height: 100%;
	min-height: 48px;
	background: var(--bg-elev);
	color: var(--fg);
	border: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.qty button:hover {
	background: var(--bg-sunk);
}

.buy__perks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 6px 0 0;
}
.buy__perks li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--fg-soft);
}
.buy__perks svg {
	color: var(--accent-deep);
	flex-shrink: 0;
}
.buy__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

/* ---- info / specs ---- */
.pinfo {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
}
.pinfo__col h2 {
	margin-bottom: 16px;
}
.pinfo__desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--fg-mute);
}

.spectable {
	width: 100%;
	border-collapse: collapse;
}
.spectable tr {
	border-bottom: 1px solid var(--bg-rule);
}
.spectable th {
	text-align: left;
	padding: 11px 0;
	font-family: var(--f-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--fg-soft);
	width: 45%;
}
.spectable td {
	padding: 11px 0;
	font-size: 14px;
	color: var(--fg);
	font-family: var(--f-mono);
}

/* --- napojeni na Django sablonu ---------------------------------------
 * Referencni JSX mel misto fotek placeholder a misto pocitadla React
 * komponentu. Tady se dolaďuje jen to, co z toho plyne pro nase HTML.
 */

/*
 * Hlavni foto si nese i tridu .photo_product_detail, protoze na ni visi
 * selektor v inline onclicku u nahledu. Stara shop.css ji ale drzi na
 * pevnych 390x350 a display:inline-table, coz musi ustoupit ramecku
 * z reference. Obrazky jsou absolutne, aby ramecku zustal pomer stran.
 */
.pg__main.photo_product_detail {
	display: block;
	width: auto;
	height: auto;
	padding: 0;
}
.pg__thumb img,
.pg__main.photo_product_detail > img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
}
.pg__thumb img {
	object-fit: cover;
}
.pg__main.photo_product_detail > img {
	object-fit: contain;
}

/*
 * Pocitadlo: v referenci je <span> mezi dvema <button>, u nas <input>
 * mezi .dec/.inc, protoze na nich visi incrementing.js a kosikove AJAXy.
 * Stara shop.css jim dava obrazkove pozadi, float a margin-left 67px,
 * takze se prebijeji presnejsim selektorem.
 */
.qty .button_c {
	margin: 0;
	border-radius: 0;
	font-family: var(--f-mono);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.qty .button_c:hover,
.qty .button_c:active {
	background-color: var(--bg-sunk);
	color: var(--fg);
}
.qty input.number {
	float: none;
	width: 44px;
	min-width: 44px;
	height: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	background-image: none;
	text-align: center;
	font-family: var(--f-mono);
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	color: var(--fg);
	-moz-appearance: textfield;
}
.qty input.number::-webkit-outer-spin-button,
.qty input.number::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Kosik v tlacitku je sprite .basket_buy_btn, ktery je jinak 100 % plochy. */
.buy__add .basket_buy_btn {
	width: 18px;
	height: 18px;
	background-size: 18px 18px;
	flex-shrink: 0;
}

/* Inline SVG z Portara nema rozmery, resi je az CSS. */
.buy__stock .ikona {
	width: 14px;
	height: 14px;
}
.buy__perks .ikona {
	width: 16px;
	height: 16px;
}

/*
 * Odstavce a odrazky generuje filtr `popis` bez trid, takze se odrazkovy
 * seznam styluje podle .pinfo__list z reference. Fajfka je z CSS, ikonu
 * do vystupu filtru poslat nejde.
 */
.pinfo__desc p {
	margin: 0 0 12px;
}
.pinfo__desc ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}
.pinfo__desc li {
	position: relative;
	list-style: none;
	padding-left: 22px;
	font-size: 15px;
	color: var(--fg);
}
.pinfo__desc li::before {
	content: '';
	position: absolute;
	left: 3px;
	top: 0.45em;
	width: 5px;
	height: 10px;
	border: solid var(--ok);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.pinfo__desc > *:last-child {
	margin-bottom: 0;
}
