/* =========================================================================
   ELEVARTE — Ficha de producto

   Dos columnas sobre el crema de la marca: galería redondeada a la izquierda
   (sticky) y tarjeta blanca de compra a la derecha. Debajo, la barra azul
   «Podría interesarte también» y la rejilla de relacionados.

   Se carga solo en single product (woocommerce/theme-woocommerce.php).
   El marcado vive en woocommerce/single-product.php.
   ========================================================================= */

body.single-product,
body.single-product .site,
body.single-product .site-main {
	background: var(--pz-cream, #f4e9e1);
}

/* La ficha ocupa todo el hueco útil a la derecha de la cabecera lateral. */
body.single-product .site {
	width: 100%;
	max-width: none;
	margin-inline: 0;
}

.pz-product {
	--pz-p-ink: #111111;
	--pz-p-muted: #4a4a4a;
	--pz-p-orange: var(--pz-c-orange, #f2561b);
	--pz-p-blue: var(--pz-c-blue, #0a61f0);
	--pz-p-line: rgba(17, 17, 17, .12);
	--pz-p-radius: clamp(18px, 1.6vw, 26px);
	--pz-p-gutter: clamp(12px, 1.4vw, 26px);
	--pz-p-gap: clamp(14px, 1.4vw, 24px);
	--pz-p-sticky-top: clamp(12px, 1.6vw, 26px);

	display: block;
	box-sizing: border-box;
	padding: clamp(14px, 1.5vw, 26px) var(--pz-p-gutter) clamp(24px, 3vw, 48px);
	color: var(--pz-p-ink);
	background: var(--pz-cream, #f4e9e1);
}

.pz-product *,
.pz-product *::before,
.pz-product *::after {
	box-sizing: border-box;
}

.pz-product__article {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* =========================================================================
   1. Rejilla principal
   ========================================================================= */

.pz-product__stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--pz-p-gap);
	align-items: start;
}

/* =========================================================================
   2. Galería
   ========================================================================= */

.pz-product__media-col {
	position: sticky;
	top: var(--pz-p-sticky-top);
	min-width: 0;
}

.pz-product__media {
	border-radius: var(--pz-p-radius);
	overflow: hidden;
	background: #fff;
}

.pz-gallery {
	position: relative;
	display: block;
}

/* Miniaturas flotando sobre la imagen: el diseño no reserva una columna para
   ellas, así que se superponen abajo a la izquierda y solo aparecen cuando el
   producto tiene más de una foto. */
.pz-gallery__thumbs {
	position: absolute;
	left: 14px;
	bottom: 14px;
	z-index: 2;
	display: flex;
	gap: 8px;
	max-width: calc(100% - 28px);
	overflow-x: auto;
	scrollbar-width: none;
	padding: 6px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .78);
	backdrop-filter: blur(6px);
}

.pz-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

.pz-gallery__thumb {
	flex: 0 0 auto;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	cursor: pointer;
	transition: border-color .18s ease;
}

.pz-gallery__thumb.is-active {
	border-color: var(--pz-p-orange);
}

.pz-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pz-gallery__main {
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
}

.pz-gallery__main img,
.pz-gallery__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: zoom-in;
}

/* =========================================================================
   3. Tarjeta de compra
   ========================================================================= */

.pz-product__info {
	min-width: 0;
	padding: clamp(22px, 3.4vw, 60px);
	border-radius: var(--pz-p-radius);
	background: #fff;
}

/* — Migas — */
.pz-product__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: clamp(14px, 1.6vw, 26px);
	font-size: clamp(13px, .85vw, 15px);
	font-weight: 600;
	line-height: 1.3;
	color: var(--pz-p-ink);
}

.pz-product__crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color .18s ease;
}

.pz-product__crumbs a:hover {
	color: var(--pz-p-orange);
}

.pz-product__crumb-sep {
	color: rgba(17, 17, 17, .45);
}

