/* Aprop — ajustes que no cubren theme.json ni los estilos de bloque. */

/* ---------- Cabecera ---------- */
.aprop-header-main {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}
.aprop-header-main > :last-child {
	justify-self: end;
}
.aprop-header-main .wp-block-search {
	max-width: 240px;
}
.aprop-header-main .wp-block-search__inside-wrapper {
	border: 0;
	border-bottom: 1px solid currentColor;
	padding: 0;
	background: transparent;
}
.aprop-header-main .wp-block-search__input {
	background: transparent;
	border: 0;
	padding-left: 0;
}
.aprop-header-main .wp-block-search__button {
	background: transparent;
	color: currentColor;
	border: 0;
	padding: 0.3rem;
	margin: 0;
}
.aprop-nav-row .wp-block-navigation-item.aprop-rebajas > a {
	color: var(--wp--preset--color--accent-1);
}
@media (max-width: 781px) {
	.aprop-header-main {
		grid-template-columns: auto 1fr auto;
	}
	.aprop-header-main .wp-block-search {
		display: none;
	}
	.aprop-header-main .wp-block-site-logo {
		justify-self: start;
	}
}

/* ---------- Portada y tarjetas de categoría ---------- */
.wp-block-cover h2 a,
.wp-block-cover h3 a {
	text-decoration: none;
}
.wp-block-cover h3 a:hover {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
@media (min-width: 782px) {
	.aprop-sticky {
		position: sticky;
		top: var(--wp--preset--spacing--40);
	}
}
@media (max-width: 781px) {
	.aprop-hero .wp-block-cover {
		min-height: 68vh !important;
	}
}

/* ---------- Tarjetas de producto ---------- */
.wc-block-product .wc-block-components-product-image,
.wp-block-woocommerce-product-image {
	overflow: hidden;
}
.wc-block-product .wc-block-components-product-image img {
	transition: transform 500ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.035);
}
.wc-block-components-product-sale-badge,
.woocommerce span.onsale {
	border-radius: 0;
	border: 0;
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--accent-5);
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.woocommerce span.onsale {
	min-height: 0;
	min-width: 0;
	line-height: 1;
	padding: 0.5em 0.8em;
	font-weight: 600;
}
.wc-block-components-product-price del {
	color: var(--wp--preset--color--accent-4);
}
.wc-block-components-product-price ins {
	text-decoration: none;
	color: var(--wp--preset--color--accent-1);
}

/* ---------- Ficha de producto: la galería ocupa toda su columna ---------- */
.woocommerce .wp-block-woocommerce-product-image-gallery {
	max-width: none;
}
.wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
}

/* ---------- Botón con flecha ---------- */
.wp-block-button.is-style-aprop-flecha .wp-block-button__link::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.6em;
	transition: transform 240ms ease-out;
}
.wp-block-button.is-style-aprop-flecha .wp-block-button__link:hover::after {
	transform: translateX(4px);
}
.wp-element-button,
.wp-block-button__link {
	transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

/* La imagen escalada no debe desbordar la portada. */
.wp-block-cover.is-style-aprop-revelado {
	overflow: hidden;
}

/* ---------- Efecto 1: «Revelado» en la portada (una sola vez al cargar) ---------- */
.aprop-js .wp-block-cover.is-style-aprop-revelado .wp-block-cover__image-background {
	animation: aprop-revelado-img 600ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.aprop-js .wp-block-cover.is-style-aprop-revelado .wp-block-cover__inner-container {
	animation: aprop-revelado-txt 480ms cubic-bezier(0.2, 0.6, 0.2, 1) 120ms both;
}
.wp-block-column:nth-child(2) > .wp-block-cover.is-style-aprop-revelado .wp-block-cover__image-background {
	animation-delay: 90ms;
}
@keyframes aprop-revelado-img {
	from { opacity: 0.55; transform: scale(1.05); }
	to { opacity: 1; transform: scale(1); }
}
@keyframes aprop-revelado-txt {
	from { opacity: 0; transform: translateX(-14px); }
	to { opacity: 1; transform: none; }
}

/* ---------- Efecto 2: aparición escalonada (novedades) ---------- */
.aprop-js .is-style-aprop-escalonado .wc-block-product,
.aprop-js .is-style-aprop-escalonado .wp-block-post {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 380ms ease-out, transform 380ms cubic-bezier(0.2, 0.6, 0.2, 1);
	transition-delay: calc(var(--aprop-i, 0) * 60ms);
}
.aprop-js .is-style-aprop-escalonado.is-visible .wc-block-product,
.aprop-js .is-style-aprop-escalonado.is-visible .wp-block-post {
	opacity: 1;
	transform: none;
}
.block-editor-page .is-style-aprop-escalonado .wc-block-product,
.editor-styles-wrapper .is-style-aprop-escalonado .wc-block-product {
	opacity: 1;
	transform: none;
}

/* ---------- Zoom suave al pasar ---------- */
.wp-block-image.is-style-aprop-zoom,
.wp-block-cover.is-style-aprop-zoom {
	overflow: hidden;
}
.wp-block-image.is-style-aprop-zoom img,
.wp-block-cover.is-style-aprop-zoom .wp-block-cover__image-background {
	transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}
.wp-block-image.is-style-aprop-zoom:hover img,
.wp-block-cover.is-style-aprop-zoom:hover .wp-block-cover__image-background {
	transform: scale(1.04);
}

/* ---------- Formularios (Contact Form 7) ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.8rem 0.9rem;
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: 2px;
	background: var(--wp--preset--color--accent-5);
	font: inherit;
	color: var(--wp--preset--color--contrast);
}
.wpcf7 textarea {
	height: 8rem;
}
.wpcf7 label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
}
.wpcf7 .wpcf7-acceptance label {
	font-weight: 400;
}
.wpcf7 .aprop-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.wpcf7 input[type="submit"] {
	cursor: pointer;
	border: 1px solid var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	padding: 0.95rem 1.9rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 0;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--accent-1);
	border-color: var(--wp--preset--color--accent-1);
}
.aprop-boletin .wpcf7 form > p {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.aprop-boletin .wpcf7 .wpcf7-form-control-wrap {
	flex: 1 1 220px;
	min-width: 0;
}
.aprop-boletin .wpcf7 input[type="email"] {
	width: 100%;
}
@media (max-width: 600px) {
	.wpcf7 .aprop-form-row {
		grid-template-columns: 1fr;
	}
}

/* ---------- Tablas (guía de tallas) ---------- */
.wp-block-table table {
	border-collapse: collapse;
}
.wp-block-table td,
.wp-block-table th {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
	padding: 0.65rem 0.5rem;
}
.wp-block-table thead {
	border-bottom: 1px solid var(--wp--preset--color--contrast);
}

/* ---------- Sin animaciones si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
	.aprop-js .wp-block-cover.is-style-aprop-revelado .wp-block-cover__image-background,
	.aprop-js .wp-block-cover.is-style-aprop-revelado .wp-block-cover__inner-container {
		animation: none;
	}
	.aprop-js .is-style-aprop-escalonado .wc-block-product,
	.aprop-js .is-style-aprop-escalonado .wp-block-post {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.wc-block-product .wc-block-components-product-image img,
	.wp-block-image.is-style-aprop-zoom img,
	.wp-block-cover.is-style-aprop-zoom .wp-block-cover__image-background,
	.wp-block-button.is-style-aprop-flecha .wp-block-button__link::after {
		transition: none;
	}
}
