/**
 * Ficha de producto individual — Farmacia Blocks.
 */

body.farmacia-product-single-active .site-content,
body.farmacia-product-single-active #primary {
	background: #f0f8ff;
}

body.farmacia-product-single-active #primary,
body.farmacia-product-single-active .site-content > .ast-container #primary {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

body.farmacia-product-single-active .woocommerce-breadcrumb,
body.farmacia-product-single-active .summary.entry-summary,
body.farmacia-product-single-active .woocommerce-product-gallery,
body.farmacia-product-single-active .woocommerce-tabs,
body.farmacia-product-single-active .related.products {
	display: none !important;
}

body.farmacia-product-single-active .woocommerce-notices-wrapper,
body.farmacia-product-single-active .woocommerce-message,
body.farmacia-product-single-active .woocommerce-info,
body.farmacia-product-single-active .woocommerce-error {
	display: none !important;
}

/* Aviso personalizado: producto añadido al carrito */
.farmacia-ps-cart-toast {
	--ps-cart-toast-duration: 5s;
	position: fixed;
	left: 0;
	right: 0;
	z-index: 100050;
	box-sizing: border-box;
	padding: 0 1rem;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
	pointer-events: none;
}

.farmacia-ps-cart-toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.farmacia-ps-cart-toast[hidden] {
	display: block !important;
}

.farmacia-ps-cart-toast[hidden]:not(.is-visible) {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.farmacia-ps-cart-toast__inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	background: #fff;
	border: 0;
	border-radius: 12px;
	overflow: hidden;
	box-sizing: border-box;
	font-family: "Open Sans", var(--ps-font, sans-serif);
	box-shadow: 0 8px 24px rgba(27, 42, 73, 0.12);
}

.farmacia-ps-cart-toast__content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem 0.85rem 1.15rem;
}

.farmacia-ps-cart-toast__progress {
	position: relative;
	height: 4px;
	width: 100%;
	background: #e8eef5;
	overflow: hidden;
}

.farmacia-ps-cart-toast__progress-bar {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	width: 100%;
	height: 100%;
	background: #1b2a49;
	transform: none;
	will-change: width;
}

.farmacia-ps-cart-toast__progress-bar.is-running {
	animation: farmacia-ps-cart-toast-progress 5s linear forwards;
}

@keyframes farmacia-ps-cart-toast-progress {
	from {
		width: 100%;
	}
	to {
		width: 0%;
	}
}

.farmacia-ps-cart-toast__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.farmacia-ps-cart-toast__icon-svg {
	display: block;
	width: 22px;
	height: 22px;
}

.farmacia-ps-cart-toast__message {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ps-navy);
}

.farmacia-ps-cart-toast__btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 1.15rem;
	border: 0;
	border-radius: 10px;
	background: var(--ps-navy);
	color: #fff !important;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.farmacia-ps-cart-toast__btn:hover,
.farmacia-ps-cart-toast__btn:focus,
.farmacia-ps-cart-toast__btn:focus-visible {
	background: var(--ps-navy) !important;
	color: #fff !important;
	opacity: 1 !important;
	outline: none;
	box-shadow: none;
}

.farmacia-ps-cart-toast__close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ps-navy);
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

body.farmacia-product-single-active .farmacia-ps-cart-toast__close:hover,
body.farmacia-product-single-active .farmacia-ps-cart-toast__close:focus,
body.farmacia-product-single-active .farmacia-ps-cart-toast__close:focus-visible,
body.farmacia-product-single-active .farmacia-ps-cart-toast__close:active,
.farmacia-ps-cart-toast__close:hover,
.farmacia-ps-cart-toast__close:focus,
.farmacia-ps-cart-toast__close:focus-visible,
.farmacia-ps-cart-toast__close:active {
	background: transparent !important;
	border: 0 !important;
	color: var(--ps-navy) !important;
	opacity: 0.65;
	outline: none !important;
	box-shadow: none !important;
}