/* — Título y precio — */
.pz-product__title {
	margin: 0 0 clamp(14px, 1.4vw, 22px);
	font-size: clamp(26px, 2.5vw, 46px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.02em;
	color: var(--pz-p-ink);
}

.pz-product__price {
	margin: 0 0 clamp(12px, 1.2vw, 20px);
	font-size: clamp(24px, 2.1vw, 39px);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.01em;
	color: var(--pz-p-orange);
}

.pz-product__price del {
	margin-right: 10px;
	opacity: .45;
	font-weight: 700;
}

.pz-product__price ins {
	text-decoration: none;
}

/* — Lista de características (extracto del producto) —
   Interlineado corto y sin separación entre párrafos: el diseño las muestra
   como una lista compacta, no como texto corrido. */
.pz-product__excerpt {
	margin-bottom: clamp(18px, 2vw, 30px);
	font-size: clamp(13px, .88vw, 15px);
	line-height: 1.45;
	color: var(--pz-p-muted);
}

.pz-product__excerpt p {
	margin: 0;
}

.pz-product__excerpt p + p {
	margin-top: 2px;
}

.pz-product__excerpt ul,
.pz-product__excerpt ol {
	margin: 0;
	padding-left: 18px;
}

/* — Barra de garantías — */
.pz-product__trust {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0 0 clamp(16px, 1.8vw, 26px);
	padding: clamp(12px, 1vw, 18px) 0;
	list-style: none;
	border: 1px solid rgba(242, 86, 27, .4);
	border-radius: 14px;
}

.pz-trust {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 2px clamp(10px, 1vw, 18px);
	min-width: 0;
}

/* Separadores solo entre celdas. */
.pz-trust + .pz-trust {
	border-left: 1px solid rgba(17, 17, 17, .14);
}

.pz-trust__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	color: var(--pz-p-ink);
}

.pz-trust__icon svg {
	display: block;
}

.pz-trust__text {
	min-width: 0;
	font-size: clamp(10px, .68vw, 12.5px);
	line-height: 1.3;
	color: var(--pz-p-muted);
}

/* =========================================================================
   4. Compra: cantidad + botón
   ========================================================================= */

.pz-product__cta {
	margin-bottom: clamp(14px, 1.6vw, 24px);
}

/* Especificidad alta en todo este bloque a propósito: la hoja de WooCommerce
   trae `.woocommerce div.product form.cart .button` con float y
   `.woocommerce button.button.alt` (0,3,1) con su morado #7f54b3. Con los
   selectores cortos ganaba ella y el botón salía morado y desmaquetado. */
body.woocommerce .pz-product .pz-product__cta form.cart,
.pz-product__cta .cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
	margin: 0;
}

body.woocommerce .pz-product .pz-product__cta form.cart::before,
body.woocommerce .pz-product .pz-product__cta form.cart::after {
	content: none;
}

body.woocommerce .pz-product .pz-product__cta form.cart .quantity,
.pz-product__cta .quantity {
	float: none;
	flex: 0 0 auto;
	margin: 0;
}

/* Píldora de cantidad (la arma pz-single-product.js sobre el input nativo). */
.pz-qty {
	display: inline-flex;
	align-items: center;
	height: clamp(46px, 3.4vw, 56px);
	padding: 0 6px;
	border: 1px solid rgba(17, 17, 17, .18);
	border-radius: 999px;
	background: #fff;
}

.pz-qty__btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--pz-p-ink);
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease;
}

.pz-qty__btn:hover {
	background: rgba(17, 17, 17, .07);
}

.pz-qty__input,
.pz-product__cta .quantity input.qty {
	width: 40px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--pz-p-ink);
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.pz-qty__input::-webkit-outer-spin-button,
.pz-qty__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.pz-qty__input:focus {
	outline: none;
}

/* Botón principal. */
body.woocommerce .pz-product .pz-product__cta button.button.alt,
body.woocommerce .pz-product .pz-product__cta button.single_add_to_cart_button,
.pz-product__cta .pz-addtocart {
	display: flex;
	float: none;
	flex: 1 1 240px;
	align-items: center;
	gap: 12px;
	width: auto;
	min-width: 0;
	height: clamp(46px, 3.4vw, 56px);
	padding: 0 18px 0 24px;
	border: 0;
	border-radius: 999px;
	background-color: var(--pz-p-orange);
	background-image: none;
	color: #fff;
	font-size: clamp(13px, .9vw, 15px);
	font-weight: 600;
	line-height: 1;
	text-transform: lowercase;
	text-shadow: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .18s ease, background-color .18s ease;
}

