/* ==========================================================================
   Ficha de producto en tres columnas: galería, información y caja de compra.
   ========================================================================== */

.nh-pdp__top {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 320px;
	gap: 40px;
	align-items: start;
	margin-bottom: 48px;
}
.woocommerce div.product.nh-pdp div.summary,
.woocommerce div.product.nh-pdp .nh-pdp__media { float: none; width: auto; margin: 0; }

/* --- Galería ------------------------------------------------------------- */

.nh-pdp__media { position: sticky; top: 24px; }
.nh-gal { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; }
.nh-gal:not(:has(.nh-gal__thumbs)) { grid-template-columns: minmax(0, 1fr); }

.nh-gal__thumbs { display: flex; flex-direction: column; gap: 10px; }
.nh-gal__thumb {
	position: relative;
	width: 64px;
	height: 64px;
	padding: 4px;
	box-sizing: border-box;
	border-radius: 12px;
	border: 1px solid var(--nh-line);
	background: var(--nh-mist);
	cursor: pointer;
	overflow: hidden;
	transition: border-color .15s ease;
}
.nh-gal__thumb:hover { border-color: #94A3B8; }
.nh-gal__thumb.is-on { border: 2px solid var(--nh-blue); padding: 3px; }
.nh-gal__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.nh-gal__more {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(15, 30, 51, .6);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
}

.nh-gal__stage { position: relative; min-width: 0; }
.nh-gal__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	border-radius: 24px;
	background: var(--nh-mist);
	aspect-ratio: 1 / 1;
	outline-offset: 4px;
}
.nh-gal__track::-webkit-scrollbar { display: none; }
.nh-gal__slide {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: start;
	overflow: hidden;
	display: grid;
	place-items: center;
	cursor: zoom-in;
}
.nh-gal__slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	box-sizing: border-box;
	padding: 28px;
	transition: transform .2s ease;
	will-change: transform;
}
.nh-gal__slide.is-zoom img { transform: scale(2.2); transition: none; }

