/*
 * Single product page — theme-owned styles (pw-t-*).
 * Loaded by functions.php after responsive.css when this file exists.
 */

/* "Skład i pielęgnacja" column: the_content() paragraphs cannot carry the mockup
 * classes (pw-p-300891 / pw-p-cd86b4), so mirror those declarations here. */
.pw-t-description p {
	font-family: "IBM Plex Serif", serif;
	font-size: 1rem;
	line-height: 1.7;
	margin: 0 0 16px;
	text-wrap: pretty;
}

.pw-t-description p:last-child {
	margin-bottom: 0;
}

/* Size-table row highlight while a size is selected in the variations form
   (pw.js toggles pw-t-size-active on tr.pw-tr-8d23b9). */
tr.pw-tr-8d23b9.pw-t-size-active > * {
	background: rgba(163, 30, 40, 0.08);
}

/* === Purchase panel — design 1:1 (Kolor/Rozmiar pickers + qty/add-to-cart row) === */

/* Color swatches: the generated sheet bakes each design color into its own class
   (pw-button-94fdc6 / pw-button-a57eb6 / pw-button-511179), so the shared 40x40
   box lives here and the actual color arrives inline from the term-name map in
   content-single-product.php. Active border = czerwien, as in the design. */
.pw-t-swatch {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(90, 102, 107, 0.4);
	border-radius: 2px;
	outline-offset: 3px;
	cursor: pointer;
}

.pw-t-swatch.pw-active {
	border-color: var(--pw-czerwien);
}

.pw-t-swatch:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Size tiles: normal/unavailable variants exist in the generated sheet
   (pw-button-03b4b7 / pw-button-1c4186, pw.js swaps them); the design placeholder
   never rendered a *selected* tile, so the active state is theme-owned. The
   design row also wraps (flex-wrap), which the generated pw-div-9c6869 lost. */
.pw-t-sizes {
	flex-wrap: wrap;
}

.pw-t-size.pw-active {
	background: var(--pw-atrament);
	border-color: var(--pw-atrament);
	color: var(--pw-papier);
}

/* Buy row: Woo's quantity + button markup mapped onto the design row
   (pw-div-80e179 wrapper, pw-div-f9f1cb qty box, pw-button-7b8a1f steppers,
   pw-button-3c1357 button). The div.product prefix / doubled classes keep these
   rules ahead of WooCommerce's own stylesheets. */
div.product .pw-t-purchase-form form.cart:not(.variations_form),
div.product .pw-t-purchase-form .woocommerce-variation-add-to-cart.woocommerce-variation-add-to-cart {
	display: flex;
	align-items: stretch;
	gap: 12px;
	margin: 0 0 20px;
}

div.product .pw-t-purchase-form form.cart div.quantity {
	float: none;
	display: flex;
	align-items: center;
	margin: 0;
	border: 1px solid rgba(90, 102, 107, 0.4);
	border-radius: 2px;
}

div.product .pw-t-purchase-form form.cart div.quantity .qty {
	width: 44px;
	min-width: 32px;
	height: 100%;
	padding: 0;
	border: 0;
	background: none;
	text-align: center;
	font-family: "IBM Plex Mono", monospace;
	font-size: 1rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
	appearance: textfield;
}

div.product .pw-t-purchase-form .quantity .qty::-webkit-outer-spin-button,
div.product .pw-t-purchase-form .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

div.product .pw-t-purchase-form .single_add_to_cart_button.single_add_to_cart_button {
	flex: 1 1 0%;
	height: 56px;
	padding: 0 24px;
	border: 0;
	border-radius: 2px;
	background: var(--pw-atrament);
	color: var(--pw-papier);
	cursor: pointer;
	font-family: "IBM Plex Mono", monospace;
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	transition: background 120ms;
	float: none;
}

div.product .pw-t-purchase-form .single_add_to_cart_button.single_add_to_cart_button:hover {
	background: var(--pw-czerwien);
}

/* Woo's quantity label and simple-product stock note have no place in the design;
   the label stays for screen readers (blog.css only scopes .screen-reader-text
   to pagination, so it needs the clip pattern here too). */
.pw-t-purchase-form .quantity label.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

div.product .pw-t-purchase-form form.cart p.stock {
	display: none !important;
}

/* With JS on (pw.js adds pw-t-enhanced) the tiles drive the hidden native
   controls; the design shows no selects, per-variation price block or reset
   link. Woo toggles .single_variation with inline styles — hence !important.
   Without JS the native Woo selects stay visible and usable. */
.pw-t-purchase-form.pw-t-enhanced table.variations,
.pw-t-purchase-form.pw-t-enhanced .woocommerce-variation.single_variation,
.pw-t-purchase-form.pw-t-enhanced .reset_variations {
	display: none !important;
}
