/*
 * Buscador de Casa del Puzzle: lo que cambia sobre el de fábrica del addon-meilisearch, para que se
 * parezca a la capa de Doofinder que tenía la tienda (SHN-545-41716).
 */

.srch-root {
	--srch-accent: #e15298;
	--srch-accent-ink: #fff;
	--srch-ins-oferta-bg: #e15298;
	--srch-ins-oferta-ink: #fff;
}

/* Pantalla completa por debajo de la franja rosa de la cabecera (#head-mini, 40 px), como Doofinder */
@media (min-width: 992px) {
	.srch-pg:not(.srch-flot):not(.srch-integ) { top: 40px; }
	/* Con la página bajada la franja ya no está y asomaba la cabecera fija por encima: arriba del todo */
	body.fixed-head > .srch-pg:not(.srch-flot):not(.srch-integ) { top: 0; }
	.srch-pg:not(.srch-flot):not(.srch-integ) .srch-box { max-width: none; margin: 0 50px; }
}

/*
 * Tarjetas: el HTML de la ficha del listado (tarjeta.html) con las clases de la tienda, así que las pinta
 * su style.css (.product, .label, .wrapper-hover, .sticker-offer…) en el ordenador y en el móvil. Aquí
 * solo se quita lo que pone el addon a sus tarjetas y lo que traen los <button> del navegador.
 */
