/**
 * NNCC — Ficha de producto (single) · FASE 3.2
 *
 * Hero superior + resumen (título solo en hero). Clases compartidas con tienda:
 * .nncc-wc-shop-hero, .nncc-wc-shop-hero__inner, .nncc-wc-shop-hero__title, .nncc-wc-shop-hero__lead.
 *
 * Alcance: body.nncc-wc-single-product (inc/woocommerce.php). Tokens :root del tema.
 */

body.nncc-wc-single-product #woocommerce-wrapper {
	overflow-x: hidden;
	padding-top: 0;
}

body.nncc-wc-single-product .site-main,
body.nncc-wc-single-product .content-area {
	padding-top: 0;
}

/* -------------------------------------------------------------------------
   Hero superior (coherente con tienda principal sin imagen de fondo por defecto)
------------------------------------------------------------------------- */
body.nncc-wc-single-product .nncc-wc-shop-hero.nncc-wc-single-product-hero {
	margin-top: 0;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: clamp(16px, 3vw, 32px);
	width: 100vw;
	max-width: 100vw;
	box-sizing: border-box;
	padding-top: 1.5rem;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	padding-bottom: clamp(20px, 3.5vw, 40px);
	background-color: var(--nncc-black);
	color: var(--nncc-white);
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.nncc-wc-single-product .nncc-wc-single-product-hero .nncc-wc-shop-hero__inner {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 0.25rem;
}

body.nncc-wc-single-product .nncc-wc-single-product-hero__breadcrumb {
	margin-bottom: 1rem;
}

body.nncc-wc-single-product .nncc-wc-single-product-hero .woocommerce-breadcrumb {
	margin-top: 0;
	margin-bottom: 0;
	font-size: 0.88rem;
	color: rgba(255, 255, 255, 0.78);
}

body.nncc-wc-single-product .nncc-wc-single-product-hero .woocommerce-breadcrumb a {
	color: rgba(255, 255, 255, 0.92);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

body.nncc-wc-single-product .nncc-wc-single-product-hero .woocommerce-breadcrumb a:hover {
	color: #fff;
	border-bottom-color: #fff;
}

body.nncc-wc-single-product .nncc-wc-shop-hero.nncc-wc-single-product-hero .nncc-wc-shop-hero__title {
	font-size: clamp(1.65rem, 2.8vw, 2.15rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--nncc-white);
	letter-spacing: -0.02em;
	margin: 0 0 0.5rem;
}

body.nncc-wc-single-product .nncc-wc-shop-hero.nncc-wc-single-product-hero .nncc-wc-shop-hero__title::after {
	content: '';
	display: block;
	width: 3rem;
	height: 4px;
	margin-top: 0.65rem;
	background: var(--nncc-yellow);
	border-radius: 2px;
}

body.nncc-wc-single-product .nncc-wc-shop-hero.nncc-wc-single-product-hero .nncc-wc-shop-hero__lead {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.88);
	margin: 0.35rem 0 0;
	max-width: 38rem;
}

@media (min-width: 768px) {
	body.nncc-wc-single-product .nncc-wc-shop-hero.nncc-wc-single-product-hero {
		padding-top: 2rem;
		padding-left: 1.5rem;
		padding-right: 1.5rem;
		padding-bottom: clamp(24px, 4vw, 44px);
	}
}

/* El título del producto vive en el hero; el summary empieza con rating/precio. */
body.nncc-wc-single-product .summary > .woocommerce-product-rating {
	margin-top: 0;
}

/* -------------------------------------------------------------------------
   Precio (incl. ofertas) — complementa tamaño/peso ya definidos en style.css
------------------------------------------------------------------------- */
body.nncc-wc-single-product .summary .price {
	margin-top: 0;
	margin-bottom: 14px;
}

body.nncc-wc-single-product div.product p.price del,
body.nncc-wc-single-product div.product span.price del {
	opacity: 0.75;
	font-weight: 600;
	font-size: 0.92em;
}

body.nncc-wc-single-product div.product p.price ins,
body.nncc-wc-single-product div.product span.price ins {
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Galería: radios y miniaturas sin tocar el layout flex de Woo
------------------------------------------------------------------------- */
body.nncc-wc-single-product .woocommerce-product-gallery__wrapper {
	border-radius: 12px;
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-viewport {
	border-radius: 12px;
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-control-thumbs {
	margin-top: 10px;
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-control-thumbs li {
	margin: 0 6px 8px 0;
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-control-thumbs img {
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	opacity: 0.88;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-control-thumbs img:hover {
	opacity: 1;
	border-color: rgba(0, 0, 0, 0.18);
}

body.nncc-wc-single-product .woocommerce-product-gallery .flex-control-thumbs li.flex-active img {
	opacity: 1;
	border-color: rgba(0, 0, 0, 0.22);
}

/* -------------------------------------------------------------------------
   Bajada corta
------------------------------------------------------------------------- */
body.nncc-wc-single-product .woocommerce-product-details__short-description {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: rgba(0, 0, 0, 0.72);
	max-width: 38rem;
}

/* -------------------------------------------------------------------------
   Stock (salida de wc_get_stock_html)
------------------------------------------------------------------------- */
body.nncc-wc-single-product p.stock {
	font-weight: 700;
	color: var(--nncc-black);
}

/* -------------------------------------------------------------------------
   Formulario compra (.nncc-single-cart-form ya usa flex + gap en style.css)
------------------------------------------------------------------------- */
body.nncc-wc-single-product .quantity input.qty:focus-visible {
	outline: 2px solid var(--nncc-black);
	outline-offset: 2px;
}

body.nncc-wc-single-product .nncc-wc-add-to-cart:focus-visible {
	outline: 2px solid var(--nncc-black);
	outline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Metadatos (SKU, categorías, etiquetas)
------------------------------------------------------------------------- */
body.nncc-wc-single-product .product_meta {
	font-size: 0.92rem;
	line-height: 1.65;
	color: rgba(0, 0, 0, 0.72);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	padding-top: 1rem;
	margin-top: 1rem;
}

body.nncc-wc-single-product .product_meta > span {
	display: block;
	margin-bottom: 0.35rem;
}

body.nncc-wc-single-product .product_meta a {
	color: var(--nncc-black);
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.22);
	text-underline-offset: 2px;
}

body.nncc-wc-single-product .product_meta a:hover {
	text-decoration-color: var(--nncc-black);
}

/* -------------------------------------------------------------------------
   Tabs y paneles (refuerzo de foco; base visual ya en style.css)
------------------------------------------------------------------------- */
body.nncc-wc-single-product .woocommerce-tabs ul.tabs li a:focus-visible,
body.nncc-wc-single-product .woocommerce-Tabs ul.tabs li a:focus-visible {
	outline: 2px solid var(--nncc-black);
	outline-offset: 2px;
	border-radius: 8px;
}

body.nncc-wc-single-product .woocommerce-Tabs-panel,
body.nncc-wc-single-product .woocommerce-tabs .panel {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

body.nncc-wc-single-product table.shop_attributes {
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

body.nncc-wc-single-product table.shop_attributes th,
body.nncc-wc-single-product table.shop_attributes td {
	padding: 10px 14px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.nncc-wc-single-product table.shop_attributes tr:last-child th,
body.nncc-wc-single-product table.shop_attributes tr:last-child td {
	border-bottom: 0;
}

/* -------------------------------------------------------------------------
   Relacionados y upsells: jerarquía de sección + alineación con listado tienda
   (las cards ya heredan .woocommerce ul.products de style.css)
------------------------------------------------------------------------- */
body.nncc-wc-single-product section.related.products,
body.nncc-wc-single-product section.upsells.products {
	margin-top: 2rem;
	padding-top: 1.75rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.nncc-wc-single-product section.related.products > h2,
body.nncc-wc-single-product section.upsells.products > h2 {
	font-size: clamp(1.15rem, 1.9vw, 1.4rem);
	font-weight: 800;
	color: var(--nncc-black);
	margin: 0 0 1.1rem;
	letter-spacing: -0.02em;
}

body.nncc-wc-single-product section.related.products ul.products,
body.nncc-wc-single-product section.upsells.products ul.products {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
   Badge oferta en galería
------------------------------------------------------------------------- */
body.nncc-wc-single-product div.product span.onsale {
	background: var(--nncc-yellow);
	color: var(--nncc-black);
	border: 2px solid var(--nncc-black);
	border-radius: var(--nncc-btn-radius);
	font-weight: 800;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	min-height: 2rem;
	line-height: 1.1;
	padding: 0.35rem 0.65rem;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}
