/*
 * Hevea Core: product page review (product-page.php). Loaded on product pages after
 * product-landing.css and category-template.css (product cards and success cases).
 * Reference: Willy's mockups "Escritorio" and "Ficha producto - Móvil" (27-10).
 */

/* Rows that slide sideways: fade on the right while something is hidden (product-page.js). */
.hp-catpills__track.is-faded,
.hp-gallery .hp-chips.is-faded,
.variable-items-wrapper.is-many.is-faded {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 60px), transparent);
}

/* ---------- Category pills under the H1 ---------- */
body .hp-hero .elementor-widget-shortcode:has(.hp-catpills) {
	min-width: 0;
	max-width: 100%;
}
.hp-catpills__track {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	white-space: nowrap;
}
.hp-catpills__track::-webkit-scrollbar {
	display: none;
}
body .hp-catpills .hp-catpill {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid #d6d6d2;
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	font: 500 14px/1.2 Montserrat, sans-serif;
	text-decoration: none;
	transition: border-color 0.15s ease;
}
body .hp-catpills .hp-catpill:hover,
body .hp-catpills .hp-catpill:focus-visible {
	border-color: #1a1a1a;
	color: #1a1a1a;
}

/* ---------- Seals under the gallery: one line ---------- */
body .hp-hero .hp-gallery .hp-chips {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin-top: 20px;
	overflow-x: auto;
	scrollbar-width: none;
}
body .hp-hero .hp-gallery .hp-chips::-webkit-scrollbar {
	display: none;
}
body .hp-hero .hp-gallery .hp-chip {
	flex: none;
	background: #eef1e8;
	padding: 10px 16px !important;
}
body .hp-hero .hp-gallery .hp-chip span {
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- Product options (Variation Swatches) ---------- */
body.woo-variation-swatches .hp-hero .variable-items-wrapper {
	gap: 8px;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.color-variable-item {
	width: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 6px !important;
	box-shadow: 0 0 0 1px #d6d6d2 !important;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.color-variable-item .variable-item-span {
	border-radius: 5px !important;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.color-variable-item.selected,
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.color-variable-item:hover {
	box-shadow: 0 0 0 2px #1a1a1a !important;
}
/* Measure and seats: pills, label always in lower case ("1 plaza", "2 plazas"). */
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.button-variable-item {
	min-width: 0 !important;
	width: auto !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border-radius: 999px !important;
	background: #fff !important;
	box-shadow: 0 0 0 1px #d6d6d2 !important;
	color: #1a1a1a !important;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.button-variable-item .variable-item-span {
	font: 600 15px/1 Montserrat, sans-serif;
	text-transform: lowercase;
	padding: 0 !important;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.button-variable-item.selected {
	background: #1a1a1a !important;
	box-shadow: 0 0 0 1px #1a1a1a !important;
	color: #fff !important;
}
body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.button-variable-item:hover:not(.selected) {
	box-shadow: 0 0 0 1px #1a1a1a !important;
}
body .hp-hero table.variations th.label,
body .hp-hero table.variations th.label label {
	font: 700 14px/1.3 Montserrat, sans-serif !important;
	color: #1a1a1a;
	padding-bottom: 8px;
}
/* "La percepción del color...": one small line, no box. */
body .hp-hero .hevea-aviso-material.woocommerce-info {
	margin: 4px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font-size: 12px !important;
	line-height: 1.4;
	color: #737373 !important;
}
body .hp-hero .hevea-aviso-material.woocommerce-info::before {
	display: none !important;
}
/* More than 14 colours: a single sliding line. */
body.woo-variation-swatches .hp-hero .variable-items-wrapper.is-many {
	flex-wrap: nowrap !important;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 2px;
}

/* ---------- Ficha técnica ---------- */
body .hc .hp-ficha-title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}
/* Mockup: one soft box with a border, lines between sections, "+" / "−" instead of the FAQ chevron circle. */
body .hc-section .hc-accordion.hp-specs {
	border: 1px solid #e0e0dc;
	border-radius: 12px;
	overflow: hidden;
	background: #fbfbf9;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-base,
body .hc-section .hc-accordion.hp-specs .e-accordion-item-base:first-child {
	border-top: 0;
	border-bottom: 1px solid #e0e0dc;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-base:last-of-type {
	border-bottom: 0;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-header-base {
	padding: 20px;
	cursor: pointer;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-title-base,
body .hc-section .hc-accordion.hp-specs .e-accordion-item-title-base span {
	font-size: 16px;
	font-weight: 600;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-header-base:hover .e-accordion-item-title-base span {
	color: var(--hc-ink);
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-icon-base {
	display: none !important;
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-header-base::after {
	content: "+";
	flex: none;
	margin-left: auto;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	color: #595959;
}
body .hc-section .hc-accordion.hp-specs details[open] > .e-accordion-item-header-base::after {
	content: "\2212";
}
body .hc-section .hc-accordion.hp-specs .e-accordion-item-content-base {
	padding: 4px 20px 22px;
}

/* ---------- Más <categoría> ---------- */
.hp-rel {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.hp-rel-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}
body .hp-rel .hp-rel-more {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	padding: 0 24px;
	border: 1.5px solid #1a1a1a;
	border-radius: 999px;
	color: #1a1a1a;
	font: 600 15px/1 Montserrat, sans-serif;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}
body .hp-rel .hp-rel-more:hover,
body .hp-rel .hp-rel-more:focus-visible {
	background: #1a1a1a;
	color: #fff;
}

/* ---------- Fundas: the two link boxes, photo on top and text below ---------- */
body .hp-fundas .hp-ctas .elementor-cta {
	flex-direction: column !important;
	height: 100%;
	border: 1px solid #e3e7e0;
	border-radius: var(--hc-radius, 14px);
	background: #fff;
}
body .hp-fundas .hp-ctas .elementor-cta__bg-wrapper {
	width: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	aspect-ratio: 16 / 9;
	position: relative;
}
body .hp-fundas .hp-ctas .elementor-cta__content {
	flex: 1 1 auto;
	align-items: flex-start;
	text-align: left;
	padding: 24px 28px 28px !important;
	background: #fff !important;
}
body .hp-fundas .hp-ctas .elementor-cta__title {
	font-size: 20px !important;
	line-height: 1.3 !important;
}
body .hp-fundas .hp-ctas .elementor-cta__description {
	font-size: 15px !important;
	line-height: 1.6 !important;
}
body .hp-fundas .hp-ctas .elementor-cta__button-wrapper {
	margin-top: auto;
	padding-top: 8px;
}

@media (max-width: 1024px) {
	.hp-rel-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 767px) {
	body .hp-catpills .hp-catpill {
		min-height: 44px;
	}
	body.woo-variation-swatches .hp-hero .variable-items-wrapper {
		gap: 4px;
	}
	body.woo-variation-swatches .hp-hero .variable-items-wrapper .variable-item.color-variable-item {
		width: 42px !important;
		height: 42px !important;
	}
	.hp-rel-grid {
		gap: 12px;
	}
}

/* ---------- Top of the page on desktop, matched to Willy's mockup "Escritorio" (28-10) ---------- */
@media (min-width: 1025px) {
	/* Breadcrumb above both columns (it lives in the summary column of the template). */
	body .hp-hero .hp-hero-grid {
		position: relative;
		grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
		gap: 56px;
		padding-top: 66px;
	}
	body .hp-hero .hp-hero-grid > .hp-summary {
		position: static;
	}
	body .hp-hero .hp-summary > .elementor-widget-woocommerce-breadcrumb {
		position: absolute;
		top: 24px;
		left: 0;
		right: 0;
	}
	body .hc .hp-title {
		font-size: 34px;
		line-height: 1.15;
	}
}
body .hp-hero .woocommerce-breadcrumb,
body .hp-hero .woocommerce-breadcrumb a {
	font-size: 12px !important;
	color: #595959 !important;
}
body .hp-hero .hp-summary {
	gap: 12px;
}
body .hp-hero .hp-summary > .elementor-widget-woocommerce-product-add-to-cart {
	margin-top: 8px;
}
body .hp-hero .woocommerce-product-details__short-description,
body .hp-hero .woocommerce-product-details__short-description p {
	font-size: 15px;
	line-height: 1.6;
	color: #404040;
}
body .hp-catpills .hp-catpill {
	border-color: #cfcfca;
	font-size: 13px;
}
/* Options: plain label above the swatches, no bordered table. */
body .hp-hero table.variations,
body .hp-hero table.variations tbody,
body .hp-hero table.variations tr,
body .hp-hero table.variations th,
body .hp-hero table.variations td {
	display: block;
	width: 100%;
	margin: 0;
	border: 0 !important;
	background: none !important;
}
body .hp-hero table.variations th.label,
body .hp-hero table.variations td.value {
	padding: 0 !important;
}
body .hp-hero table.variations tr + tr {
	margin-top: 16px;
}
body .hp-hero table.variations th.label,
body .hp-hero table.variations th.label label {
	font-size: 13px !important;
	padding-bottom: 10px !important;
}
body .hp-hero .hevea-aviso-material.woocommerce-info {
	color: #595959 !important;
}
/* Gallery: photo on a soft square with rounded corners, 4 thumbnails per row. */
body .hp-hero .woocommerce-product-gallery__image {
	background: #f3f3f1;
	border-radius: 12px;
	overflow: hidden;
}
body .hp-hero .woocommerce-product-gallery__image img,
body .hp-hero .flex-control-thumbs img {
	mix-blend-mode: multiply;
	border-radius: 0;
}
body .hp-hero .flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 16px 0 0 !important;
	padding: 0;
}
body .hp-hero .flex-control-thumbs li {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	border-radius: 8px;
	background: #f3f3f1;
	overflow: hidden;
}
body .hp-hero .flex-control-thumbs img {
	aspect-ratio: 1 / 1;
	object-fit: contain;
	opacity: 1 !important;
	box-sizing: border-box;
	border: 2px solid transparent;
	border-radius: 8px;
}
body .hp-hero .flex-control-thumbs img.flex-active {
	border-color: #1a1a1a;
}
/* Seals: the three share the row, smaller type. */
body .hp-hero .hp-gallery .hp-chips {
	margin-top: 24px;
}
body .hp-hero .hp-gallery .hp-chip {
	gap: 6px;
	padding: 10px 12px !important;
	background: #f1f3ea;
	font-size: 12.5px;
}
@media (min-width: 1025px) {
	body .hp-hero .hp-gallery .hp-chip {
		flex: 1 1 auto;
		justify-content: center;
	}
}
/* Hover zoom (WooCommerce .zoomImg on top of the photo): both blended on the grey square showed twice. */
body .hp-hero .woocommerce-product-gallery__image img.zoomImg {
	background: #f3f3f1;
}
body .hp-hero .woocommerce-product-gallery__image:has(.zoomImg[style*="opacity: 1"]) img:not(.zoomImg) {
	visibility: hidden;
}
body .hp-hero .woocommerce-product-gallery {
	position: relative;
}
body .hp-hero .woocommerce-product-gallery__trigger {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
	font-size: 0;
	text-decoration: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.4 15.4 20 20'/%3E%3C/svg%3E") center / 18px no-repeat;
}
body .hp-hero .woocommerce-product-gallery__trigger img,
body .hp-hero .woocommerce-product-gallery__trigger::before {
	display: none;
}
body .hp-hero .flex-control-thumbs img {
	display: block;
	width: 100% !important;
	height: auto !important;
}
body .hp-hero .reset_variations {
	font-size: 12px !important;
	color: #595959 !important;
	text-decoration: underline;
}

/* Pergolas (28-10): "Tipo de montaje" is chosen on the page; its photo swatches become cards with the name */
body ul[data-attribute_name="attribute_pa_tipo-montaje"].variable-items-wrapper {
	gap: 10px;
}
body ul[data-attribute_name="attribute_pa_tipo-montaje"] .variable-item {
	width: 128px !important;
	height: auto !important;
	padding: 6px !important;
	border-radius: 10px !important;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	overflow: visible !important;
}
body ul[data-attribute_name="attribute_pa_tipo-montaje"] .variable-item .variable-item-contents {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}
body ul[data-attribute_name="attribute_pa_tipo-montaje"] .variable-item img {
	width: 100% !important;
	height: 96px !important;
	object-fit: contain;
	background: #fff;
	border-radius: 6px;
}
body ul[data-attribute_name="attribute_pa_tipo-montaje"] .hp-swatch-name {
	font: 500 13px/1.2 Montserrat, sans-serif;
	color: #232323;
	text-align: center;
}