body.woocommerce .pz-product .pz-product__cta button.button.alt:hover,
body.woocommerce .pz-product .pz-product__cta button.single_add_to_cart_button:hover,
.pz-product__cta .pz-addtocart:hover {
	background-color: #d94a13;
	color: #fff;
	transform: translateY(-1px);
}

.pz-addtocart__label {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* Línea que separa la etiqueta del importe, como en el diseño. */
.pz-addtocart__rule {
	flex: 1 1 auto;
	min-width: 16px;
	height: 1px;
	background: rgba(255, 255, 255, .6);
}

.pz-addtocart__total {
	flex: 0 0 auto;
	font-weight: 700;
	white-space: nowrap;
}

.pz-addtocart__total del {
	display: none;
}

.pz-addtocart__ico {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	margin-left: 6px;
}

.pz-addtocart__ico svg {
	display: block;
}

/* Aviso de stock de WooCommerce. */
.pz-product__cta .stock {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
}

.pz-product__cta .stock.out-of-stock {
	color: #c0392b;
}

/* =========================================================================
   4b. Cotizar por WhatsApp

   Va justo debajo del botón naranja y abre un chat con el mensaje ya escrito
   (producto, precio y enlace). El número vive en pz_product_whatsapp_number().
   ========================================================================= */

.pz-product__wa {
	margin: 0 0 clamp(14px, 1.6vw, 24px);
}

.pz-wa-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: clamp(46px, 3.4vw, 56px);
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--pz-c-green, #14a75a);
	color: #fff;
	font-size: clamp(13px, .9vw, 15px);
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform .18s ease, background-color .18s ease;
}

.pz-wa-btn:hover,
.pz-wa-btn:focus-visible {
	background: #11914e;
	color: #fff;
	transform: translateY(-1px);
}

.pz-wa-btn svg {
	display: block;
	flex: 0 0 auto;
}

/* =========================================================================
   5. Acordeón
   ========================================================================= */

.pz-accordion {
	border-top: 1px solid var(--pz-p-line);
}

.pz-accordion__item {
	border-bottom: 1px solid var(--pz-p-line);
}

.pz-accordion__heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.pz-accordion__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	padding: clamp(13px, 1.1vw, 18px) 0;
	border: 0;
	background: transparent;
	color: var(--pz-p-ink);
	font-size: clamp(13px, .9vw, 15px);
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
	text-transform: lowercase;
	cursor: pointer;
}

.pz-accordion__head:hover .pz-accordion__label {
	color: var(--pz-p-orange);
}

.pz-accordion__label {
	transition: color .18s ease;
}

/* Signo + / − dibujado en CSS: dos barras, la vertical se oculta al abrir. */
.pz-accordion__sign {
	position: relative;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
}

.pz-accordion__sign::before,
.pz-accordion__sign::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 50%;
	background: var(--pz-p-ink);
	transform: translate(-50%, -50%);
	transition: opacity .18s ease;
}

.pz-accordion__sign::before {
	width: 14px;
	height: 1.6px;
}

.pz-accordion__sign::after {
	width: 1.6px;
	height: 14px;
}

.pz-accordion__item.is-open .pz-accordion__sign::after {
	opacity: 0;
}

/* El panel se abre con grid-template-rows: anima sin conocer el alto. */
.pz-accordion__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .28s ease;
}

.pz-accordion__item.is-open .pz-accordion__panel {
	grid-template-rows: 1fr;
}

.pz-accordion__inner {
	min-height: 0;
	overflow: hidden;
}

.pz-accordion__body {
	padding: 0 0 clamp(14px, 1.2vw, 20px);
	font-size: clamp(12px, .82vw, 14px);
	line-height: 1.6;
	color: var(--pz-p-muted);
}

.pz-accordion__body > *:first-child {
	margin-top: 0;
}

.pz-accordion__body > *:last-child {
	margin-bottom: 0;
}

.pz-accordion__body table {
	width: 100%;
	border-collapse: collapse;
}

.pz-accordion__body table th,
.pz-accordion__body table td {
	padding: 7px 0;
	border-bottom: 1px solid var(--pz-p-line);
	text-align: left;
	vertical-align: top;
}

.pz-accordion__body table th {
	width: 38%;
	font-weight: 600;
	color: var(--pz-p-ink);
}

