/**
 * Ficha de producto Pharmavet.
 *
 * Escritorio: dos columnas (galería apilada | resumen sticky).
 * Móvil y tablet: una sola columna en el flujo natural.
 */

/* Breadcrumbs legibles sobre el fondo claro de la ficha. */
.single-product .kadence-breadcrumbs {
	display: block;
	margin-top: clamp(1.5rem, 4vw, 3rem);
	margin-bottom: 1.5rem;
	color: #34383d !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
}

.single-product .kadence-breadcrumbs .kadence-breadcrumb-container,
.single-product .kadence-breadcrumbs span {
	color: inherit !important;
}

.single-product .kadence-breadcrumbs a {
	color: #34383d !important;
	text-decoration: none !important;
}

.single-product .kadence-breadcrumbs a:hover,
.single-product .kadence-breadcrumbs a:focus-visible {
	color: #2f78ed !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

/* La galería se revela siempre, aunque el slider esté desactivado. */
.single-product .woocommerce-product-gallery {
	opacity: 1 !important;
	height: auto !important;
	width: 100% !important;
	margin-bottom: 0;
	overflow: visible !important;
}

/* Resumen limpio para el modo catálogo. */
.single-product.pharmavet-catalog-mode .summary.entry-summary > .price,
.single-product.pharmavet-catalog-mode .summary.entry-summary > .product_meta {
	display: none;
}

.single-product .summary.entry-summary .product_title {
	margin: 0 0 clamp(1.25rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.05;
}

.single-product .summary.entry-summary .woocommerce-product-details__short-description {
	margin: 0;
	color: #30343a;
	line-height: 1.55;
}

.single-product .summary.entry-summary .woocommerce-product-details__short-description p {
	margin: 0;
}

/* Ingredientes migrados desde la antigua descripción corta. */
.single-product .pharmavet-product-ingredients {
	margin-top: clamp(2.5rem, 6vw, 4rem);
	color: #30343a;
}

.single-product .pharmavet-product-ingredients p {
	margin: 0 0 .65rem;
	line-height: 1.5;
}

.single-product .pharmavet-product-ingredients .pharmavet-ingredients-heading {
	margin-bottom: .55rem;
}

.single-product .pharmavet-product-ingredients .pharmavet-ingredients-list,
.single-product .pharmavet-product-ingredients ul {
	margin: 0;
	padding-left: 1.4rem;
}

.single-product .pharmavet-product-ingredients li {
	margin-bottom: .38rem;
	padding-left: .2rem;
	line-height: 1.45;
}

/* Pedido directo por WhatsApp en modo catálogo. */
.single-product .pharmavet-product-order {
	margin-top: clamp(2.5rem, 6vw, 3.75rem);
}

.single-product .pharmavet-product-order__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .7rem;
	min-height: 52px;
	padding: .9rem 1.6rem;
	border: 0;
	border-radius: 999px;
	background: var(--pharmavet-order-color, #2f78ed);
	box-shadow: none;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .025em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition: filter 180ms ease, transform 180ms ease;
}

.single-product .pharmavet-product-order__button:hover,
.single-product .pharmavet-product-order__button:focus-visible {
	color: #fff;
	filter: brightness(.9);
	transform: translateY(-2px);
}

.single-product .pharmavet-product-order__button svg {
	flex: 0 0 auto;
}

/* Presentaciones disponibles para el producto actual. */
.single-product .pharmavet-product-presentations {
	margin-top: clamp(2.5rem, 6vw, 3.75rem);
}

.single-product .pharmavet-product-presentations__title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 700;
}

.single-product .pharmavet-product-presentations__groups {
	display: grid;
	gap: .65rem;
}

.single-product .pharmavet-product-presentations__row {
	display: grid;
	grid-template-columns: 5.25rem minmax(0, 1fr);
	align-items: center;
	gap: .65rem;
}

.single-product .pharmavet-product-presentations__type {
	font-size: .72rem;
	font-weight: 600;
}

.single-product .pharmavet-product-presentations__values {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.single-product .pharmavet-product-presentations__value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: .4rem .75rem;
	border: 1px solid #cbdccf;
	border-radius: 7px;
	background: #eff7f1;
	color: #34463a;
	font-size: .67rem;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
}

@media (max-width: 480px) {
	.single-product .pharmavet-product-presentations__row {
		grid-template-columns: 1fr;
		gap: .4rem;
	}
}

/* Imágenes apiladas verticalmente en una columna. */
.single-product .woocommerce-product-gallery .flex-viewport {
	width: 100% !important;
	height: auto !important;
	overflow: visible !important;
}

.single-product .woocommerce-product-gallery__wrapper {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	gap: 1.25rem;
	width: 100% !important;
	height: auto !important;
	transform: none !important;
	margin: 0 !important;
}

.single-product .woocommerce-product-gallery__image {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	margin: 0 !important;
	float: none !important;
	background: #f2f5f5;
	border-radius: 18px;
	overflow: hidden;
}

.single-product .woocommerce-product-gallery__image a,
.single-product .woocommerce-product-gallery__image img {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	object-fit: contain;
	border-radius: 18px;
}

/* Ocultar controles del slider si llegaran a renderizarse. */
.single-product .flex-control-thumbs,
.single-product .flex-direction-nav,
.single-product .woocommerce-product-gallery__trigger {
	display: none !important;
}

/* Contenedor solo de galería + resumen (limita el «sticky»). */
.single-product .pharmavet-product-top {
	position: relative;
}

/* Diseño de dos columnas en escritorio. */
@media (min-width: 992px) {
	.single-product .pharmavet-product-top {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-column-gap: clamp(2rem, 4vw, 4.5rem);
		align-items: start;
	}

	.single-product .pharmavet-product-top > .woocommerce-product-gallery {
		grid-column: 1;
		width: 100% !important;
		margin: 0;
	}

	.single-product .pharmavet-product-top > .summary.entry-summary {
		grid-column: 2;
		width: auto !important;
		margin: 0 !important;
		position: -webkit-sticky;
		position: sticky;
		top: var(--pharmavet-single-sticky-top, 120px);
		align-self: start;
	}

	/* La etiqueta de oferta no debe ocupar una celda del grid. */
	.single-product .pharmavet-product-top > .onsale {
		position: absolute;
		z-index: 2;
	}
}

/* Pestañas, ventas cruzadas y relacionados: ancho completo, debajo. */
.single-product .woocommerce-tabs,
.single-product .up-sells,
.single-product .upsells,
.single-product .related {
	width: 100%;
	float: none;
	clear: both;
}

/* ==========================================================================
   Pestañas de información técnica (ACF)
   ========================================================================== */
.pharmavet-product-tabs {
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
	margin-bottom: clamp(3rem, 7vw, 5.5rem);
}

.pharmavet-product-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: .85rem;
	margin-bottom: 1.5rem;
}

