:root {
	--nav-height: 115px;
	--accent: #06b6d4;
	--text: #000;
	--muted: rgba(255, 255, 255, 0.75);
	--corporative: #006faa;
	--line: #e6e6e6;
	--card-padding: 28px;
	--max-width: 1500px;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: sans-serif;
	padding: 0px;
	font-family: "Poppins", sans-serif;
	color: var(--text);
}

* {
	box-sizing: border-box;
}

h2,
h4 {
	border-bottom: 7px var(--corporative) solid;
	display: inline-block;
	margin: 0;
	font-weight: 400;
	font-size: 35px;
}

main {
	margin-top: var(--nav-height);
}

.presentation-grid {
	display: grid;
	text-align: center;
	padding: 0 !important;
	color: #fff;
}

/* .presentation-grid img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 12px;
	margin: auto;
} */

/* Responsive: en mobile → 1 columna */
/* @media (max-width: 768px) {
	.presentation-grid {
		grid-template-columns: 1fr;
	}
} */

.presentation-grid div:first-child {
	max-width: 1200px;
	width: 100%;
	margin: auto;
}

.presentation-grid div:last-child {
	background-color: var(--corporative);
}

#category-presentation {
	text-align: center;
}
#category-presentation p {
	padding: 0 0 20px 0;
	font-size: 18px;
}

#category-presentation > div > div {
	max-width: var(--max-width);
	margin: auto;
	padding: 15px 5px;
	margin-bottom: 15px;
}

#category-presentation > div {
	scroll-margin-top: 200px;
	padding: 0 20px;
}

#category-presentation > div:nth-child(odd) {
	background-color: #ececf1;
}

.presentation div {
	padding: 30px 5px;
}

.category-header {
	scroll-margin-top: 80px;
}

.contenedor {
	/* max-width: 1400px; */
	width: 100%;
	column-count: 4; /* máximo 3 columnas */
	column-gap: 16px;
}

.producto {
	display: block;
	width: 100%;
	margin: 0 0 16px 0;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	background: white;
	overflow: hidden;
	position: relative;
	transition: opacity 0.5s ease-out, max-height 1s ease-out;
	opacity: 1;
	max-height: 1000px;
}

.producto.oculto {
	display: none;
	/* opacity: 0;
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
	margin-bottom: 0; */
	/* position: absolute; */
}

.producto img {
	width: 100%;
	height: auto;
	display: block;
}

.info {
	padding: 8px 12px;
	text-align: center;
	font-weight: bold;
}

.overlay {
	position: absolute;
	inset: 0;
	background: var(--corporative);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* .producto:hover .overlay {
	opacity: 1;
} */

/* Responsive */
@media (max-width: 768px) {
	.contenedor {
		column-count: 3;
	}
}

@media (max-width: 480px) {
	.contenedor {
		column-count: 2;
	}
}

/* nav button {
	background-color: #fff;
	border: 1px solid #006faa;
	color: #006faa;
	margin-bottom: 5px;
	padding: 8px 16px;
	margin-right: 8px; 
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
	transition: all 0.3s ease; 
}


nav button:hover {
	background-color: #006faa;
	color: #fff;
}


nav button.active {
	background-color: #006faa;
	color: #fff;
	border-color: #006faa;
}  */

/* contacto*/

#contacto {
	margin-top: 50px;
	background-color: #f9f9f9;
	padding: 25px;
}

#contacto > div {
	margin: auto;
	max-width: var(--max-width);
}

/*form*/

form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 24px 0;
}

label {
	font-weight: 600;
	margin-bottom: 6px;
	display: block;
	color: #333;
}

input,
textarea {
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid #ddd;
	font-size: 1rem;
	width: 100%;
	transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
	border-color: #006faa;
	box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
	outline: none;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

button {
	background: #006faa;
	color: white;
	border: none;
	padding: 14px;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-block;
	max-width: 200px;
	width: 100%;
	margin: auto;
}

button:hover {
	background: #b0b1af;
	transform: translateY(-3px);
	/* box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4); */
}

#formSubmit {
	position: relative;
	padding: 10px 25px;
	font-size: 16px;
	background: #006faa;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	overflow: hidden;
	transition: background 0.3s ease;
}

#formSubmit:hover {
	background: #b0b1af;
}

#formSubmit .loader {
	display: none; /* oculto por defecto */
	position: absolute;
	right: 15px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border: 3px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

#formSubmit.loading .loader {
	display: inline-block;
}

#formSubmit.loading .btn-text {
	opacity: 0.6; /* opcional: suaviza el texto mientras carga */
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.footer {
	background-color: #f9f9f9;
	color: #555;
	font-size: 0.85rem;
	text-align: center;
	padding: 16px 10px;
	border-top: 1px solid #eee;
	margin-top: 50px;
}

