/**
 * GREENEX Home — estilos del front-page rediseñado.
 * Animaciones estilo "scroll reveal" con soporte prefers-reduced-motion.
 */

/* Full-bleed: el home rompe el contenedor de Astra y va de borde a borde */
#gx-home {
	overflow-x: hidden;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.home .site-content .ast-container {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}

.home .site-content {
	padding: 0 !important;
	margin: 0 !important;
}

.home #primary {
	margin: 0;
	padding: 0;
}

/* ============ SISTEMA DE REVEAL ============ */
.gx-reveal {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
	will-change: opacity, transform;
}

.gx-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Stagger para grillas */
.gx-product-grid .gx-reveal:nth-child(2) { transition-delay: 0.12s; }
.gx-product-grid .gx-reveal:nth-child(3) { transition-delay: 0.24s; }
.gx-product-grid .gx-reveal:nth-child(4) { transition-delay: 0.36s; }
.gx-trust .gx-reveal:nth-child(2) { transition-delay: 0.15s; }
.gx-trust .gx-reveal:nth-child(3) { transition-delay: 0.3s; }

/* ============ HERO ============ */
.gx-hero {
	position: relative;
	min-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(50, 205, 50, 0.35), transparent 60%),
		radial-gradient(900px 500px at 10% 110%, rgba(255, 215, 0, 0.18), transparent 55%),
		linear-gradient(165deg, #01330a 0%, #045c14 45%, #0f7a1f 100%);
}

/* Brillos suaves flotantes (decorativos) */
.gx-hero-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	opacity: 0.5;
	pointer-events: none;
}

.gx-hero-glow-1 {
	width: 480px;
	height: 480px;
	top: -120px;
	right: -100px;
	background: rgba(50, 205, 50, 0.45);
	animation: gx-float 14s ease-in-out infinite;
}

.gx-hero-glow-2 {
	width: 380px;
	height: 380px;
	bottom: -140px;
	left: -80px;
	background: rgba(255, 215, 0, 0.28);
	animation: gx-float 18s ease-in-out infinite reverse;
}

@keyframes gx-float {
	0%, 100% { transform: translate(0, 0); }
	50%      { transform: translate(30px, 24px); }
}

.gx-hero-content {
	position: relative;
	z-index: 1;
	max-width: 820px;
	padding: 0 24px;
}

.gx-hero-title {
	color: #fff;
	font-size: clamp(2.6rem, 7vw, 5rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
	margin: 0 0 0.4em;
	opacity: 0;
	transform: translateY(30px);
}

.gx-hero-sub {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(1.05rem, 2.4vw, 1.45rem);
	line-height: 1.5;
	margin: 0 auto 1.6em;
	max-width: 640px;
	opacity: 0;
	transform: translateY(30px);
}

.gx-hero-ctas {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
	opacity: 0;
	transform: translateY(30px);
}

.gx-loaded .gx-hero-title { animation: gx-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.15s forwards; }
.gx-loaded .gx-hero-sub   { animation: gx-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.35s forwards; }
.gx-loaded .gx-hero-ctas  { animation: gx-rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.55s forwards; }

@keyframes gx-rise {
	to { opacity: 1; transform: none; }
}

.gx-scroll-cue {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.85);
	animation: gx-bounce 2.2s ease-in-out infinite;
	z-index: 1;
}

@keyframes gx-bounce {
	0%, 100% { transform: translate(-50%, 0); }
	50%      { transform: translate(-50%, 10px); }
}

/* ============ BOTONES ============ */
.gx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 34px;
	border-radius: 999px;
	font-size: 1.05rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
	cursor: pointer;
}

.gx-btn:hover {
	transform: translateY(-2px) scale(1.02);
}

