:root {
	/* Colors from Fiestón Logo */
	--primary-purple: #cc00ff;
	--logo-pink: #7a00dd;
	--dark-purple: #1a0030;
	--glass-bg: rgba(255, 255, 255, 0.1);
	--glass-border: rgba(255, 255, 255, 0.2);
	--neon-pink-border: rgba(255, 147, 233, 0.637);
	--white: #ffffff;
	--transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset y Base */
* { 
	box-sizing: border-box; 
	margin: 0; 
	padding: 0; 
	-webkit-tap-highlight-color: transparent; 
}

body { 
	font-family: 'Inter', sans-serif; 
	background-color: var(--dark-purple);
	color: var(--white); 
	line-height: 1.5;
	overflow-x: hidden;
	min-height: 100vh;
	position: relative;
}

/* Fixed festive background via pseudo-element — works correctly on iOS/mobile */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: 
		linear-gradient(135deg, rgba(26, 0, 48, 0) 0%, rgba(80, 0, 120, 0) 50%, rgba(26, 0, 48, 0) 100%),
		url('bg-fieston.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	z-index: -1;
	will-change: transform;
}

.container { 
	max-width: 1200px; 
	margin: 0 auto; 
	padding: 0 20px; 
}

/* Header Glassmorphism */
header { 
	background: rgba(47, 0, 104, 0.404);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	padding: 10px 0; 
	position: sticky; 
	top: 0; 
	z-index: 1000; 
	border-bottom: 1px solid var(--neon-pink-border);
}

.nav-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

/* Logo Integration with Glow Effect */
.logo-container {
	height: 70px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.logo-img {
	height: 100%;
	width: auto;
	filter: drop-shadow(0 0 8px rgba(255, 110, 226, 0.5));
	animation: logo-pulse 3s infinite ease-in-out;
}

@keyframes logo-pulse {
	0% { filter: drop-shadow(0 0 5px rgba(255, 100, 0, 0.5)); transform: scale(1); }
	50% { filter: drop-shadow(0 0 18px rgba(255, 200, 0, 0.9)); transform: scale(1.03); }
	100% { filter: drop-shadow(0 0 5px rgba(255, 100, 0, 0.5)); transform: scale(1); }
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 15px;
}

.social-group, .contact-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-divider {
	width: 1px;
	height: 24px;
	background: var(--glass-border);
	margin: 0 5px;
}

.contact-link, .social-link {
	display: flex;
	align-items: center;
	gap: 5px;
	text-decoration: none;
	color: var(--white);
	font-size: 0.85rem;
	font-weight: 600;
	transition: var(--transition);
	opacity: 0.9;
}

.social-link:hover { transform: translateY(-3px); color: var(--logo-pink); opacity: 1; }
.whatsapp-style { color: #25D366 !important; opacity: 1; }
.location-style { color: var(--logo-pink) !important; opacity: 1; }

@keyframes whatsapp-pulse {
	0%   { filter: drop-shadow(0 0 0px rgba(37, 211, 102, 0)); transform: scale(1); }
	50%  { filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.9)); transform: scale(1.18); }
	100% { filter: drop-shadow(0 0 0px rgba(37, 211, 102, 0)); transform: scale(1); }
}
.whatsapp-style {
	animation: whatsapp-pulse 2.2s infinite ease-in-out;
}

.nav-bottom { width: 100%; }

#searchInput { 
	width: 100% !important;
	padding: 12px 20px; 
	border-radius: 15px; 
	border: 1px solid var(--glass-border); 
	background: var(--glass-bg);
	backdrop-filter: blur(5px);
	color: white;
	outline: none; 
	font-size: 0.9rem;
	transition: var(--transition); 
}
#searchInput::placeholder { color: rgba(255,255,255,0.6); }
#searchInput:focus { 
	border-color: var(--logo-pink); 
	box-shadow: 0 0 15px rgba(255, 0, 204, 0.3);
}

/* Hero Carrusel */
.hero-container { 
	width: 100%; 
	height: 350px; 
	position: relative; 
	overflow: hidden; 
	background: #000;
	border-bottom: 2px solid var(--logo-pink);
}

@media (max-width: 600px) {
	.hero-container { height: 250px; }
}

