/*
Theme Name: Taste Theme
Theme URI: https://tastemallorca.es
Author: Marketing Comline S.L.
Author URI: https://marketingcomline.com
Description: Tema propio de Taste Mallorca v2. Sin constructor visual, sin jQuery y sin fuentes externas. Pensado para cargar rápido y posicionar bien. Necesita el plugin Taste Core.
Version: 0.1.2
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: taste-theme
Tags: restaurantes, directorio, rapido
*/

/* ------------------------------------------------------------------ *
 * 1. Variables
 * ------------------------------------------------------------------ */

:root {
	--tm-amarillo: #f8b233;
	--tm-amarillo-oscuro: #e09a16;
	--tm-granate: #89023e;
	--tm-granate-claro: #a81b57;
	--tm-rosa: #cc3366;

	--tm-tinta: #1f1d20;
	--tm-texto: #3b383c;
	--tm-suave: #6b666e;
	--tm-linea: #e8e4e6;
	--tm-fondo: #ffffff;
	--tm-crema: #fdf8f1;

	--tm-radio: 14px;
	--tm-radio-s: 8px;
	--tm-sombra: 0 1px 2px rgba(31, 29, 32, .06), 0 8px 24px rgba(31, 29, 32, .06);
	--tm-sombra-alta: 0 2px 4px rgba(31, 29, 32, .08), 0 16px 40px rgba(31, 29, 32, .1);

	--tm-ancho: 1160px;
	--tm-gutter: 20px;

	--tm-fuente: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------ *
 * 2. Base
 * ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--tm-fuente);
	font-size: 17px;
	line-height: 1.65;
	color: var(--tm-texto);
	background: var(--tm-fondo);
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--tm-granate); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tm-granate-claro); }

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.02em;
	color: var(--tm-tinta);
	margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

.tm-contenedor {
	width: 100%;
	max-width: var(--tm-ancho);
	margin-inline: auto;
	padding-inline: var(--tm-gutter);
}

.tm-salta {
	position: absolute;
	left: -9999px;
	background: var(--tm-granate);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--tm-radio-s);
	z-index: 99;
}
.tm-salta:focus { left: 12px; top: 12px; }

:where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid var(--tm-amarillo);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ *
 * 3. Botones y píldoras
 * ------------------------------------------------------------------ */

.tm-boton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 22px;
	border: 0;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, transform .15s, box-shadow .15s;
}

.tm-boton:active { transform: translateY(1px); }

.tm-boton--principal { background: var(--tm-granate); color: #fff; }
.tm-boton--principal:hover { background: var(--tm-granate-claro); color: #fff; }

.tm-boton--acento { background: var(--tm-amarillo); color: var(--tm-tinta); }
.tm-boton--acento:hover { background: var(--tm-amarillo-oscuro); color: var(--tm-tinta); }

.tm-boton--linea {
	background: transparent;
	color: var(--tm-granate);
	box-shadow: inset 0 0 0 1.5px var(--tm-linea);
}
.tm-boton--linea:hover { box-shadow: inset 0 0 0 1.5px var(--tm-granate); color: var(--tm-granate); }

.tm-boton--bloque { width: 100%; }

.tm-pildora {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--tm-crema);
	color: var(--tm-granate);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.tm-pildora:hover { background: var(--tm-amarillo); color: var(--tm-tinta); }

.tm-premium {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--tm-amarillo);
	color: var(--tm-tinta);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------ *
 * 4. Cabecera
 * ------------------------------------------------------------------ */

.tm-cabecera {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--tm-linea);
}

.tm-cabecera__fila {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 68px;
}

.tm-logo { display: flex; align-items: center; text-decoration: none; }
.tm-logo img { height: 34px; width: auto; }
.tm-logo__texto {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: -.03em;
	color: var(--tm-granate);
}

.tm-nav { margin-left: auto; }
.tm-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tm-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--tm-texto);
	font-weight: 600;
	font-size: .97rem;
	text-decoration: none;
}
.tm-nav a:hover,
.tm-nav .current-menu-item > a { background: var(--tm-crema); color: var(--tm-granate); }