.footer a {
	color: #555;
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer a:hover {
	color: #006faa;
}

.footer-content p {
	margin: 4px 0;
}

.footer .socials a {
	margin: 0 4px;
	font-weight: 600;
}

header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 80px;
	background: var(--corporative);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center; /* centra el nav */
	padding: 0 1rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	transition: height 0.3s ease;
}

/* LOGO a la izquierda */
.logo-container {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}
.logo {
	height: 60px;
	width: auto;
	border-radius: 8px;

	/* oculto al inicio en desktop */
	opacity: 0;
	transform: scale(0.8);

	/* animación con scroll */
	animation: showLogo linear both;
	animation-timeline: scroll(root block);
	animation-range: 50px 200px; /* aparece entre 50 y 200px de scroll */
}

/* Keyframes para mostrar logo */
@keyframes showLogo {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* NAV links centrado */
.nav-links {
	display: flex;
	gap: 1rem;
}
.nav-links a {
	color: #fff;
	text-decoration: none;
	font-weight: 500;
	padding: 0.35rem 0.75rem;
	border-radius: 6px;
}
.nav-links a:hover {
	color: var(--corporative);
	background: #fff;
}

/* Checkbox oculto */
#menu-toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	overflow: hidden;
}

/* Botón hamburguesa */
.hamburger {
	display: none;
	font-size: 1.8rem;
	cursor: pointer;
	color: #fff;
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

/* Responsive */
@media (max-width: 1768px) {
	.hamburger {
		display: block;
	}

	.nav-links {
		flex-direction: column;
		background: var(--corporative);
		position: fixed;
		top: 80px;
		left: 0;
		right: 0;
		transform: translateY(-120%);
		transition: transform 0.3s ease-in-out;
		padding: 1rem 0;
	}
	#menu-toggle:checked ~ .nav-links {
		transform: translateY(0);
		bottom: 0;
	}
	.nav-links a {
		display: block;
		padding: 1rem;
		text-align: center;
	}

	/* 🔹 En mobile: logo siempre visible */
	.logo {
		animation: none;
		opacity: 1;
		transform: scale(1);
		height: 60px;
	}
}

.products {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	max-width: var(--max-width);
	margin: 0 auto;
}

/* Tarjeta = celda */
.product {
	background: #fff;
	padding: var(--card-padding);
	display: flex;
	flex-direction: column;
	border: none; /* por defecto sin bordes */
}

/* Bordes SOLO en medio */
.product:not(:nth-child(5n)) {
	border-right: 1px solid var(--line); /* solo entre columnas */
}
.product:not(:nth-last-child(-n + 5)) {
	border-bottom: 1px solid var(--line); /* solo entre filas */
}
.product:last-child {
	border-right: none;
}

/* Imagen */
.card-image {
	overflow: hidden;
	border-radius: 8px;
}
.card-image img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* Texto */
.product h3 {
	margin: 0 0 12px;
	font-size: 1.125rem;
	color: #2b2b2b;
}
.product .excerpt {
	margin: 0 0 18px;
	color: #7b7b7b;
	line-height: 1.6;
	flex: 1;
}

/* Botón */
.btn {
	display: inline-block;
	border: 1px solid #e06b63;
	color: #e06b63;
	padding: 10px 18px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
}

/* --- Responsive --- */

/* Tablet: 2 columnas */
@media (max-width: 900px) {
	.products {
		grid-template-columns: repeat(3, 1fr);
	}
	.product {
		border: none;
	}
	.product:not(:nth-child(3n)) {
		border-right: 1px solid var(--line); /* entre columnas */
	}
	.product:not(:nth-last-child(-n + 3)) {
		border-bottom: 1px solid var(--line); /* entre filas */
	}
}

/* Mobile: 1 columna */
@media (max-width: 600px) {
	.products {
		grid-template-columns: 1fr;
		margin: 24px 16px;
	}
	.product {
		border: none;
	}
	.product:not(:nth-child(2n)) {
		border-right: none;
	}
	.product:not(:last-child) {
		border-bottom: 1px solid var(--line); /* solo entre filas */
	}
}

.category-header {
	background: var(--line);
	padding: 30px 0;
}

.category-header > div {
	margin: auto;
	max-width: var(--max-width);
	padding: 0 28px;
}

#toast-container {
	position: fixed;
	bottom: 20px;
	right: 100px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.toast {
	padding: 14px 20px;
	border-radius: 8px;
	color: #fff;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: translateY(-20px);
	animation: slideIn 0.4s forwards, fadeOut 0.4s forwards 3s;
}

/* Colores según tipo */
.toast.success {
	background: #4caf50; /* verde */
}
.toast.error {
	background: #f44336; /* rojo */
}

/* Animaciones */
@keyframes slideIn {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes fadeOut {
	to {
		opacity: 0;
		transform: translateY(-20px);
	}
}