.gx-btn-primary {
	background: var(--greenex-primary, #228B22);
	color: #fff !important;
	box-shadow: 0 6px 20px rgba(34, 139, 34, 0.45);
}

.gx-btn-primary:hover {
	background: var(--greenex-dark, #006400);
	box-shadow: 0 10px 28px rgba(34, 139, 34, 0.55);
}

.gx-btn-ghost {
	background: rgba(255, 255, 255, 0.12);
	color: #fff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(6px);
}

.gx-btn-ghost:hover {
	background: rgba(255, 255, 255, 0.24);
}

.gx-btn-gold {
	background: var(--greenex-accent, #FFD700);
	color: var(--greenex-dark, #006400) !important;
	box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.gx-btn-gold:hover {
	background: var(--greenex-accent-alt, #FFA500);
}

.gx-btn-small {
	padding: 10px 22px;
	font-size: 0.95rem;
}

/* ============ SECCIONES ============ */
.gx-section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 90px 24px 60px;
}

.gx-section-title {
	text-align: center;
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--greenex-text, #2D2D2D);
	margin: 0 0 0.3em;
}

.gx-section-sub {
	text-align: center;
	font-size: clamp(1rem, 2vw, 1.25rem);
	color: var(--greenex-muted, #666);
	margin: 0 auto 2.5em;
	max-width: 600px;
}

.gx-center { text-align: center; margin-top: 36px; }

/* ============ PRODUCTOS ============ */
.gx-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 28px;
}

.gx-product-card {
	background: #fff;
	border-radius: var(--greenex-radius-xl, 16px);
	padding: 28px 22px;
	text-align: center;
	box-shadow: var(--greenex-shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.05));
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gx-product-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--greenex-shadow-lg, 0 8px 25px rgba(34, 139, 34, 0.2));
}

.gx-product-media img {
	width: 100%;
	height: 220px;
	object-fit: contain;
	transition: transform 0.4s ease;
}

.gx-product-card:hover .gx-product-media img {
	transform: scale(1.05);
}

.gx-product-name {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 14px 0 6px;
}

.gx-product-name a {
	color: var(--greenex-text, #2D2D2D);
	text-decoration: none;
}

.gx-product-price {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--greenex-primary, #228B22);
	margin-bottom: 16px;
}

.gx-product-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.gx-link-more {
	color: var(--greenex-primary, #228B22);
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease;
}

.gx-link-more:hover {
	color: var(--greenex-dark, #006400);
	text-decoration: underline;
}

.gx-link-big { font-size: 1.15rem; }

/* ============ CATEGORÍAS ============ */
.gx-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 22px;
}

.gx-cat-card {
	display: block;
	text-decoration: none;
	background: #fff;
	border-radius: var(--greenex-radius-xl, 16px);
	overflow: hidden;
	box-shadow: var(--greenex-shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.05));
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gx-cat-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--greenex-shadow-lg, 0 8px 25px rgba(34, 139, 34, 0.2));
}

.gx-cat-media {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, var(--greenex-bg-light, #E8F5E9), var(--greenex-bg-mid, #C8E6C9));
	overflow: hidden;
}

.gx-cat-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.gx-cat-card:hover .gx-cat-media img {
	transform: scale(1.06);
}

.gx-cat-letter {
	font-size: 3rem;
	font-weight: 800;
	color: var(--greenex-primary, #228B22);
	opacity: 0.65;
}

.gx-cat-info {
	padding: 14px 16px 16px;
	text-align: center;
}

.gx-cat-name {
	display: block;
	font-weight: 700;
	font-size: 1.02rem;
	color: var(--greenex-text, #2D2D2D);
}

.gx-cat-count {
	display: block;
	font-size: 0.85rem;
	color: var(--greenex-muted, #666);
	margin-top: 2px;
}

/* Stagger de categorías */
.gx-cat-grid .gx-reveal:nth-child(2) { transition-delay: 0.1s; }
.gx-cat-grid .gx-reveal:nth-child(3) { transition-delay: 0.2s; }
.gx-cat-grid .gx-reveal:nth-child(4) { transition-delay: 0.3s; }
.gx-cat-grid .gx-reveal:nth-child(5) { transition-delay: 0.4s; }
.gx-cat-grid .gx-reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============ BIG STATEMENT ============ */
.gx-statement {
	text-align: center;
	padding-top: 70px;
	padding-bottom: 70px;
}

.gx-statement-title {
	font-size: clamp(2.4rem, 6.5vw, 4.4rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.1;
	margin: 0 0 0.35em;
	background: linear-gradient(120deg, var(--greenex-dark, #006400), var(--greenex-light, #32CD32));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--greenex-primary, #228B22);
}

.gx-statement-sub {
	font-size: clamp(1.05rem, 2.2vw, 1.35rem);
	color: var(--greenex-muted, #666);
	margin: 0 auto;
	max-width: 560px;
}

/* ============ CONFIANZA ============ */
.gx-trust {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
	text-align: center;
}

.gx-trust-icon {
	font-size: 2.6rem;
	margin-bottom: 12px;
}

.gx-trust-item h3 {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--greenex-text, #2D2D2D);
	margin: 0 0 8px;
}

.gx-trust-item p {
	color: var(--greenex-muted, #666);
	font-size: 0.98rem;
	margin: 0;
}

/* ============ CTA FINAL ============ */
.gx-cta-final {
	background: linear-gradient(135deg, var(--greenex-dark, #006400), var(--greenex-primary, #228B22));
	text-align: center;
	padding: 90px 24px;
	margin-top: 60px;
}

.gx-cta-final h2 {
	color: #fff;
	font-size: clamp(1.9rem, 4.5vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	margin: 0 0 0.8em;
}

/* ============ ACCESIBILIDAD ============ */
@media (prefers-reduced-motion: reduce) {
	.gx-reveal,
	.gx-hero-title,
	.gx-hero-sub,
	.gx-hero-ctas {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
		animation: none !important;
	}
	.gx-hero-glow { animation: none; }
	.gx-scroll-cue { animation: none; }
}

@media (max-width: 768px) {
	.gx-hero { min-height: 72vh; }
	.gx-section { padding: 60px 18px 40px; }
}