.nh-gal__stage .onsale,
.nh-gal__stage .nh-badge {
	position: absolute;
	top: 18px;
	left: 18px;
	right: auto;
	margin: 0;
	min-height: 0;
	min-width: 0;
	z-index: 2;
	padding: 6px 12px;
	font-size: 13px;
}
.nh-gal__full {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--nh-pill);
	background: #fff;
	color: var(--nh-ink);
	box-shadow: 0 6px 16px -8px rgba(15, 30, 51, .35);
	display: grid;
	place-items: center;
	cursor: pointer;
	z-index: 2;
}
.nh-gal__full:hover { color: var(--nh-blue); }
.nh-gal__hint { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--nh-muted); }
.nh-gal__dots { display: none; justify-content: center; gap: 6px; margin-top: 12px; }
.nh-gal__dots span { width: 8px; height: 8px; border-radius: 50%; background: #CBD5E1; transition: width .2s ease, background .2s ease; }
.nh-gal__dots span.is-on { width: 22px; border-radius: 4px; background: var(--nh-blue); }

/* Visor de fotos y videos */
.nh-lb[hidden] { display: none; }
.nh-lb { position: fixed; inset: 0; z-index: 9993; background: rgba(15, 30, 51, .55); display: grid; padding: 20px; }
.nh-lb__box { background: #fff; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(15,30,51,.5); display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; overflow: hidden; animation: nh-drop .18s ease-out; }
.nh-lb__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 10px 16px 0 32px; border-bottom: 1px solid var(--nh-line); }
.nh-lb__tabs { display: flex; gap: 28px; }
.nh-lb__tabs button { border: 0; background: none; padding: 12px 2px 10px; font: inherit; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--nh-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.nh-lb__tabs button:hover { color: var(--nh-ink); }
.nh-lb__tabs button.is-on { color: var(--nh-blue); border-bottom-color: var(--nh-blue); font-weight: 700; }
.nh-lb__close { align-self: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 30px; line-height: 1; color: var(--nh-ink); cursor: pointer; }
.nh-lb__close:hover { background: var(--nh-mist); }
.nh-lb__main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; min-height: 0; padding: 16px 28px 24px 32px; }
.nh-lb__stage { position: relative; min-height: 0; display: grid; }
.nh-lb__img { min-height: 0; display: grid; place-items: center; }
.nh-lb__img[hidden], .nh-lb__video[hidden] { display: none; }
.nh-lb__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nh-lb__video { min-height: 0; display: grid; place-items: center; }
.nh-lb__video iframe, .nh-lb__video video { width: 100%; height: auto; max-height: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; display: block; }
.nh-lb__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--nh-line); background: #fff; color: var(--nh-ink); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(15,30,51,.12); }
.nh-lb__btn[hidden] { display: none; }
.nh-lb__btn:hover { border-color: var(--nh-blue); color: var(--nh-blue); }
.nh-lb__prev { left: 0; }
.nh-lb__next { right: 0; }
.nh-lb__count { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); font-size: 13px; color: var(--nh-muted); }
.nh-lb__count[hidden] { display: none; }
.nh-lb__side { min-height: 0; overflow-y: auto; padding-top: 10px; }
.nh-lb__title { margin: 0 0 12px; font-family: var(--nh-font-body); font-size: 17px; font-weight: 500; line-height: 1.35; color: var(--nh-ink); }
.nh-lb__attrs { margin-bottom: 16px; }
.nh-lb__attrs p { margin: 0 0 4px; font-size: 13px; color: var(--nh-ink); }
.nh-lb__attrs span { color: var(--nh-muted); }
.nh-lb__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.nh-lb__grid[hidden], .nh-lb__vlist[hidden] { display: none; }
.nh-lb__grid button { aspect-ratio: 1; padding: 3px; border: 1px solid var(--nh-line); border-radius: 6px; background: #fff; cursor: pointer; }
.nh-lb__grid button:hover { border-color: #94A3B8; }
.nh-lb__grid button.is-on { border: 2px solid var(--nh-blue); box-shadow: 0 0 0 2px var(--nh-sky); }
.nh-lb__grid img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nh-lb__vlist { display: grid; gap: 10px; }
.nh-lb__vlist button { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--nh-line); border-radius: 10px; background: #fff; font: inherit; font-size: 13.5px; text-align: left; color: var(--nh-ink); cursor: pointer; }
.nh-lb__vlist button.is-on { border-color: var(--nh-blue); background: var(--nh-sky); }
.nh-lb__vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--nh-ink); display: grid; place-items: center; }
.nh-lb__vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nh-lb__vthumb i { position: relative; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--nh-ink); font-style: normal; font-size: 12px; display: grid; place-items: center; }

