/**
 * Herrajes Child — estilos de la ficha de producto.
 *
 * Todo va prefijado con .hp- para no chocar nunca con Divi ni con Woo.
 * Los colores salen de variables: cambia estas cinco líneas y cambia la web.
 */

:root {
	--hp-ink: #14110f;
	--hp-ink-2: #4a423c;
	--hp-ink-3: #8a7f76;
	--hp-line: #e5ded6;
	--hp-line-2: #f2ece5;
	--hp-bg-2: #faf7f3;
	--hp-bg-3: #f4efe8;
	--hp-accent: #8a5a2b;
	--hp-accent-soft: #f6ede2;
	--hp-ok: #2f6b3f;
	--hp-radius: 10px;
}

/* -------------------------------------------------------------------------
 * Referencia con botón de copiar
 * ---------------------------------------------------------------------- */

.hp-refline {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.hp-ref {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 15px;
	font-weight: 600;
	background: var(--hp-bg-3);
	border: 1px solid var(--hp-line);
	padding: 5px 11px;
	border-radius: 7px;
	color: var(--hp-ink);
}

.hp-copy {
	font-size: 12px;
	color: var(--hp-accent);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-family: inherit;
}

.hp-copy:hover {
	opacity: 0.75;
}

/* -------------------------------------------------------------------------
 * Especificación viva
 * ---------------------------------------------------------------------- */

.hp-spec {
	background: var(--hp-bg-2);
	border: 1px solid var(--hp-line);
	border-radius: var(--hp-radius);
	padding: 18px 20px;
	margin-bottom: 16px;
}

.hp-spec[hidden],
.hp-spec__aviso[hidden],
.hp-monta__match[hidden] {
	display: none;
}

.hp-spec__titulo {
	margin: 0 0 12px;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--hp-ink-2);
	font-weight: 700;
}

.hp-spec__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.hp-spec__cell[hidden] {
	display: none;
}

.hp-spec__k {
	display: block;
	font-size: 11px;
	color: var(--hp-ink-3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.hp-spec__v {
	display: block;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.4px;
	margin-top: 2px;
	color: var(--hp-ink);
}

.hp-spec__v small {
	font-size: 12px;
	font-weight: 500;
	color: var(--hp-ink-3);
}

.hp-spec__sku {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--hp-line);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.hp-spec__code {
	font-family: ui-monospace, Menlo, monospace;
	font-size: 16px;
	font-weight: 700;
	color: var(--hp-accent);
}

.hp-spec__aviso {
	font-size: 13.5px;
	color: var(--hp-ink-3);
	background: var(--hp-bg-2);
	border: 1px dashed var(--hp-line);
	border-radius: var(--hp-radius);
	padding: 14px 18px;
	margin-bottom: 16px;
}

/* -------------------------------------------------------------------------
 * Tabla de medidas
 * ---------------------------------------------------------------------- */

.hp-tabla-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hp-tabla {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.hp-tabla th {
	text-align: left;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--hp-ink-3);
	padding: 0 12px 10px;
	border-bottom: 1.5px solid var(--hp-line);
	white-space: nowrap;
	font-weight: 700;
}

.hp-tabla td {
	padding: 11px 12px;
	border-bottom: 1px solid var(--hp-line-2);
	color: var(--hp-ink);
}

.hp-tabla td:first-child {
	font-weight: 700;
}

.hp-tabla tbody tr {
	cursor: pointer;
	transition: background 0.12s;
}

.hp-tabla tbody tr:hover td {
	background: var(--hp-bg-2);
}

.hp-tabla tbody tr.is-activa td {
	background: var(--hp-accent-soft);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Se monta con
 * ---------------------------------------------------------------------- */

.hp-monta__barra {
	background: var(--hp-accent-soft);
	border: 1px solid #e8d9c4;
	border-radius: var(--hp-radius);
	padding: 14px 18px;
	font-size: 14px;
	margin: 0 0 24px;
	color: var(--hp-ink);
}

.hp-monta__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.hp-monta__card {
	border: 1px solid var(--hp-line);
	border-radius: var(--hp-radius);
	overflow: hidden;
	background: #fff;
	text-decoration: none;
	display: block;
	transition: box-shadow 0.15s, border-color 0.15s;
	color: inherit;
}

.hp-monta__card:hover {
	border-color: var(--hp-ink-3);
	box-shadow: 0 8px 24px rgba(20, 17, 15, 0.08);
}

.hp-monta__img {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--hp-bg-2);
	border-bottom: 1px solid var(--hp-line-2);
	overflow: hidden;
}

.hp-monta__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.hp-monta__body {
	display: block;
	padding: 13px 14px;
}

.hp-monta__fam {
	display: block;
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	color: var(--hp-accent);
	font-weight: 700;
}

.hp-monta__nom {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 3px 0 4px;
	color: var(--hp-ink);
}

.hp-monta__ref {
	display: block;
	font-size: 12px;
	color: var(--hp-ink-3);
	font-family: ui-monospace, Menlo, monospace;
}

.hp-monta__match {
	display: inline-block;
	margin-top: 9px;
	font-size: 11.5px;
	background: #eaf3ec;
	color: var(--hp-ok);
	padding: 3px 9px;
	border-radius: 20px;
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Descargas
 * ---------------------------------------------------------------------- */

.hp-dl-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.hp-dl {
	border: 1.5px solid var(--hp-line);
	border-radius: var(--hp-radius);
	padding: 12px 16px;
	display: flex;
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: var(--hp-ink);
}

.hp-dl:hover {
	border-color: var(--hp-ink);
}

.hp-dl__ic {
	width: 34px;
	height: 34px;
	border-radius: 7px;
	background: var(--hp-bg-3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	color: var(--hp-ink-2);
	flex: none;
}

.hp-dl__t {
	font-weight: 600;
	font-size: 13.5px;
}

/* -------------------------------------------------------------------------
 * Preguntas frecuentes
 * ---------------------------------------------------------------------- */

.hp-faq details {
	border-bottom: 1px solid var(--hp-line-2);
	padding: 16px 0;
}

.hp-faq summary {
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	color: var(--hp-ink);
}

.hp-faq summary::-webkit-details-marker {
	display: none;
}

.hp-faq summary::after {
	content: "+";
	color: var(--hp-accent);
	font-size: 20px;
	line-height: 1;
}

.hp-faq details[open] summary::after {
	content: "\2013";
}

.hp-faq p {
	color: var(--hp-ink-2);
	font-size: 14.5px;
	margin: 12px 0 0;
	max-width: 66ch;
}

/* -------------------------------------------------------------------------
 * Selectores de variación — convierte los desplegables de Woo en botones
 *
 * Esto es un apaño decente si no compras un plugin de swatches.
 * Con plugin, borra este bloque: sobra y puede pelearse con sus estilos.
 * ---------------------------------------------------------------------- */

.woocommerce div.product form.cart .variations {
	border: 0;
	margin-bottom: 14px;
}

.woocommerce div.product form.cart .variations th.label {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.7px;
	color: var(--hp-ink);
	padding-bottom: 8px;
}

.woocommerce div.product form.cart .variations select {
	min-height: 46px;
	border: 1.5px solid var(--hp-line);
	border-radius: 8px;
	padding: 0 12px;
	font-size: 15px;
	background-color: #fff;
}

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

@media (max-width: 980px) {
	.hp-monta__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.hp-spec__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hp-spec__sku {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
}
