/* ---------- Ficha de producto ---------- */
.nt-content--product { max-width: none; padding: 0; }

/* Rejilla: galería a la izquierda, compra fija a la derecha */
.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(360px, 38vw, 572px);
	align-items: start;
}
.single-product div.product > .woocommerce-product-gallery { grid-column: 1; grid-row: 1; opacity: 1 !important; margin: 0; }
.single-product div.product > .summary {
	grid-column: 2;
	grid-row: 1;
	position: sticky;
	top: var(--nt-header-h);
	max-height: calc(100svh - var(--nt-header-h));
	overflow-y: auto;
	padding: 24px var(--nt-gutter) 40px 56px;
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 16px;
	align-content: start;
}
.single-product div.product > .summary > * { grid-column: 1 / -1; }

/* Galería: fotos apiladas a todo el ancho */
.woocommerce-product-gallery__wrapper { margin: 0; padding: 0; }
.woocommerce-product-gallery__image { display: block; background: #fff; }
.woocommerce-product-gallery__image + .woocommerce-product-gallery__image { margin-top: 1px; }
.woocommerce-product-gallery__image a { display: block; cursor: zoom-in; }
/* Las fotos de catálogo vienen con bandas blancas arriba y abajo: recorte cuadrado centrado */
.woocommerce-product-gallery__image img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.woocommerce-product-gallery__trigger { display: none; }

/* Cabecera de la ficha */
.nt-crumbs { grid-row: 1; margin-bottom: 32px; font-size: 13px; line-height: 20px; color: var(--nt-muted); }
.nt-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.single-product div.product > .summary > .product_title {
	grid-column: 1; grid-row: 2;
	margin: 0 0 24px;
	font-size: 16px; line-height: 24px; font-weight: 300;
}
.single-product div.product > .summary > .price {
	grid-column: 2; grid-row: 2;
	margin: 0;
	font-size: 16px; line-height: 24px;
	white-space: nowrap;
}
.single-product .price ins { text-decoration: none; }
.single-product .price del { color: var(--nt-muted); margin-right: 6px; }
.single-product .woocommerce-product-rating { grid-row: 3; margin-bottom: 16px; }
.single-product .woocommerce-product-details__short-description { margin: 0 0 16px; color: var(--nt-muted); }

/* Variaciones */
table.variations, table.variations tbody, table.variations tr, table.variations th, table.variations td {
	display: block; width: 100%; padding: 0; border: 0; text-align: left;
}
table.variations { margin: 0 0 16px; }
table.variations tr { margin-bottom: 16px; }
table.variations label { display: block; margin-bottom: 6px; font-size: 13px; line-height: 20px; color: var(--nt-muted); }
table.variations select {
	width: 100%; height: 44px; padding: 0 40px 0 12px;
	border: 1px solid #cfcfcf; border-radius: 0; background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23181818'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
	-webkit-appearance: none; appearance: none;
	font: inherit; color: inherit;
}
table.variations select:focus-visible { outline: 1px solid var(--nt-text); outline-offset: 1px; }
.reset_variations { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--nt-muted); text-decoration: underline; text-underline-offset: 3px; }
.single_variation { margin-bottom: 12px; }
.woocommerce-variation-description { display: none; } /* va al bloque «Descripción» (product.js) */
.single_variation .price { font-size: 14px; }
.single-product .stock { margin: 0 0 12px; color: var(--nt-muted); }

/* Cantidad y botón de compra */
.woocommerce-variation-add-to-cart, form.cart:not(.variations_form) { display: flex; gap: 8px; margin-bottom: 8px; }
.quantity input.qty {
	width: 72px; height: 44px; padding: 0 8px;
	border: 1px solid #cfcfcf; border-radius: 0; background: #fff;
	text-align: center; font: inherit; color: inherit;
}
.single_add_to_cart_button {
	flex: 1; height: 44px; padding: 0 16px;
	border: 0; border-radius: 0; background: var(--nt-text); color: #fff;
	font: inherit; cursor: pointer; transition: background-color .2s;
}
.single_add_to_cart_button:hover { background: #000; }
.single_add_to_cart_button.disabled, .single_add_to_cart_button:disabled { background: #9a9a9a; cursor: not-allowed; }
.wcpay-express-checkout-wrapper { margin: 8px 0 0; }

/* Datos del producto */
.product_meta { margin-top: 24px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 20px; color: var(--nt-muted); }
.product_meta a { text-decoration: underline; text-underline-offset: 3px; }

/* Bloques desplegables */
.nt-acc { margin-top: 32px; border-top: 1px solid var(--nt-line); }
.nt-acc details { border-bottom: 1px solid var(--nt-line); }
.nt-acc summary {
	display: flex; justify-content: space-between; align-items: center;
	padding: 16px 0; cursor: pointer; list-style: none;
}
.nt-acc summary::-webkit-details-marker { display: none; }
.nt-acc summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--nt-muted); }
.nt-acc details[open] > summary::after { content: "\2212"; }
.nt-acc__body { padding: 0 0 20px; color: var(--nt-muted); }
.nt-acc__body > :first-child { margin-top: 0; }
.nt-acc__body > :last-child { margin-bottom: 0; }
.nt-acc__body a { text-decoration: underline; text-underline-offset: 3px; }
.nt-acc__body table { width: 100%; border-collapse: collapse; }
.nt-acc__body th, .nt-acc__body td { text-align: left; vertical-align: top; padding: 6px 12px 6px 0; font-weight: 300; }
.nt-acc__body th { width: 35%; color: var(--nt-text); }
.nt-acc__body td p { margin: 0; }

/* Relacionados */
.single-product div.product > .related, .single-product div.product > .upsells {
	grid-column: 1 / -1; grid-row: 2;
	margin-top: 64px; border-top: 1px solid var(--nt-line);
}
.related > h2, .upsells > h2 { margin: 0; padding: 16px var(--nt-gutter); font-size: 14px; line-height: 21px; font-weight: 300; }
/* La rejilla de productos (relacionados) está en shop.css */

/* Tablet y móvil */
@media (max-width: 1024px) {
	.single-product div.product > .summary { padding-left: 32px; }
}
@media (max-width: 820px) {
	.single-product div.product { display: block; }
	.single-product div.product > .summary {
		position: static; max-height: none; overflow: visible;
		padding: 24px var(--nt-gutter) 32px;
	}
	/* Galería: tira horizontal con imán, una foto por pantalla */
	.woocommerce-product-gallery__wrapper {
		display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	}
	.woocommerce-product-gallery__wrapper::-webkit-scrollbar { display: none; }
	.woocommerce-product-gallery__image { flex: 0 0 100%; scroll-snap-align: start; }
	.woocommerce-product-gallery__image + .woocommerce-product-gallery__image { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.single_add_to_cart_button { transition: none; }
}