.carousel { 
	height: 100%; 
	display: flex; 
	transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); 
}

.slide { 
	min-width: 100%; 
	height: 100%; 
	position: relative; 
}

.slide img { 
	width: 100%; 
	height: 100%; 
	object-fit: cover; 
}

.slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(45deg, rgba(105, 0, 87, 0.628), rgba(0, 41, 116, 0.547));
}

.slide-content { 
	position: absolute; 
	inset: 0; 
	display: flex; 
	flex-direction: column; 
	align-items: center; 
	justify-content: center; 
	color: white; 
	text-align: center; 
	z-index: 2;
	padding: 20px;
}

.slide h2 { font-size: 2.5rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.slide p { font-size: 1.2rem; opacity: 1; font-weight: 500; }

/* =============================================
   BARRA DE CATEGORÍAS PRINCIPALES
   ============================================= */
.category-bar { 
	display: flex; 
	gap: 10px; 
	padding: 16px 20px 10px 20px; 
	overflow-x: auto; 
	background: transparent;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-btn { 
	padding: 10px 20px; 
	border-radius: 50px; 
	border: 1px solid var(--glass-border); 
	background: var(--glass-bg); 
	cursor: pointer; 
	white-space: nowrap; 
	font-weight: 600; 
	font-size: 0.88rem;
	color: white;
	backdrop-filter: blur(5px);
	transition: var(--transition);
	display: flex;
	align-items: center;
	gap: 6px;
}

.cat-btn .cat-emoji {
	font-size: 1rem;
}

.cat-btn.active { 
	background: var(--logo-pink); 
	color: white; 
	border-color: rgba(255,255,255,0.5);
	box-shadow: 0 0 18px rgba(120, 0, 220, 0.7);
}

.cat-btn:hover:not(.active) {
	background: rgba(255,255,255,0.15);
	transform: translateY(-2px);
}

/* =============================================
   BARRA DE SUBCATEGORÍAS — Aparece con animación
   ============================================= */
.subcategory-wrapper {
	overflow: hidden;
	max-height: 0;
	transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
	opacity: 0;
}

.subcategory-wrapper.visible {
	max-height: 80px; /* suficiente para una fila de pills */
	opacity: 1;
}

.subcategory-bar {
	display: flex;
	gap: 8px;
	padding: 6px 20px 14px 20px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	/* Línea divisoria sutil arriba */
	border-top: 1px solid rgba(255,255,255,0.08);
}
.subcategory-bar::-webkit-scrollbar { display: none; }

.subcat-btn {
	padding: 7px 16px;
	border-radius: 50px;
	border: 1px solid rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.05);
	cursor: pointer;
	white-space: nowrap;
	font-size: 0.82rem;
	font-weight: 600;
	color: rgba(255,255,255,0.8);
	transition: var(--transition);
	flex-shrink: 0;
}

.subcat-btn.active {
	background: linear-gradient(90deg, var(--primary-purple), var(--logo-pink));
	color: white;
	border-color: rgba(255,255,255,0.4);
	box-shadow: 0 0 12px rgba(204, 0, 255, 0.5);
}

.subcat-btn:hover:not(.active) {
	background: rgba(255,255,255,0.12);
	color: white;
	transform: translateY(-1px);
}

/* Label de categoría activa sobre el grid */
.active-filter-label {
	padding: 6px 20px 0 20px;
	font-size: 0.8rem;
	color: rgba(255,255,255,0.5);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-weight: 600;
	min-height: 24px;
	transition: opacity 0.3s;
}

/* Grid de Productos Glass */
.product-grid { 
	display: grid; 
	grid-template-columns: repeat(2, 1fr); 
	gap: 20px; 
	padding: 20px 0 100px 0; 
}

@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card { 
	background: rgba(255, 255, 255, 0.05); 
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-radius: 24px; 
	padding: 16px; 
	border: 1px solid var(--neon-pink-border); 
	display: flex; 
	flex-direction: column;
	transition: var(--transition);
	height: 100%; 
}

.product-card:hover { 
	transform: translateY(-8px); 
	background: rgba(255, 255, 255, 0.12);
	box-shadow: 0 15px 30px rgba(255, 0, 204, 0.2);
}

.product-img { 
	width: 100%; 
	aspect-ratio: 1; 
	object-fit: cover; 
	border-radius: 18px; 
	margin-bottom: 15px; 
}

.product-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--white); }
.product-desc { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 15px; flex-grow: 1; }
.price { 
	font-weight: 800; 
	font-size: 1.3rem; 
	color: rgba(255, 255, 255, 0.7);
	margin-bottom: 10px; 
}

