/* ==========================================================================
   Enlista SV — estilos base
   ========================================================================== */

:root {
	--color-purple-900: #3a0e3d;   /* topbar, panel, tab activa */
	--color-purple-700: #4a1350;
	--color-purple-300: #9c7f9a;   /* tab inactiva (Alquiler) */
	--color-white: #ffffff;
	--color-text: #1f1f1f;
	--color-muted: #cbb9ca;

	--font-base: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;

	--header-height: 64px;

	--container-max: 1280px;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font-base);
	color: var(--color-text);
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* ===== Topbar ===== */

.topbar {
	background: var(--color-purple-900);
	color: var(--color-white);
	text-align: center;
	padding: 8px 16px;
}

.topbar p {
	margin: 0;
	font-size: 0.85rem;
	font-weight: 500;
	letter-spacing: 0.02em;
}

/* ===== Navbar ===== */

.navbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-height);
	padding: 0 24px;
	background: var(--color-white);
	position: relative;
	z-index: 30;
}

.logo {
	display: flex;
	align-items: center;
}

.logo-img {
	display: block;
	height: 34.5px;
	width: auto;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 32px;
}

.nav-menu a {
	font-size: 0.95rem;
	font-weight: 500;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 32px;
	height: 32px;
	background: none;
	border: none;
	padding: 0;
	z-index: 40;
}

.nav-toggle span {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--color-text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== Cover ===== */

.cover {
	height: 46vh;
	min-height: 260px;
	max-height: 520px;
	background: url("../images/enlista-hero-1.webp") center / cover no-repeat;
}

/* ===== Buscador ===== */

.search {
	position: relative;
	z-index: 2;
	margin-top: -20px;
}

.search-tabs {
	display: flex;
	background: var(--color-purple-300);
	border-radius: 20px 20px 0 0;
}

.search-tab {
	flex: 1;
	border: none;
	padding: 18px 16px;
	font-size: 1rem;
	font-weight: 500;
	background: var(--color-purple-300);
	color: var(--color-white);
	transition: background 0.2s ease;
}

.search-tab:first-child {
	border-top-left-radius: 20px;
}

.search-tab:last-child {
	border-top-right-radius: 20px;
}

.search-tab.is-active {
	background: var(--color-purple-900);
	position: relative;
	z-index: 2;
}

.search-tab.is-active:first-child {
	border-top-right-radius: 20px;
}

.search-tab.is-active:last-child {
	border-top-left-radius: 20px;
}

.search-panel {
	background: var(--color-purple-900);
	padding: 28px 16px 24px;
	text-align: center;
}

.search-categories {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	max-width: var(--container-max);
	margin: 0 auto;
}

.category-pill {
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	font-size: 0.95rem;
	font-weight: 500;
	background: var(--color-white);
	color: var(--color-purple-900);
	white-space: nowrap;
}

@keyframes pillAppear {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.92);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.category-pill.is-animating {
	animation: pillAppear 0.55s ease both;
}

.more-filters {
	display: inline-block;
	margin-top: 18px;
	font-size: 0.9rem;
	color: var(--color-muted);
}

/* ===== Contenido (placeholder) ===== */

.content {
	min-height: 40px;
}

/* ==========================================================================
   Tablet (iPad) — hasta 1024px
   ========================================================================== */

@media (max-width: 1024px) {
	.navbar {
		padding: 0 20px;
	}

	.nav-menu {
		gap: 24px;
	}
}

/* ==========================================================================
   Mobile — hasta 640px
   ========================================================================== */

@media (max-width: 640px) {
	.navbar {
		padding: 0 16px;
	}

	.nav-toggle {
		display: flex;
	}

	.nav-menu {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		background: var(--color-white);
		box-shadow: 0 8px 16px rgba(0,0,0,0.08);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}

	.nav-menu.is-open {
		max-height: 240px;
	}

	.nav-menu a {
		width: 100%;
		padding: 14px 20px;
		border-top: 1px solid #f0f0f0;
	}

	.nav-toggle.is-open span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}

	.nav-toggle.is-open span:nth-child(2) {
		opacity: 0;
	}

	.nav-toggle.is-open span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}

	.cover {
		height: 32vh;
		min-height: 180px;
	}

	.search-tab {
		padding: 14px 12px;
		font-size: 0.9rem;
	}

	.search-panel {
		padding: 22px 16px 20px;
	}

	.search-categories {
		gap: 10px;
	}

	.category-pill {
		flex: 0 1 calc(50% - 5px);
		padding: 10px 14px;
		font-size: 0.9rem;
	}
}