.tm-menu-boton {
	display: none;
	margin-left: auto;
	padding: 9px 14px;
	border: 1.5px solid var(--tm-linea);
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

@media (max-width: 860px) {
	.tm-menu-boton { display: block; }
	.tm-nav {
		display: none;
		width: 100%;
		margin: 0 0 14px;
	}
	.tm-nav.abierto { display: block; }
	.tm-nav ul { flex-direction: column; gap: 2px; }
	.tm-cabecera__fila { flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ *
 * 5. Portada
 * ------------------------------------------------------------------ */

.tm-hero {
	position: relative;
	padding: clamp(48px, 9vw, 92px) 0 clamp(40px, 7vw, 72px);
	background:
		radial-gradient(90% 120% at 15% 0%, rgba(248, 178, 51, .22) 0%, rgba(248, 178, 51, 0) 60%),
		radial-gradient(70% 110% at 95% 10%, rgba(204, 51, 102, .14) 0%, rgba(204, 51, 102, 0) 60%),
		var(--tm-crema);
	text-align: center;
}

.tm-hero h1 { max-width: 16ch; margin-inline: auto; }
.tm-hero__entradilla {
	max-width: 54ch;
	margin: 0 auto 28px;
	font-size: 1.1rem;
	color: var(--tm-suave);
}

.tm-buscador {
	display: flex;
	gap: 8px;
	max-width: 620px;
	margin: 0 auto;
	padding: 8px;
	background: #fff;
	border-radius: 999px;
	box-shadow: var(--tm-sombra-alta);
}

.tm-buscador input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 18px;
	border: 0;
	background: transparent;
	font: inherit;
	color: var(--tm-tinta);
}
.tm-buscador input[type="search"]:focus { outline: none; }
.tm-buscador input::placeholder { color: var(--tm-suave); }

.tm-atajos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 22px;
}

.tm-atajos__titulo {
	width: 100%;
	margin: 0 0 4px;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tm-suave);
}

/* ------------------------------------------------------------------ *
 * 6. Secciones
 * ------------------------------------------------------------------ */

.tm-seccion { padding: clamp(40px, 6vw, 68px) 0; }
.tm-seccion--crema { background: var(--tm-crema); }

.tm-seccion__cabeza {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 26px;
}
.tm-seccion__cabeza h2 { margin: 0; }
.tm-seccion__cabeza p { margin: 0; color: var(--tm-suave); }

/* ------------------------------------------------------------------ *
 * 7. Rejilla y tarjetas
 * ------------------------------------------------------------------ */

.tm-rejilla {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.tm-tarjeta {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--tm-linea);
	border-radius: var(--tm-radio);
	overflow: hidden;
	transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tm-tarjeta:hover {
	transform: translateY(-3px);
	box-shadow: var(--tm-sombra);
	border-color: transparent;
}

.tm-tarjeta__foto {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--tm-crema);
	overflow: hidden;
}
.tm-tarjeta__foto img { width: 100%; height: 100%; object-fit: cover; }
.tm-tarjeta__foto .tm-premium { position: absolute; top: 12px; left: 12px; }

.tm-tarjeta__sinfoto {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--tm-amarillo);
	opacity: .55;
}
.tm-tarjeta__sinfoto svg { width: 46px; height: 46px; }

.tm-tarjeta__cuerpo { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }

.tm-tarjeta__titulo { font-size: 1.12rem; margin: 0 0 6px; }
.tm-tarjeta__titulo a { color: inherit; text-decoration: none; }
.tm-tarjeta__titulo a:hover { color: var(--tm-granate); }

.tm-tarjeta__meta {
	margin: 0 0 10px;
	font-size: .9rem;
	color: var(--tm-suave);
}

.tm-tarjeta__texto {
	margin: 0 0 14px;
	font-size: .95rem;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tm-tarjeta__pie {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--tm-linea);
	font-size: .9rem;
	color: var(--tm-suave);
}

/* ------------------------------------------------------------------ *
 * 8. Archivo de restaurantes
 * ------------------------------------------------------------------ */

.tm-archivo__cabeza {
	padding: clamp(28px, 5vw, 48px) 0 clamp(20px, 3vw, 28px);
	background: var(--tm-crema);
}
.tm-archivo__cabeza h1 { margin-bottom: 8px; }
.tm-archivo__cuenta { margin: 0; color: var(--tm-suave); }