@media (max-width: 640px) {
	.farmacia-ps-cart-toast {
		padding: 0 0.65rem;
	}

	.farmacia-ps-cart-toast__content {
		flex-wrap: wrap;
		padding: 0.75rem 0.85rem;
	}

	.farmacia-ps-cart-toast__message {
		flex: 1 1 calc(100% - 34px);
		font-size: 0.875rem;
	}

	.farmacia-ps-cart-toast__btn {
		margin-left: 34px;
	}
}

.farmacia-ps {
	--ps-bg: #f0f8ff;
	--ps-navy: #1b2a49;
	--ps-green: #1b5e20;
	--ps-green-bright: #047752;
	--ps-link: #1b2a49;
	--ps-muted: #6b7280;
	--ps-panel: #ffffff;
	--ps-border: #EAF8FB;
	--ps-radius: 16px;
	--ps-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ps-hero-gallery-width: 600px;
	--ps-hero-info-width: 341px;
	--ps-hero-purchase-width: 227px;
	--ps-hero-gap: 1.25rem;

	box-sizing: border-box;
	font-family: var(--ps-font);
	background: var(--ps-bg);
	padding: 1.5rem 0 3rem;
	max-width: 1240px;
	margin: 0 auto;
	color: var(--ps-navy);
}

.farmacia-ps *,
.farmacia-ps *::before,
.farmacia-ps *::after {
	box-sizing: border-box;
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	grid-column: 1 / -1;
	margin-bottom: 1.25rem;
	font-family: "Open Sans", var(--ps-font);
	font-weight: 600;
	font-style: normal;
	font-size: 16px;
	line-height: 1;
	letter-spacing: 0;
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-link,
.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-current {
	display: inline-flex;
	align-items: center;
	font: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-link {
	color: var(--ps-link);
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-current {
	color: var(--ps-navy);
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-sep {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	flex-shrink: 0;
}

.farmacia-ps__breadcrumbs.farmacia-cat-archive__breadcrumbs .farmacia-cat-archive__crumb-sep-icon {
	display: block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.farmacia-ps__inner {
	display: grid;
	grid-template-columns: var(--ps-hero-gallery-width) var(--ps-hero-info-width) var(--ps-hero-purchase-width);
	gap: var(--ps-hero-gap);
	align-items: start;
}

/* Hero 3 columnas — galería | info | compra */
.farmacia-ps__hero {
	display: contents;
}

.farmacia-ps__details,
.farmacia-ps__related {
	grid-column: 1 / 3;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* Hero 3 columnas — info 341px, compra 227px; galería 600px (cabe en contenedor 1240px) */
.farmacia-ps__hero-gallery,
.farmacia-ps__hero-info,
.farmacia-ps__purchase-inner {
	background: var(--ps-panel);
	border-radius: var(--ps-radius);
	box-shadow: 0 4px 24px rgba(27, 42, 73, 0.08);
}

.farmacia-ps__hero-gallery {
	display: flex;
	flex-direction: column;
	width: auto;
	max-width: none;
	min-width: 0;
	min-height: 0;
	box-sizing: border-box;
	padding: 1rem;
}

.farmacia-ps__hero-gallery .farmacia-ps__gallery {
	flex: 1;
	align-items: stretch;
	min-height: 0;
}

.farmacia-ps__hero-info {
	display: flex;
	flex-direction: column;
	width: auto;
	max-width: none;
	box-sizing: border-box;
	padding: 1.15rem 1.25rem;
	min-height: 0;
	overflow: hidden;
}

.farmacia-ps__hero-info-preview {
	margin-top: 0.55rem;
	opacity: 1;
	overflow: hidden;
	transition:
		opacity 0.32s ease,
		max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1),
		margin 0.32s ease,
		flex 0.32s ease;
}

.farmacia-ps__hero-info:not(.is-expanded) .farmacia-ps__hero-info-preview {
	flex: 1;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__hero-info-preview {
	flex: 0;
	max-height: 0;
	margin-top: 0;
	opacity: 0;
	pointer-events: none;
}

.farmacia-ps__hero-info-excerpt {
	margin: 0 0 0.55rem;
	color: var(--ps-muted);
	font-size: 0.84rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.farmacia-ps__hero-info-excerpt--placeholder {
	font-style: italic;
	opacity: 0.9;
	-webkit-line-clamp: unset;
	display: block;
}

.farmacia-ps__hero-info-preview-block {
	padding-top: 0.55rem;
	margin-top: 0.45rem;
	border-top: 1px solid var(--ps-border);
}

.farmacia-ps__hero-info-preview-block:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.farmacia-ps__hero-info-preview-title {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.45rem;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ps-navy);
}

.farmacia-ps__hero-info-preview-title .farmacia-ps__section-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	opacity: 0.8;
}

.farmacia-ps__hero-info-preview-text {
	margin: 0;
	color: var(--ps-muted);
	font-size: 0.8rem;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.farmacia-ps__hero-info-sede-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.farmacia-ps__hero-info-sede-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.45rem;
	padding: 0.38rem 0.55rem;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	min-width: 0;
}

.farmacia-ps__hero-info-sede-row.is-active-sede {
	background: #f0f8ff;
	border-color: #b8d9f0;
}

.farmacia-ps__hero-info-sede-row-label {
	flex: 1;
	min-width: 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ps-navy);
	line-height: 1.3;
}

.farmacia-ps__hero-info-sede-row .farmacia-ps__sede-status {
	flex-shrink: 0;
	padding: 0.12rem 0.4rem;
	font-size: 0.66rem;
}

.farmacia-ps__hero-info-hints {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.farmacia-ps__hero-info-hint {
	position: relative;
	padding-left: 0.85rem;
	color: var(--ps-muted);
	font-size: 0.78rem;
	line-height: 1.4;
}

.farmacia-ps__hero-info-hint::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.48em;
	width: 0.32rem;
	height: 0.32rem;
	border-radius: 50%;
	background: #7eb8dc;
}

.farmacia-ps__hero-info-expand {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__hero-info-expand {
	grid-template-rows: 1fr;
}

.farmacia-ps__hero-info-expand-inner {
	overflow: hidden;
	min-height: 0;
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__hero-info-expand-inner {
	overflow-y: auto;
	margin-top: 0.35rem;
}

.farmacia-ps__hero-info:not(.is-expanded) .farmacia-ps__title {
	margin: 0;
	font-size: clamp(1.05rem, 1.6vw, 1.3rem);
	line-height: 1.25;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__title {
	margin: 0 0 0.5rem;
	animation: farmacia-ps-hero-title-in 0.35s ease;
}

@keyframes farmacia-ps-hero-title-in {
	from {
		opacity: 0.7;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.farmacia-ps__hero-info-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0.4rem;
	margin-top: auto;
	padding: 0.5rem 0 0;
	border: 0;
	background: none;
	color: var(--ps-navy);
	font-family: var(--ps-font);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	text-align: left;
	text-decoration: none;
}

.farmacia-ps__hero-info-toggle [data-ps-hero-info-toggle-label] {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.farmacia-ps__hero-info-toggle-icon {
	flex-shrink: 0;
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__hero-info-toggle-icon {
	transform: rotate(180deg);
}

.farmacia-ps__hero-info.is-animating .farmacia-ps__hero-info-expand-inner {
	overflow: hidden;
}

.farmacia-ps__hero-info-toggle:hover,
.farmacia-ps__hero-info-toggle:focus,
.farmacia-ps__hero-info-toggle:focus-visible,
.farmacia-ps__hero-info-toggle:active {
	color: #0f4f82;
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	outline: none;
}

.farmacia-ps__hero-info.is-expanded .farmacia-ps__hero-info-toggle {
	margin-top: 0.75rem;
	padding-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	.farmacia-ps__hero-info-preview,
	.farmacia-ps__hero-info-expand,
	.farmacia-ps__hero-info-toggle-icon,
	.farmacia-ps__hero-info.is-expanded .farmacia-ps__title {
		transition: none;
		animation: none;
	}
}

@media (min-width: 768px) {
	.farmacia-ps__hero-info.is-height-synced:not(.is-expanded) {
		min-height: var(--ps-hero-info-min-h, auto);
	}
}

.farmacia-ps__purchase {
	align-self: start;
	width: auto;
	max-width: none;
	min-width: 0;
	box-sizing: border-box;
}

/* Galería */
.farmacia-ps__gallery {
	display: flex;
	gap: 1rem;
	align-items: stretch;
	width: 100%;
	min-height: 0;
}

.farmacia-ps__gallery-thumbs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	flex-shrink: 0;
	width: 106px;
	max-width: 106px;
	min-width: 106px;
}

.farmacia-ps__gallery-thumb {
	display: block;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	overflow: hidden;
	width: 106px;
	height: 106px;
	box-sizing: border-box;
}

.farmacia-ps__gallery-thumbs span.farmacia-ps__gallery-thumb {
	cursor: default;
}

.farmacia-ps__gallery-thumb.is-active {
	border-color: #d7d7d7;
}

/* Solo imagen principal: miniatura a la izquierda + vista grande */
.farmacia-ps__gallery--main-only {
	display: flex;
}

.farmacia-ps__gallery--main-only .farmacia-ps__gallery-thumbs {
	flex-shrink: 0;
}

.farmacia-ps__gallery--empty {
	display: block;
}

.farmacia-ps__gallery--empty .farmacia-ps__gallery-main,
.farmacia-ps__gallery-main--solo {
	width: 100%;
}

.farmacia-ps__gallery--empty .farmacia-ps__gallery-slide,
.farmacia-ps__gallery-main--solo .farmacia-ps__gallery-slide {
	display: block;
}

.farmacia-ps__gallery-thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.farmacia-ps__gallery-main {
	flex: 1;
	min-width: 0;
	position: relative;
	border-radius: 12px;
	background: #fff;
	min-height: 280px;
	display: flex;
	align-items: normal;
	justify-content: center;
}

body.farmacia-product-single-active .farmacia-ps__gallery figure,
body.farmacia-product-single-active .farmacia-ps__gallery-slide,
body.farmacia-product-single-active .farmacia-ps__gallery-slide img,
body.farmacia-product-single-active .farmacia-ps__gallery-image,
body.farmacia-product-single-active .farmacia-ps__gallery-thumb-img {
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	-moz-box-shadow: none !important;
}

.farmacia-ps__gallery-slide {
	display: none;
	margin: 0;
	width: 100%;
	box-shadow: none;
}

.farmacia-ps__gallery-slide.is-active {
	display: block;
}

.farmacia-ps__gallery-image {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	border: 1px solid #D7D7D7;
	border-radius: 16px !important;
}

.farmacia-ps__gallery-main .farmacia-ps__gallery-slide img {
	border-radius: 16px;
}

/* Info columna */
.farmacia-ps__title {
	margin: 0 0 0.75rem;
	font-family: "Nunito", var(--ps-font);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ps-navy);
}

.farmacia-ps__hero-info .farmacia-ps__desc {
	margin-bottom: 0.85rem;
	font-size: 0.88rem;
	line-height: 1.5;
}

.farmacia-ps__hero-info .farmacia-ps__section {
	padding: 0.75rem 0;
}

.farmacia-ps__hero-info .farmacia-ps__section-title {
	margin-bottom: 0.45rem;
	font-size: 0.88rem;
}

.farmacia-ps__hero-info .farmacia-ps__section-body,
.farmacia-ps__hero-info .farmacia-ps__sede-list {
	font-size: 0.84rem;
	line-height: 1.45;
}

.farmacia-ps__hero-info .farmacia-ps__sede-list--availability {
	gap: 0.45rem;
}

.farmacia-ps__hero-info .farmacia-ps__sede-item {
	padding: 0.5rem 0.65rem;
	gap: 0.35rem;
}

.farmacia-ps__desc {
	color: var(--ps-muted);
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1.25rem;
}

.farmacia-ps__section {
	padding: 1rem 0;
	border-top: 1px solid var(--ps-border);
}

.farmacia-ps__section:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.farmacia-ps__section-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--ps-navy);
}

.farmacia-ps__section-icon {
	flex-shrink: 0;
	color: var(--ps-navy);
	opacity: 0.75;
}

.farmacia-ps__section-body,
.farmacia-ps__sede-list {
	margin: 0;
	color: var(--ps-muted);
	font-size: 0.9rem;
	line-height: 1.55;
}

.farmacia-ps__sede-list--availability {
	list-style: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.farmacia-ps__sede-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.7rem 0.85rem;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	min-width: 0;
}

.farmacia-ps__sede-item.is-active-sede {
	background: #f0f8ff;
	border-color: #b8d9f0;
	box-shadow: inset 0 0 0 1px rgba(27, 42, 73, 0.04);
}

.farmacia-ps__sede-label {
	display: block;
	width: 100%;
	font-size: 0.84rem;
	font-weight: 500;
	color: var(--ps-navy);
	line-height: 1.45;
	word-break: break-word;
}

.farmacia-ps__sede-item.is-active-sede .farmacia-ps__sede-label {
	font-weight: 700;
}

.farmacia-ps__sede-status {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.25;
	white-space: nowrap;
	max-width: 100%;
}

.farmacia-ps__sede-status-dot {
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 50%;
	flex-shrink: 0;
	background: currentColor;
}

.farmacia-ps__sede-status--in {
	color: #047752;
	background: #ecfdf3;
}

.farmacia-ps__sede-status--out {
	color: #b91c1c;
	background: #fef2f2;
}

.farmacia-ps__sede-status--low {
	color: #b45309;
	background: #fffbeb;
}

.farmacia-ps__sede-status--loading {
	color: #64748b;
	background: #f1f5f9;
}

.farmacia-ps__sede-status--loading .farmacia-ps__sede-status-dot {
	opacity: 0.45;
	animation: farmacia-ps-sede-pulse 1s ease-in-out infinite;
}

@keyframes farmacia-ps-sede-pulse {
	0%,
	100% {
		opacity: 0.35;
	}
	50% {
		opacity: 1;
	}
}

.farmacia-ps__sede-list:not(.farmacia-ps__sede-list--availability) {
	padding-left: 1.1rem;
}

.farmacia-ps__sede-list:not(.farmacia-ps__sede-list--availability) li + li {
	margin-top: 0.35rem;
}

.farmacia-ps__sede-list:not(.farmacia-ps__sede-list--availability) li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
}

.farmacia-ps__sede-stock {
	color: #047752;
	font-size: 0.92em;
}

.farmacia-ps__sede-list li.is-active-sede .farmacia-ps__sede-stock {
	font-weight: 600;
}

.farmacia-ps__purchase [hidden] {
	display: none !important;
}

.farmacia-ps__attrs {
	margin: 0;
	padding-left: 1.1rem;
}

/* Tarjeta compra */
.farmacia-ps__purchase-inner {
	padding: 1.15rem 2rem;
	position: sticky;
	top: 1rem;
	width: 100%;
	box-sizing: border-box;
}

.farmacia-ps__purchase-pricing {
	width: 100%;
	margin-bottom: 1rem;
	text-align: right;
}

/* Anula .nj-price-block { inline-block; width:auto } del currency-switcher */
.farmacia-ps__purchase .nj-price-block.farmacia-ps-purchase__price-main {
	display: block;
	width: 90%;
	max-width: 90%;
	margin-left: auto;
	margin-right: 0;
	box-sizing: border-box;
	text-align: right;
}

.farmacia-ps-purchase__price-main {
	display: block;
	width: 90%;
	max-width: 90%;
	margin-left: auto;
	margin-right: 0;
	box-sizing: border-box;
	text-align: right;
}

.farmacia-ps-purchase__price-main .nj-price-main {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	width: 100%;
	gap: 0.15rem;
	font-family: "Open Sans", var(--ps-font);
	font-weight: 400;
	font-size: 24px;
	line-height: 1;
	color: #00c853;
}

.farmacia-ps-purchase__price-main .nj-price-main__sym,
.farmacia-ps-purchase__price-main .nj-price-main__amount {
	font-family: "Open Sans", var(--ps-font);
	font-weight: 400;
	font-size: 24px;
	line-height: 1;
	color: #00c853;
}

.farmacia-ps-purchase__price-alts {
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
	pointer-events: auto !important;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 0.5rem;
	width: 100% !important;
	min-width: 0 !important;
	padding: 0.35rem 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-top: 1.5px solid #eaf8fb;
	border-bottom: 1.5px solid #eaf8fb;
	border-left: 0;
	border-right: 0;
	border-radius: 0;
}

.farmacia-ps-purchase__price-alts .nj-price-preview__item {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 0.2rem;
	font-family: "Open Sans", var(--ps-font);
	font-weight: 600;
	font-size: 16px;
	line-height: 0.95;
	letter-spacing: 0;
	text-align: right;
	color: var(--ps-navy);
	border: 0 !important;
	padding: 0.2rem 0 !important;
	margin: 0 !important;
}

.farmacia-ps-purchase__price-alts .nj-price-preview__sym,
.farmacia-ps-purchase__price-alts .nj-price-preview__amount {
	font-family: inherit;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.farmacia-ps-purchase__price-alts .nj-price-preview__item:not([hidden]) ~ .nj-price-preview__item:not([hidden]) {
	border-top: 0 !important;
	padding-top: 0.2rem !important;
	margin-top: 0 !important;
}

.farmacia-ps__purchase-label {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 0.35rem;
}

.farmacia-ps__stock--in {
	color: var(--ps-green-bright);
	font-weight: 700;
	font-size: 0.9rem;
}

.farmacia-ps__stock--out {
	color: #b91c1c;
	font-weight: 700;
}

.farmacia-ps__stock--low {
	color: #b45309;
	font-weight: 600;
	font-size: 0.9rem;
}

.farmacia-ps__stock--loading {
	color: var(--ps-muted);
	font-weight: 500;
	font-size: 0.88rem;
}

.farmacia-ps__purchase-availability.is-loading .farmacia-ps__stock--loading {
	opacity: 0.85;
}

.farmacia-ps__purchase-pricing.is-loading {
	opacity: 0.7;
}

.farmacia-ps__stock-qty {
	display: block;
	font-size: 0.8rem;
	color: var(--ps-muted);
	margin-top: 0.15rem;
}

.farmacia-ps__purchase-availability {
	margin-bottom: 1rem;
}

.farmacia-ps__qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	background: #f0f8ff;
	border-radius: 999px;
	padding: 0.45rem 0.55rem;
	margin-bottom: 1rem;
	width: 167px;
	max-width: 100%;
	min-height: 36px;
	box-sizing: border-box;
}

.farmacia-ps__qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	min-width: 14px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	line-height: 0;
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-btn:hover,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-btn:focus,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-btn:focus-visible,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-btn:active,
.farmacia-ps__qty-btn:hover,
.farmacia-ps__qty-btn:focus,
.farmacia-ps__qty-btn:focus-visible,
.farmacia-ps__qty-btn:active {
	background: transparent !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.farmacia-ps__qty-btn svg {
	display: block;
	width: 14px;
	height: 14px;
}

.farmacia-ps__qty-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.15rem;
	flex: 1;
	min-width: 0;
}

/* Anula estilos globales de WooCommerce/Astra en inputs de cantidad */
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-input,
body.farmacia-product-single-active.woocommerce .farmacia-ps .farmacia-ps__qty-input,
body.farmacia-product-single-active.woocommerce-js .farmacia-ps .farmacia-ps__qty-input,
.farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-input {
	width: 29px !important;
	min-width: 29px !important;
	max-width: 29px !important;
	height: 28px !important;
	min-height: 28px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	border-radius: 6px !important;
	background: #fff !important;
	box-sizing: border-box !important;
	text-align: center !important;
	text-indent: 0 !important;
	font-family: var(--ps-font) !important;
	font-weight: 700 !important;
	font-size: 1rem !important;
	line-height: 28px !important;
	color: var(--ps-green-bright) !important;
	-webkit-appearance: none !important;
	-moz-appearance: textfield !important;
	appearance: none !important;
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-input:focus,
.farmacia-ps .farmacia-ps__qty .farmacia-ps__qty-input:focus {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: #fff !important;
}

.farmacia-ps__qty-input {
	width: 29px;
	min-width: 29px;
	max-width: 29px;
	height: 28px;
	padding: 0;
	border: 0;
	outline: 0;
	box-shadow: none;
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
	text-align: center;
	font-family: var(--ps-font);
	font-weight: 700;
	font-size: 1rem;
	line-height: 28px;
	color: var(--ps-green-bright);
	-moz-appearance: textfield;
	appearance: textfield;
}

.farmacia-ps__qty-input:focus {
	border: 0;
	outline: 0;
	box-shadow: none;
	background: #fff;
}

.farmacia-ps__qty-input::-webkit-outer-spin-button,
.farmacia-ps__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.farmacia-ps__qty-unit {
	font-family: "Open Sans", var(--ps-font);
	font-weight: 400;
	font-style: normal;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0;
	color: var(--ps-green-bright);
	padding-left: 10px;
}

.farmacia-ps__cart-form {
	display: none;
}

.farmacia-ps__purchase-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.farmacia-ps__buy-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	width: 100%;
}

.farmacia-ps__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.85rem 1rem;
	border-radius: 12px;
	font-family: var(--ps-font);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	border: 2px solid transparent;
	transition: opacity 0.15s ease;
}

.farmacia-ps__btn--whatsapp {
	align-self: flex-start;
	width: auto;
	max-width: 100%;
	padding: 0.5rem 0.85rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.35rem;
	background: #25d366;
	border-color: #25d366;
	color: #fff;
	text-decoration: none;
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--whatsapp:hover,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--whatsapp:focus,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--whatsapp:focus-visible,
.farmacia-ps__btn--whatsapp:hover,
.farmacia-ps__btn--whatsapp:focus,
.farmacia-ps__btn--whatsapp:focus-visible {
	background: #1ebe57;
	border-color: #1ebe57;
	color: #fff;
	opacity: 1;
}

.farmacia-ps__btn--whatsapp svg {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.farmacia-ps__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.farmacia-ps__btn--add {
	background: #fff;
	border-color: var(--ps-green-bright);
	color: var(--ps-green-bright);
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--add:hover,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--add:focus,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--add:focus-visible,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--add:active,
.farmacia-ps__btn--add:hover:not(:disabled),
.farmacia-ps__btn--add:focus:not(:disabled),
.farmacia-ps__btn--add:focus-visible:not(:disabled),
.farmacia-ps__btn--add:active:not(:disabled) {
	background: #fff !important;
	border-color: var(--ps-green-bright) !important;
	color: var(--ps-green-bright) !important;
	opacity: 1 !important;
	box-shadow: none !important;
	outline: none !important;
}

.farmacia-ps__btn--buy {
	background: var(--ps-navy);
	border-color: var(--ps-navy);
	color: #fff;
}

.farmacia-ps__btn--add.is-loading,
.farmacia-ps__btn--buy.is-loading {
	cursor: wait;
	opacity: 0.72;
	pointer-events: none;
}

.farmacia-ps__btn--add.is-loading::after,
.farmacia-ps__btn--buy.is-loading::after {
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: farmacia-ps-btn-spin 0.8s linear infinite;
	content: "";
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--buy:hover,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--buy:focus,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--buy:focus-visible,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__btn--buy:active,
.farmacia-ps__btn--buy:hover:not(:disabled),
.farmacia-ps__btn--buy:focus:not(:disabled),
.farmacia-ps__btn--buy:focus-visible:not(:disabled),
.farmacia-ps__btn--buy:active:not(:disabled) {
	background: var(--ps-navy) !important;
	border-color: var(--ps-navy) !important;
	color: #fff !important;
	opacity: 1 !important;
	box-shadow: none !important;
	outline: none !important;
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite {
	background: #fff;
	border-color: #e2e8f0;
	color: var(--ps-navy);
	min-height: 0;
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite:hover:not(.is-loading),
.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite:focus-visible:not(.is-loading) {
	background: #fff;
	border-color: #f0b323;
	color: var(--ps-navy);
	outline: none;
	opacity: 1;
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite.is-active {
	border-color: #f0b323;
	color: var(--ps-navy);
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite .farmacia-favorite-toggle__icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

@keyframes farmacia-ps-btn-spin {
	to {
		transform: rotate(360deg);
	}
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite:not(.is-active) .farmacia-favorite-toggle__icon path {
	fill: #c4c9d1;
}

.farmacia-ps__purchase-actions .farmacia-ps__btn--favorite.is-active .farmacia-favorite-toggle__icon path {
	fill: #f0b323;
}

.farmacia-ps__btn-favorite-label {
	line-height: 1;
}

/* Acordeón detalles */
.farmacia-ps__details {
	background: var(--ps-panel);
	border-radius: var(--ps-radius);
	box-shadow: 0 4px 24px rgba(27, 42, 73, 0.08);
	margin-bottom: 2rem;
	overflow: hidden;
}

.farmacia-ps__details-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 1.25rem 1.5rem;
	border: 0;
	background: transparent;
	font-family: "Nunito", var(--ps-font);
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--ps-navy);
	cursor: pointer;
	text-align: left;
}

body.farmacia-product-single-active .farmacia-ps .farmacia-ps__details-toggle:hover,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__details-toggle:focus,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__details-toggle:focus-visible,
body.farmacia-product-single-active .farmacia-ps .farmacia-ps__details-toggle:active,
.farmacia-ps__details-toggle:hover,
.farmacia-ps__details-toggle:focus,
.farmacia-ps__details-toggle:focus-visible,
.farmacia-ps__details-toggle:active {
	background: transparent !important;
	border: 0 !important;
	color: var(--ps-navy) !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.farmacia-ps__details-chevron {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.farmacia-ps__details.is-open .farmacia-ps__details-chevron {
	transform: rotate(180deg);
}

.farmacia-ps__details-panel {
	padding: 0 1.5rem 1.5rem;
}

.farmacia-ps__details-block h3 {
	margin: 0 0 0.65rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--ps-navy);
}

.farmacia-ps__details-block + .farmacia-ps__details-block {
	margin-top: 1.25rem;
}

.farmacia-ps__details-content {
	color: var(--ps-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Relacionados */
.farmacia-ps__related {
	margin-bottom: 2rem;
}

.farmacia-ps__related-title {
	margin: 0 0 1rem;
	font-family: "Nunito", var(--ps-font);
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--ps-navy);
}

/* Reutiliza estilos del bloque carrusel (.wp-block-farmacia-product-carousel.farmacia-pc) */
.farmacia-ps__related .wp-block-farmacia-product-carousel.farmacia-pc {
	background: transparent;
	padding: 0;
	max-width: 100%;
}

.farmacia-ps__related .farmacia-pc__inner {
	max-width: 100%;
}

.farmacia-ps__related .farmacia-pc__row {
	padding-left: calc(var(--pc-arrow-size, 60px) / 2);
	padding-right: calc(var(--pc-arrow-size, 60px) / 2);
}

.farmacia-ps__related .farmacia-pc__arrow--prev {
	left: 0;
}

.farmacia-ps__related .farmacia-pc__arrow--next {
	right: 0;
}

/* Responsive */
@media (max-width: 1023px) {
	.farmacia-ps__inner {
		grid-template-columns: 1fr 1fr;
	}

	.farmacia-ps__hero-gallery {
		grid-column: 1 / -1;
	}

	.farmacia-ps__gallery-thumbs {
		width: 106px;
		max-width: 106px;
		min-width: 106px;
	}

	.farmacia-ps__hero-info {
		grid-column: 1;
	}

	.farmacia-ps__hero-info.is-height-synced:not(.is-expanded) {
		min-height: var(--ps-hero-info-min-h, auto);
	}

	.farmacia-ps__purchase {
		grid-column: 2;
	}

	.farmacia-ps__details,
	.farmacia-ps__related {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.farmacia-ps {
		padding-inline: 0;
	}

	.farmacia-ps__inner {
		grid-template-columns: 1fr;
	}

	.farmacia-ps__hero-gallery,
	.farmacia-ps__hero-info,
	.farmacia-ps__purchase,
	.farmacia-ps__details,
	.farmacia-ps__related {
		grid-column: 1 / -1;
	}

	.farmacia-ps__purchase-inner {
		position: static;
	}

	.farmacia-ps__gallery {
		flex-direction: column-reverse;
	}

	.farmacia-ps__gallery-thumbs {
		flex-direction: row;
		flex-wrap: wrap;
	}
}