/* Miniatura de videos en la galería */
.nh-gal__vthumb { position: relative; width: 64px; height: 64px; flex: none; padding: 0; border: 1.5px solid var(--nh-line); border-radius: 12px; background: var(--nh-ink); overflow: hidden; cursor: pointer; display: grid; place-items: center; color: #fff; }
.nh-gal__vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.nh-gal__play { position: relative; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--nh-ink); display: grid; place-items: center; }
.nh-gal__vthumb small { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.nh-gal__vthumb:hover { border-color: var(--nh-blue); }
.nh-gal__vpill { display: none; position: absolute; left: 14px; bottom: 14px; z-index: 2; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: rgba(15,30,51,.82); color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
@media (max-width: 767px) { .nh-gal__vpill { display: inline-flex; } }

@media (max-width: 900px) {
	.nh-lb { padding: 0; }
	.nh-lb__box { border-radius: 0; }
	.nh-lb__head { padding-left: 16px; }
	.nh-lb__main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-content: start; gap: 12px; padding: 12px 12px 16px; }
	.nh-lb__title, .nh-lb__attrs { display: none; }
	.nh-lb__side { padding-top: 0; overflow: visible; }
	.nh-lb__grid { display: flex; overflow-x: auto; gap: 8px; }
	.nh-lb__grid button { flex: 0 0 60px; }
	.nh-lb__prev { left: 4px; } .nh-lb__next { right: 4px; }
	.nh-lb__btn { width: 40px; height: 40px; }
}

/* --- Información (centro) ------------------------------------------------ */

.nh-pdp__info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nh-pdp__info > * { margin-top: 0; margin-bottom: 0; }
.nh-brand { font-size: 14px; font-weight: 600; color: var(--nh-blue); text-decoration: none; }
.nh-brand:hover { text-decoration: underline; }
.woocommerce div.product.nh-pdp .product_title { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; margin: 0; }
.nh-best {
	align-self: flex-start;
	padding: 5px 12px;
	border-radius: var(--nh-pill);
	background: var(--nh-orange);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.nh-best:hover { background: var(--nh-orange-dark); color: #fff; }
.nh-pdp__info .woocommerce-product-rating { margin: 0; }
.woocommerce div.product.nh-pdp .nh-pdp__info p.price {
	padding-top: 14px;
	border-top: 1px solid var(--nh-line);
	font-size: 32px;
	margin: 0;
}
.nh-pdp__info .nh-itbis { margin: -6px 0 0; }

.nh-about { padding-top: 14px; border-top: 1px solid var(--nh-line); }
.nh-about__title { font-family: var(--nh-font-body); font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.nh-about .woocommerce-product-details__short-description { color: #3D4A5C; font-size: 15px; line-height: 1.6; }
.nh-about .woocommerce-product-details__short-description ul { padding-left: 20px; margin: 0; display: grid; gap: 6px; }
.nh-about .woocommerce-product-details__short-description > :first-child { margin-top: 0; }
.nh-about .woocommerce-product-details__short-description > :last-child { margin-bottom: 0; }
.nh-about__more { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; text-decoration: none; }

.nh-pdp__info .product_meta { font-size: 13px; color: var(--nh-muted); display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--nh-line); }
.nh-pdp__info .product_meta a { color: inherit; }

/* --- Caja de compra (derecha) -------------------------------------------- */

.nh-pdp__buy { position: sticky; top: 24px; }
.nh-buy {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px;
	border: 1px solid var(--nh-line);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 24px 48px -36px rgba(15, 30, 51, .4);
}
.woocommerce div.product.nh-pdp .nh-buy > p.price { font-size: 30px; margin: 0; }
.nh-buy .nh-delivery { margin: 0; border-radius: 16px; }
.nh-buy .nh-delivery__row { padding: 12px 14px; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.nh-buy .nh-delivery__icon { width: 32px; height: 32px; }
.nh-buy .nh-delivery p { flex: 1; min-width: 0; }
.nh-buy .nh-delivery strong { font-size: 14px; }
.nh-buy .nh-delivery p span { font-size: 13px; display: block; }
.nh-buy .nh-delivery em { font-size: 12.5px; margin-left: 0; }
.nh-buy .nh-secure { margin: 0; font-size: 13px; }

.woocommerce div.product.nh-pdp .nh-buy .stock { margin: 0; }
.woocommerce div.product.nh-pdp .nh-buy form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.woocommerce div.product.nh-pdp .nh-buy form.cart .quantity { margin: 0; }
.woocommerce div.product.nh-pdp .nh-buy form.cart .single_add_to_cart_button { flex: 1 1 140px; margin: 0; min-height: 50px; }
.woocommerce div.product.nh-pdp .nh-buy form.variations_form { display: block; }
.woocommerce div.product.nh-pdp .nh-buy .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; }
.woocommerce div.product.nh-pdp .nh-buy table.variations { margin-bottom: 8px; }
.woocommerce div.product.nh-pdp .nh-buy table.variations th,
.woocommerce div.product.nh-pdp .nh-buy table.variations td { display: block; padding: 0; text-align: left; }
.woocommerce div.product.nh-pdp .nh-buy table.variations select { width: 100%; height: 44px; margin: 4px 0 10px; }
.nh-buy .nh-buy-now {
	flex: 1 1 100%;
	min-height: 50px;
	border-radius: var(--nh-pill) !important;
	background: var(--nh-orange) !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 16px !important;
}
.nh-buy .nh-buy-now:hover { background: var(--nh-orange-dark) !important; }
.woocommerce div.product.nh-pdp .nh-buy form.cart .single_add_to_cart_button { background: var(--nh-blue); }
.woocommerce div.product.nh-pdp .nh-buy form.cart .single_add_to_cart_button:hover { background: var(--nh-blue-dark); }

.nh-buy .nhr-save { margin: 0; }
.nh-buy .nhr-save__btn { width: 100%; justify-content: center; }

.nh-buy__info {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 6px 14px;
	margin: 0;
	padding-top: 14px;
	border-top: 1px solid var(--nh-line);
	font-size: 13.5px;
}
.nh-buy__info dt { color: var(--nh-muted); }
.nh-buy__info dd { margin: 0; font-weight: 600; }
.nh-buy__info a { text-decoration: none; }

/* --- Pestañas ------------------------------------------------------------ */

.nh-pdp__details { scroll-margin-top: 24px; margin-top: 48px; }
.nh-pdp__details .woocommerce-tabs { padding: 28px 32px; border: 1px solid var(--nh-line); border-radius: 24px; }
.nh-pdp__details .woocommerce-tabs ul.tabs { margin-top: 0; }
.nh-pdp__details .woocommerce-Tabs-panel > h2:first-child { display: none; }
.nh-tab-link { margin-top: 16px; font-weight: 700; }

/* --- Dos columnas: la caja de compra va debajo de la información --------- */

.nh-pdp--two .nh-pdp__top { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.nh-pdp--two .nh-pdp__info { max-width: 640px; }
.nh-buy--inline { margin-top: 4px; padding: 20px; box-shadow: 0 18px 40px -34px rgba(15, 30, 51, .45); }
.nh-pdp--two .nh-about { padding-top: 14px; }
.nh-pdp--two .nh-about__title { font-size: 16px; margin-bottom: 6px; }
.nh-pdp--two .nh-about .woocommerce-product-details__short-description { font-size: 14.5px; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1180px) {
	.nh-pdp__top, .nh-pdp--two .nh-pdp__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
	.nh-pdp__buy { grid-column: 2; position: static; }
	.nh-pdp__media { grid-row: span 2; }
}

@media (max-width: 767px) {
	.nh-pdp__top, .nh-pdp--two .nh-pdp__top { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 32px; }
	.nh-pdp__media, .nh-pdp__buy { position: static; grid-column: auto; grid-row: auto; }
	.nh-gal { grid-template-columns: minmax(0, 1fr); }
	.nh-gal__thumbs, .nh-gal__hint { display: none; }
	.nh-gal__dots { display: flex; }
	.nh-gal__track { border-radius: 20px; }
	.nh-gal__slide { cursor: default; }
	.nh-gal__slide img { padding: 18px; }
	.woocommerce div.product.nh-pdp .nh-pdp__info p.price { font-size: 26px; }
	.nh-buy { padding: 18px 16px; border-radius: 20px; }
	.woocommerce div.product.nh-pdp .nh-buy > p.price { display: none; }
	.woocommerce div.product.nh-pdp .nh-buy .nh-buy-now { display: none !important; }
	.nh-lb__img { padding: 0 12px; }
	.nh-lb__prev, .nh-lb__next { display: none; }
	.nh-pdp__details .woocommerce-tabs { padding: 18px 16px; }
}