.pharmavet-product-tabs__tab {
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: center !important;
	gap: .6em;
	width: 100%;
	text-align: center !important;
	padding: 1em 1.35em;
	border: 0;
	border-radius: 12px;
	background: transparent !important;
	box-shadow: none !important;
	text-shadow: none;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #2a2f36 !important;
	cursor: pointer;
	transition: color .18s ease, background-color .18s ease;
}

.pharmavet-product-tabs__tab::after {
	content: "\2192";
	font-size: 1.05rem;
	line-height: 1;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity .18s ease, transform .18s ease;
}

.pharmavet-product-tabs__tab:hover,
.pharmavet-product-tabs__tab:focus {
	color: #12633f !important;
	background: #f0f5f2 !important;
}

.pharmavet-product-tabs__tab.is-active {
	color: #ffffff !important;
	background: #1D5DCB !important;
}

.pharmavet-product-tabs__tab.is-active::after {
	opacity: 1;
	transform: none;
}

.pharmavet-product-tabs__panel {
	display: none;
}

.pharmavet-product-tabs__panel.is-active {
	display: block;
}

.pharmavet-product-tabs__panel[hidden] {
	display: none;
}

.pharmavet-product-tabs__panel.is-active[hidden] {
	display: block;
}

@media (min-width: 768px) {
	.pharmavet-product-tabs {
		display: grid;
		grid-template-columns: 340px minmax(0, 1fr);
		grid-column-gap: clamp(2rem, 4vw, 4rem);
		align-items: start;
	}

	.pharmavet-product-tabs__nav {
		flex-direction: column;
		flex-wrap: nowrap;
		margin-bottom: 0;
		border-right: 1px solid #e2e5ea;
		padding-right: 1rem;
	}
}