/* Controles de Cantidad Glass */
.qty-container { 
	display: flex; align-items: center; justify-content: center; gap: 12px; 
	background: rgba(0,0,0,0.3); border-radius: 14px; padding: 8px; margin-bottom: 15px;
}

.qty-btn { 
	background: var(--glass-bg); border: 1px solid var(--glass-border); 
	width: 32px; height: 32px; border-radius: 8px; 
	cursor: pointer; color: white; font-weight: 800;
}

.qty-input { width: 35px; text-align: center; border: none; background: transparent; color: white; font-weight: 800; }

.buy-btn { 
	background: linear-gradient(90deg, var(--primary-purple), var(--logo-pink));
	color: white; border: none; padding: 14px; border-radius: 16px; 
	font-weight: 700; cursor: pointer; transition: var(--transition);
}
.buy-btn:hover { filter: brightness(1.2); box-shadow: 0 5px 15px rgba(255, 0, 204, 0.4); }

/* Sold out */
.product-card.sold-out { opacity: 0.6; }
.product-card.sold-out .product-img { filter: grayscale(80%); }
.sold-out-badge {
	display: inline-block;
	background: rgba(255,50,50,0.25);
	border: 1px solid rgba(255,80,80,0.5);
	color: #ff8080;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 50px;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.buy-btn:disabled {
	background: rgba(255,255,255,0.1);
	cursor: not-allowed;
	filter: none;
	box-shadow: none;
}

/* Floating Cart */
.cart-floating-btn {
	position: fixed; bottom: 30px; right: 30px;
	background: var(--logo-pink);
	width: 60px; height: 60px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 0 25px rgba(255, 0, 204, 0.6);
	z-index: 2000; border: 3px solid white;
}

.cart-icon-svg {
	transform: scale(0.85);
	width: 32px;
	height: 32px;
}

.cart-floating-btn:hover { transform: scale(1.1); }

@keyframes bump {
	0% { transform: scale(1); }
	50% { transform: scale(1.4); }
	100% { transform: scale(1); }
}
.bump { animation: bump 0.4s ease-out; }

#cartCount {
	position: absolute; top: -5px; right: -5px;
	background: white; color: var(--logo-pink);
	min-width: 28px; height: 28px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 900; border: 2px solid var(--logo-pink);
}

/* Modal Glass */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 3000; backdrop-filter: blur(8px); }
.modal-content { 
	background: rgba(30, 0, 51, 0.95);
	backdrop-filter: blur(20px);
	border: 1px solid var(--logo-pink);
	color: white;
	width: 95%; max-width: 500px; margin: 40px auto; padding: 30px; border-radius: 32px;
	position: relative; max-height: 85vh; overflow-y: auto;
}

.close-modal { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer; }
.cart-item-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--glass-border); }
.remove-btn { background: rgba(255, 0, 0, 0.2); color: #ff4d4d; border: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.total-section { padding: 20px 0; text-align: right; font-size: 1.4rem; font-weight: 800; color: var(--logo-pink); }
.bank-info { background: var(--glass-bg); padding: 15px; border-radius: 15px; margin-bottom: 20px; font-size: 0.9rem; }
.whatsapp-btn { width: 100%; background: #25D366; color: white; border: none; padding: 18px; border-radius: 15px; font-weight: 700; cursor: pointer; }
#customerName { width: 100%; padding: 12px; margin-bottom: 15px; background: var(--glass-bg); color: white; border: 1px solid var(--glass-border); border-radius: 10px; }

/* Toast */
.toast { 
	position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%);
	background: var(--logo-pink); color: white; padding: 12px 30px; 
	border-radius: 50px; border: 1px solid white; z-index: 4000; 
	opacity: 0; transition: 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; bottom: 130px; }

/* Empty state */
.empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 60px 20px;
	color: rgba(255,255,255,0.4);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 1rem; font-weight: 500; }