.tm-filtros {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.tm-filtros select {
	appearance: none;
	padding: 11px 38px 11px 16px;
	border: 1.5px solid var(--tm-linea);
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b666e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 15px center;
	font: inherit;
	font-weight: 600;
	font-size: .95rem;
	color: var(--tm-tinta);
	cursor: pointer;
}
.tm-filtros select:hover { border-color: var(--tm-granate); }

.tm-migas {
	padding: 14px 0 0;
	font-size: .88rem;
	color: var(--tm-suave);
}
.tm-migas ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tm-migas li::after { content: "›"; margin-left: 6px; color: var(--tm-linea); }
.tm-migas li:last-child::after { content: ""; }
.tm-migas a { color: var(--tm-suave); }

.tm-vacio {
	padding: 48px 24px;
	text-align: center;
	background: var(--tm-crema);
	border-radius: var(--tm-radio);
	color: var(--tm-suave);
}

.tm-paginacion {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 36px;
}
.tm-paginacion .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 999px;
	background: var(--tm-crema);
	color: var(--tm-texto);
	font-weight: 600;
	text-decoration: none;
}
.tm-paginacion .page-numbers:hover { background: var(--tm-amarillo); color: var(--tm-tinta); }
.tm-paginacion .page-numbers.current { background: var(--tm-granate); color: #fff; }

/* ------------------------------------------------------------------ *
 * 9. Ficha de restaurante
 * ------------------------------------------------------------------ */

.tm-ficha__cabecera {
	position: relative;
	aspect-ratio: 21 / 9;
	max-height: 440px;
	background: var(--tm-crema);
	overflow: hidden;
}
.tm-ficha__cabecera img { width: 100%; height: 100%; object-fit: cover; }

.tm-ficha__intro { padding: 28px 0 0; }
.tm-ficha__intro h1 { margin-bottom: 10px; }

.tm-ficha__taxonomias { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.tm-ficha__cuerpo {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding: 28px 0 clamp(40px, 6vw, 72px);
}

@media (min-width: 900px) {
	.tm-ficha__cuerpo { grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; }
}

.tm-datos {
	align-self: start;
	position: sticky;
	top: 88px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--tm-linea);
	border-radius: var(--tm-radio);
	box-shadow: var(--tm-sombra);
}
.tm-datos h2 { font-size: 1.05rem; margin-bottom: 14px; }
.tm-datos dl { margin: 0 0 18px; }
.tm-datos dt {
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--tm-suave);
	margin-top: 12px;
}
.tm-datos dd { margin: 2px 0 0; }
.tm-datos .tm-boton + .tm-boton { margin-top: 8px; }

.tm-galeria {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(220px, 1fr);
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	margin: 0 0 28px;
	scrollbar-width: thin;
}
.tm-galeria img {
	scroll-snap-align: start;
	aspect-ratio: 4 / 3;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--tm-radio-s);
}

.tm-video {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 0 0 28px;
	border-radius: var(--tm-radio);
	overflow: hidden;
	background: #000;
}
.tm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.tm-redes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ------------------------------------------------------------------ *
 * 10. Entradas y páginas
 * ------------------------------------------------------------------ */

.tm-entrada { padding: clamp(28px, 5vw, 56px) 0; }
.tm-entrada__contenido { max-width: 70ch; }
.tm-entrada__contenido img { border-radius: var(--tm-radio); margin: 1.4em 0; }
.tm-entrada__contenido h2 { margin-top: 1.6em; }
.tm-entrada__contenido blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 4px solid var(--tm-amarillo);
	color: var(--tm-suave);
	font-size: 1.05rem;
}
.tm-entrada__meta { color: var(--tm-suave); font-size: .92rem; margin-bottom: 18px; }

/* ------------------------------------------------------------------ *
 * 11. Pie
 * ------------------------------------------------------------------ */

.tm-pie {
	padding: clamp(36px, 5vw, 56px) 0 28px;
	background: var(--tm-tinta);
	color: #cfc9cf;
	font-size: .95rem;
}
.tm-pie a { color: #fff; text-decoration: none; }
.tm-pie a:hover { color: var(--tm-amarillo); }
.tm-pie__rejilla {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 28px;
	margin-bottom: 28px;
}
.tm-pie h3 { color: #fff; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; }
.tm-pie ul { list-style: none; margin: 0; padding: 0; }
.tm-pie li { margin-bottom: 7px; }
.tm-pie__legal {
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, .12);
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	justify-content: space-between;
	font-size: .88rem;
}

/* ------------------------------------------------------------------ *
 * 12. Utilidades
 * ------------------------------------------------------------------ */

.tm-oculto {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