/* Fondo blanco y tarjetas con borde (el crema de las fichas del listado quedaba mal en la capa) */
.srch-pg .srch-main { background: #fff; border-radius: 10px; padding: 18px; }
.srch-pg .srch-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 18px 16px; }
/* Sin texto el addon fija 4 columnas: en pantallas grandes salían enormes; caben las que permita el ancho */
@media (min-width: 992px) { .srch-pg.srch-inicio .srch-ini .srch-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); } }
.srch-root .srch-card.product { padding: 0; border: 1px solid #ece6e1; border-radius: 10px; background: #fff; gap: 0; color: #242a2a; overflow: visible; text-align: left; transition: border-color .15s, box-shadow .15s; }
.srch-root .srch-card.product:hover, .srch-root .srch-card.product:focus-within { border-color: #f3c4db; box-shadow: 0 4px 14px rgba(36, 42, 42, .08); }
.srch-root .srch-card .image.srch-img { aspect-ratio: auto; margin: 0; padding: 0; background: #fff; border-radius: 9px 9px 0 0; overflow: hidden; }
.srch-root .srch-card .image.srch-img img { position: static; width: 100%; height: auto; object-fit: contain; }
.srch-root .srch-card .image.srch-noimg { aspect-ratio: 237 / 262; background: #f1ece6; }
.srch-root .srch-card .title { display: block; }
.srch-root .srch-card .title .srch-name { all: unset; }
.srch-root .srch-card .title mark { background: none; color: inherit; font-weight: 700; }
.srch-root .srch-card.srch-oferta .wrapper-bottom .price { color: #e15298; }
.srch-root .srch-card.srch-agotado .title, .srch-root .srch-card.srch-agotado .wrapper-bottom { opacity: .5; }
.srch-root .srch-card .wrapper-hover button { border: 0; margin: 0; cursor: pointer; }
.srch-root .srch-card .wrapper-hover .srch-comprar { margin-bottom: 12px; }
/* Estrellas de las opiniones encima del precio (solo los productos con alguna) */
.srch-root .srch-card .wrapper-bottom { flex-wrap: wrap; }
.srch-root .srch-card .wrapper-bottom .srch-stars { flex: 0 0 100%; margin-bottom: 8px; font-size: 12px; }
.srch-root .srch-card .wrapper-hover .buy-button, .srch-root .srch-card .wrapper-hover .buy-button:hover { display: block; height: auto; margin-top: 0; padding: 12px 0; background: #00aea4; color: #fff; font: 700 14px/16px Montserrat, sans-serif; text-align: center; text-transform: uppercase; }
.srch-root .srch-card .wrapper-hover .buy-button.srch-anadido { background: #15803d; }
.srch-root .srch-card .wrapper-hover .favorites-button { font-family: Glyphter; font-size: 26px; line-height: 26px; }
.srch-root .srch-card.srch-agotado .wrapper-hover .buy-button { background: grey; }
.srch-root .srch-card .wrapper-hover .favorites-button { background: none; padding: 0; }
.srch-root .srch-card .srch-comprar.srch-comprando { opacity: .7; }
@media (max-width: 991.98px) {
	.srch-root .srch-card .wrapper-hover .favorites-button { background: #fdf0f6; line-height: 50px; font-size: 26px; }
	.srch-root .srch-card .wrapper-hover .buy-button, .srch-root .srch-card .wrapper-hover .buy-button:hover, .srch-root .srch-card .wrapper-hover .srch-comprar { margin-bottom: 0; }
	.srch-root .srch-card .wrapper-hover .favorites-button { margin-left: 10px; }
	.srch-pg .srch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; }
	.srch-pg .srch-main { padding: 12px; }
}
@media (max-width: 759.98px) {
	.srch-root .srch-card .wrapper-hover .buy-button, .srch-root .srch-card .wrapper-hover .buy-button:hover { font-size: 13px; line-height: 33px; height: 34px; padding: 0 10px; }
	.srch-root .srch-card .wrapper-hover .favorites-button { height: 37px; line-height: 37px; font-size: 20px; margin-left: 6px; }
}

/* «En stock» y «En oferta» arriba del todo, en una fila, y en rosa al marcarlas */
.srch-root .srch-pl { height: 44px; padding: 0 10px; gap: 6px; font: 600 13px Montserrat, sans-serif; border-width: 2px; border-color: #f3c4db; }
.srch-root .srch-pl:hover { border-color: #e15298; }
.srch-root .srch-pl[aria-checked="true"] { background: #e15298; border-color: #e15298; color: #fff; }
.srch-root .srch-pl-ok { background: #fff; color: #e15298; }
.srch-root .srch-pl-t { overflow: visible; }
.srch-root .srch-pl .srch-pl-n { font-size: 11px; }

/* Barra del precio en rosa */
.srch-rango::after { background: #e15298; }
.srch-rango input::-webkit-slider-thumb { border-color: #e15298; }
.srch-rango input::-moz-range-thumb { border-color: #e15298; }

/* Piezas: botones con una pieza de puzzle dibujada y la cifra; el elegido, en rosa */
.srch-root .srch-bot { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 42px; border-radius: 8px; font: 600 14px Montserrat, sans-serif; }
.srch-root .srch-bot::before {
	content: ""; flex: none; width: 15px; height: 15px; background: #e15298;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a2.5 2.5 0 0 1 2.5 2.5c0 .5-.2 1-.4 1.4-.2.3 0 .6.3.6H17a1 1 0 0 1 1 1v4.6c0 .3.3.5.6.3.4-.2.9-.4 1.4-.4a2.5 2.5 0 0 1 0 5c-.5 0-1-.2-1.4-.4-.3-.2-.6 0-.6.3V21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4.6c0-.3.3-.5.6-.3.4.2.9.4 1.4.4a2.5 2.5 0 0 0 0-5c-.5 0-1 .2-1.4.4-.3.2-.6 0-.6-.3V7.5a1 1 0 0 1 1-1h4.6c.3 0 .5-.3.3-.6-.2-.4-.4-.9-.4-1.4A2.5 2.5 0 0 1 10 2z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a2.5 2.5 0 0 1 2.5 2.5c0 .5-.2 1-.4 1.4-.2.3 0 .6.3.6H17a1 1 0 0 1 1 1v4.6c0 .3.3.5.6.3.4-.2.9-.4 1.4-.4a2.5 2.5 0 0 1 0 5c-.5 0-1-.2-1.4-.4-.3-.2-.6 0-.6.3V21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-4.6c0-.3.3-.5.6-.3.4.2.9.4 1.4.4a2.5 2.5 0 0 0 0-5c-.5 0-1 .2-1.4.4-.3.2-.6 0-.6-.3V7.5a1 1 0 0 1 1-1h4.6c.3 0 .5-.3.3-.6-.2-.4-.4-.9-.4-1.4A2.5 2.5 0 0 1 10 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.srch-root .srch-bot:hover { border-color: #e15298; }
.srch-root .srch-bot[aria-checked="true"]::before { background: #fff; }
.srch-root .srch-bots { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* «Cargar más productos»: botón grande en rosa, como los de la tienda */
.srch-root .srch-mas { font: 500 14px Montserrat, sans-serif; color: #242a2a; padding-top: 34px; }
.srch-root .srch-mas-bar { height: 5px; background: #f3c4db; }
.srch-root .srch-mas-bar i { background: #e15298; }
.srch-root .srch-btn.srch-cargar { min-width: 300px; height: 54px; padding: 0 36px; border: 0; border-radius: 6px; background: #e15298; color: #fff; font: 700 16px Montserrat, sans-serif; text-transform: uppercase; letter-spacing: .02em; box-shadow: 0 4px 14px rgba(225, 82, 152, .3); transition: background .15s, transform .15s; }
.srch-root .srch-btn.srch-cargar:hover { background: #c93f83; color: #fff; transform: translateY(-1px); }
@media (max-width: 575.98px) { .srch-root .srch-btn.srch-cargar { min-width: 0; width: 100%; } }

/* Formato: cada opción en una casilla con su forma dibujada (rectángulo tumbado, de pie, panorámico,
   cuadrado, círculo, esfera, triángulo). Los valores van traducidos, por eso salen los cuatro idiomas. */
.srch-root .srch-opts:has(> .srch-opt[data-t="op:formato"]) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.srch-root .srch-opt[data-t="op:formato"] { display: grid; grid-template-rows: 44px auto auto; justify-items: center; align-items: center; gap: 2px; width: auto; height: auto; margin: 0; padding: 8px 4px 9px; border: 1px solid #f3c4db; border-radius: 8px; background: #fff; text-align: center; font: 600 12px/1.2 Montserrat, sans-serif; color: #242a2a; }
.srch-root .srch-opt[data-t="op:formato"] .srch-cb { display: none; }
.srch-root .srch-opt[data-t="op:formato"] .srch-opt-t { white-space: normal; }
.srch-root .srch-opt[data-t="op:formato"] .srch-n { margin: 0; font-size: 11px; font-weight: 500; background: none; padding: 0; }
.srch-root .srch-opt[data-t="op:formato"]:hover { border-color: #e15298; }
.srch-root .srch-opt[data-t="op:formato"][aria-checked="true"] { border-color: #e15298; background: #fdf0f6; box-shadow: inset 0 0 0 1px #e15298; }
.srch-root .srch-opt[data-t="op:formato"]::before { content: ""; width: 30px; height: 21px; border: 2px solid #e15298; border-radius: 3px; background: #fbe0ec; box-sizing: border-box; }
.srch-root .srch-opt[data-t="op:formato"][aria-checked="true"]::before { background: #e15298; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Vertical"], [data-v="Portrait"], [data-v="Hochformat"])::before { width: 21px; height: 30px; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Horizontal Panorámico"], [data-v="Horizontal panorâmico"], [data-v="Paysage panoramique"], [data-v="Panorama"])::before { width: 42px; height: 15px; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Vertical Panorámico"], [data-v="Vertical panorâmico"], [data-v="Portrait panoramique"], [data-v="Hochformat Panorama"])::before { width: 15px; height: 42px; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Cuadrada"], [data-v="Quadrado"], [data-v="Carré"], [data-v="Quadratisch"])::before { width: 26px; height: 26px; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Circular"], [data-v="Rond"], [data-v="Rund"])::before { width: 28px; height: 28px; border-radius: 50%; }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Esférico"], [data-v="Sphérique"], [data-v="Kugel"])::before { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 12%, #f6a8cb 45%, #e15298 100%); }
.srch-root .srch-opt[data-t="op:formato"]:is([data-v="Triangular"], [data-v="Triangulaire"], [data-v="Dreieckig"])::before { width: 32px; height: 28px; border: 0; border-radius: 0; background: #e15298; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Edad: un círculo con la edad («2-3», «8+», «12+», search.js), como la etiqueta de las cajas de juguetes */
.srch-root .srch-opts:has(> .srch-opt[data-t="op:edad"]) { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.srch-root .srch-opt[data-t="op:edad"] { display: grid; grid-template-rows: 48px auto auto; justify-items: center; align-items: center; gap: 2px; width: auto; height: auto; margin: 0; padding: 8px 4px 9px; border: 1px solid #f3c4db; border-radius: 8px; background: #fff; text-align: center; font: 600 12px/1.2 Montserrat, sans-serif; color: #242a2a; }
.srch-root .srch-opt[data-t="op:edad"] .srch-cb { display: none; }
.srch-root .srch-opt[data-t="op:edad"] .srch-opt-t { white-space: normal; }
.srch-root .srch-opt[data-t="op:edad"] .srch-n { margin: 0; font-size: 11px; font-weight: 500; background: none; padding: 0; }
.srch-root .srch-opt[data-t="op:edad"]:hover { border-color: #e15298; }
.srch-root .srch-opt[data-t="op:edad"][aria-checked="true"] { border-color: #e15298; background: #fdf0f6; box-shadow: inset 0 0 0 1px #e15298; }
.srch-root .srch-opt[data-t="op:edad"]::before { content: attr(data-edad); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid #e15298; border-radius: 50%; background: #fbe0ec; box-sizing: border-box; font: 800 15px/1 Montserrat, sans-serif; letter-spacing: -.02em; color: #e15298; }
.srch-root .srch-opt[data-t="op:edad"][aria-checked="true"]::before { background: #e15298; color: #fff; }
/*
 * Al pasar el ratón, la franja morada (style.css, al 90 %) se pone encima del título y el precio de la tarjeta
 * y se leían los dos a la vez, montados. En la capa se esconden mientras se ve la franja, que ya lleva el precio.
 */
@media (min-width: 992px) {
	.srch-root .srch-card.product:hover .title, .srch-root .srch-card.product:hover .wrapper-bottom,
	.srch-root .srch-card.product:focus-within .title, .srch-root .srch-card.product:focus-within .wrapper-bottom { visibility: hidden; }
}