.pz-product__file-link {
	color: var(--pz-p-orange);
	font-weight: 600;
}

/* =========================================================================
   6. Podría interesarte también
   ========================================================================= */

.pz-related {
	margin-top: clamp(18px, 2vw, 32px);
}

.pz-related__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: clamp(13px, 1.2vw, 19px) 24px;
	border-radius: 999px;
	background: var(--pz-p-blue);
	color: #fff;
	text-decoration: none;
	transition: filter .18s ease;
}

.pz-related__bar:hover {
	color: #fff;
	filter: brightness(1.08);
}

.pz-related__bar-text {
	font-size: clamp(13px, .95vw, 17px);
	font-weight: 700;
	text-align: center;
}

.pz-related__bar-ico {
	display: grid;
	place-items: center;
}

.pz-related__bar-ico svg {
	display: block;
}

/* Rejilla de 4. Especificidad alta a propósito: oz-cotizador/assets/css/loops.css
   trae `.ozc-loops--replace ul.products:not(.ozs__track)` (0,3,1) con su propio
   auto-fill, que si no le gana se come las columnas. */
body.single-product .pz-product .pz-related__grid.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: var(--pz-p-gap) !important;
	margin: var(--pz-p-gap) 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

body.single-product .pz-product .pz-related__grid.products::before,
body.single-product .pz-product .pz-related__grid.products::after {
	content: none !important;
}

body.single-product .pz-product .pz-related__grid.products > li.product {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	clear: none !important;
}

/* =========================================================================
   7. Lightbox de la galería
   ========================================================================= */

.pz-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: grid;
	place-items: center;
	padding: 5vmin;
	background: rgba(3, 15, 30, .88);
}

.pz-lightbox[hidden] {
	display: none;
}

/* El marco se ajusta a la imagen, así el botón de cerrar cae sobre su esquina
   y no en la del navegador. */
.pz-lightbox__frame {
	position: relative;
	display: inline-block;
	padding: 12px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 30px 80px rgba(3, 15, 30, .45);
}

.pz-lightbox__img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(86vw, 620px);
	max-height: min(76vh, 620px);
	max-height: min(76svh, 620px);
	border-radius: 6px;
	object-fit: contain;
}

.pz-lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(3, 15, 30, .55);
	color: #fff;
	cursor: pointer;
	transition: background-color .18s ease;
}

.pz-lightbox__close:hover {
	background: rgba(3, 15, 30, .8);
}

/* Flechas: solo aparecen si el producto tiene 2 o más imágenes (lo decide el
   JS con el atributo `hidden`). El desplazamiento coincide con el padding del
   marco, así quedan justo dentro de la imagen. */
.pz-lightbox__nav {
	position: absolute;
	top: 50%;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(3, 15, 30, .55);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color .18s ease;
}

.pz-lightbox__nav:hover {
	background: rgba(3, 15, 30, .8);
}

.pz-lightbox__nav--prev {
	left: 12px;
}

.pz-lightbox__nav--next {
	right: 12px;
}

.pz-lightbox__nav[hidden] {
	display: none;
}

/* =========================================================================
   8. Adaptación a pantallas menores
   ========================================================================= */

@media (max-width: 1366px) {
	body.single-product .pz-product .pz-related__grid.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 1024px) {
	.pz-product__stage {
		grid-template-columns: minmax(0, 1fr);
	}

	.pz-product__media-col {
		position: static;
	}

	.pz-gallery__main {
		aspect-ratio: 4 / 3;
	}

	body.single-product .pz-product .pz-related__grid.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.pz-product__trust {
		grid-template-columns: minmax(0, 1fr);
		padding: 6px 0;
	}

	.pz-trust {
		padding: 10px 16px;
	}

	.pz-trust + .pz-trust {
		border-left: 0;
		border-top: 1px solid rgba(17, 17, 17, .14);
	}

	.pz-product__cta .cart {
		flex-wrap: nowrap;
	}

	.pz-addtocart__rule {
		display: none;
	}
}

/* A dos columnas por debajo de ~520px la tarjeta del design pack se queda sin
   sitio y recorta el botón «Cotizar»; a partir de aquí va a una. */
@media (max-width: 520px) {
	body.single-product .pz-product .pz-related__grid.products {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}
