/* ==========================================================================
   Marketplace Solidario Riosucio — HOJA DE ESTILOS (2026)
   ========================================================================== */

:root {
  --bg-dark: #050505;
  --bg-darker: #050505;
  --panel-glass: rgba(255, 255, 255, 0.03);
  --panel-border: rgba(255, 255, 255, 0.15);
  --accent-violet: #5e17eb;
  --accent-lime: #ccff66;
  --text-main: #ffffff;
  --text-sub: #a1a1aa;
  --font-title: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --alert-yellow: #f5a623;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; width: 100%; }
body { background-color: var(--bg-dark); color: var(--text-main); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; width: 100%; max-width: 100vw; }

/* Tipografías base */
.title-bricolage { font-family: var(--font-title); font-weight: 800; color: #fff; }
.font-poppins { font-family: var(--font-body); }
.highlight-lime { color: var(--accent-lime) !important; text-shadow: 0 0 15px rgba(204, 255, 102, 0.4); }

.landing-wrapper { width: 100%; max-width: 100vw; overflow-x: hidden; }

/* ==========================================================================
   1. TOP BANNER Y HEADER INSTITUCIONAL
   ========================================================================== */
.top-alert-banner {
  background: var(--alert-yellow);
  color: #000;
  text-align: center;
  padding: 10px 16px;
  font-size: 9.5pt;
  font-weight: 700;
  z-index: 10001;
  position: relative;
}

.header-sticky {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 12px 16px;
  width: 100%;
}

.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }

.brand-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; z-index: 10000; }
.brand-img-logo { height: 40px; width: auto; object-fit: contain; }
.fallback-text-logo { font-size: 18pt; margin: 0; }
.initiative-badge { background: rgba(94, 23, 235, 0.2); border: 1px solid var(--accent-violet); color: #fff; font-size: 7.5pt; font-weight: 600; padding: 4px 8px; border-radius: 6px; }

/* Menú Móvil */
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 28px; height: 20px; cursor: pointer; z-index: 10000; }
.menu-toggle .bar { height: 3px; width: 100%; background-color: #fff; border-radius: 3px; transition: 0.3s; }

.nav-menu { display: flex; align-items: center; gap: 16px; }

.btn-guide-link {
  color: #fff;
  text-decoration: none;
  font-size: 9pt;
  font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
}
.btn-guide-link:hover { border-color: var(--accent-lime); color: var(--accent-lime); }

.btn-cta-header {
  background: var(--accent-violet);
  color: #fff;
  border: 1px solid var(--accent-violet);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 9pt;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(94, 23, 235, 0.5);
  transition: all 0.3s ease;
}
.btn-cta-header:hover { background: #7a3bf0; box-shadow: 0 0 24px rgba(94, 23, 235, 0.8); }

/* ==========================================================================
   2. HERO SECTION & BUSCADOR EN VIVO
   ========================================================================== */
.hero-section {
  position: relative;
  max-width: 100%;
  padding: 80px 16px 60px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, #050505 0%, #12072b 100%);
  overflow: hidden;
}

.ambient-mesh-1, .ambient-mesh-2 { position: absolute; border-radius: 50%; filter: blur(100px); z-index: 0; pointer-events: none; animation: moveMesh 12s infinite alternate ease-in-out; }
.ambient-mesh-1 { top: -10%; left: 20%; width: 400px; height: 400px; background: rgba(94, 23, 235, 0.3); }
.ambient-mesh-2 { bottom: 10%; right: 10%; width: 350px; height: 350px; background: rgba(204, 255, 102, 0.15); animation-duration: 15s; animation-direction: alternate-reverse; }

@keyframes moveMesh {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 50px) scale(1.1); }
  100% { transform: translate(-30px, -20px) scale(0.9); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; width: 100%; }

.eyebrow-badge { display: inline-block; color: var(--text-main); font-size: 8.5pt; font-weight: 700; letter-spacing: 1.5px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.3); padding: 6px 14px; border-radius: 12px; margin-bottom: 20px; }
.hero-title { font-size: 32pt; line-height: 1.15; margin-bottom: 20px; }
.hero-sub { font-size: 11pt; color: #ddd; margin-bottom: 40px; line-height: 1.6; }

/* Buscador Inteligente */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 14pt; }
.search-input {
  width: 100%;
  padding: 18px 20px 18px 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--accent-lime);
  border-radius: 16px;
  color: #fff;
  font-size: 11pt;
  outline: none;
  box-shadow: 0 0 20px rgba(204, 255, 102, 0.15);
  transition: all 0.3s ease;
}
.search-input:focus { background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 30px rgba(204, 255, 102, 0.3); }
.search-input::placeholder { color: #aaa; }

/* ==========================================================================
   3. MÓDULO DE CATEGORÍAS (CARRUSEL TÁCTIL)
   ========================================================================== */
.categories-section {
  padding: 60px 16px;
  max-width: 1200px;
  margin: 0 auto;
  background: linear-gradient(180deg, #12072b 0%, #050505 100%);
}

.section-header { text-align: center; margin-bottom: 30px; }
.section-header .title-bricolage { font-size: 24pt; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  overflow-x: auto; /* Permite carrusel táctil en móviles */
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}
.categories-grid::-webkit-scrollbar { height: 6px; }
.categories-grid::-webkit-scrollbar-thumb { background: var(--accent-violet); border-radius: 10px; }

.category-card {
  position: relative;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--panel-border);
  border-radius: 16px;
  aspect-ratio: 1/1; /* Cuadradas */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  min-width: 140px;
  transition: all 0.3s ease;
}

.cat-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(94, 23, 235, 0.2) 0%, rgba(204, 255, 102, 0.1) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

.category-card h3 {
  position: relative;
  z-index: 2;
  font-size: 12pt;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.category-card:hover, .category-card.active-cat {
  border-color: var(--accent-lime);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(204, 255, 102, 0.2);
}
.category-card:hover .cat-overlay, .category-card.active-cat .cat-overlay { opacity: 0.6; }

/* ==========================================================================
   4. FEED DEL MARKETPLACE & MINI-APP
   ========================================================================== */
.marketplace-feed {
  padding: 40px 16px 80px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.btn-reset-filters {
  background: rgba(255,255,255,0.1); border: 1px solid #fff; color: #fff;
  padding: 6px 12px; border-radius: 12px; font-size: 8pt; margin-top: 10px; cursor: pointer;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Tarjeta Comerciante Base */
.merchant-card {
  background: var(--panel-glass);
  border: 1.5px solid rgba(204, 255, 102, 0.3);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 0 10px rgba(94, 23, 235, 0.05);
}

.merchant-header { margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 16px; }
.merchant-info h3 { font-size: 16pt; margin-bottom: 4px; color: var(--accent-lime); }
.merchant-owner { font-size: 9pt; color: #ccc; margin-bottom: 10px; }
.location-badge { display: inline-block; background: rgba(94, 23, 235, 0.2); border: 1px solid var(--accent-violet); color: #fff; font-size: 8pt; font-weight: 500; padding: 4px 10px; border-radius: 8px; line-height: 1.4; }

/* Mini-App de Pedidos */
.mini-app-container { flex-grow: 1; display: flex; flex-direction: column; }
.mini-app-title { font-size: 10pt; color: #fff; margin-bottom: 12px; }

.product-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; flex-grow: 1; }
.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.4);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}
.product-name { font-size: 8.5pt; color: #eee; flex-grow: 1; padding-right: 10px; }

.quantity-controls { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border-radius: 20px; padding: 2px; }
.btn-qty { background: transparent; border: none; color: #fff; width: 24px; height: 24px; font-size: 12pt; font-weight: 700; cursor: pointer; border-radius: 50%; transition: background 0.2s; }
.btn-qty:hover { background: var(--accent-violet); }
.qty-display { font-size: 9pt; font-weight: 600; width: 16px; text-align: center; }

.cart-summary { display: flex; justify-content: space-between; align-items: center; background: rgba(204, 255, 102, 0.1); border: 1px solid rgba(204, 255, 102, 0.3); padding: 12px; border-radius: 12px; margin-bottom: 16px; }
.cart-summary span { font-size: 9.5pt; color: #ddd; }
.subtotal-display { font-size: 12pt; color: var(--accent-lime); font-weight: 700; }

.btn-whatsapp-order {
  width: 100%;
  background: var(--accent-violet);
  color: #fff;
  border: 1px solid var(--accent-violet);
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 9.5pt;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(94, 23, 235, 0.4);
  transition: all 0.3s ease;
}
.btn-whatsapp-order:hover { background: #7a3bf0; box-shadow: 0 0 25px rgba(94, 23, 235, 0.8); }
.btn-whatsapp-order:disabled { background: #444; border-color: #555; color: #888; cursor: not-allowed; box-shadow: none; }

.no-results-msg { text-align: center; padding: 40px 20px; background: rgba(255,255,255,0.05); border-radius: 16px; color: #aaa; margin-top: 20px; }

/* ==========================================================================
   5. EMBUDO FREEMIUM & MODAL
   ========================================================================== */
.freemium-funnel { padding: 60px 16px 90px 16px; max-width: 1200px; margin: 0 auto; }
.freemium-container { padding: 40px 24px; text-align: center; }
.freemium-container .title-bricolage { font-size: 22pt; margin-bottom: 12px; }
.freemium-intro { font-size: 10.5pt; color: var(--text-sub); margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; }

.freemium-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; text-align: left; }
.plan-card { background: rgba(0,0,0,0.5); border: 1.5px solid var(--panel-border); border-radius: 16px; padding: 24px; }
.border-glow-lime { border-color: var(--accent-lime); box-shadow: 0 0 20px rgba(204, 255, 102, 0.15); }
.border-glow-violet { border-color: var(--accent-violet); box-shadow: 0 0 20px rgba(94, 23, 235, 0.15); }

.plan-card .title-bricolage { font-size: 14pt; margin-bottom: 10px; }
.plan-price-tag { font-size: 18pt; font-family: var(--font-title); font-weight: 800; color: #fff; margin-bottom: 4px; }
.border-glow-lime .plan-price-tag { color: var(--accent-lime); }
.plan-price-tag span { font-size: 9pt; font-weight: 400; color: var(--text-sub); }
.plan-sub-tag { font-size: 8.5pt; color: var(--accent-violet); margin-bottom: 16px; font-weight: 600; }
.plan-card ul li { font-size: 9pt; color: #ddd; margin-bottom: 10px; list-style: none; }

.btn-large { padding: 16px 32px; font-size: 11pt; border-radius: 14px; }

/* ==========================================================================
   6. FOOTER Y CO-BRANDING
   ========================================================================== */
.footer-neon-divider { width: 100%; height: 4px; background: linear-gradient(90deg, transparent, #fff, var(--accent-lime), #fff, transparent); box-shadow: 0 0 15px rgba(204, 255, 102, 0.6); }

.footer-montana-vieja { background: var(--bg-darker); padding: 50px 16px 30px 16px; text-align: center; }
.footer-container { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 30px; }

.co-branding-section { width: 100%; }
.branding-intro { font-size: 9.5pt; color: var(--text-sub); margin-bottom: 20px; line-height: 1.6; }

.branding-logos-grid { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; background: rgba(255,255,255,0.03); padding: 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); }
.brand-link-item { display: inline-block; transition: transform 0.3s ease; }
.brand-link-item:hover { transform: scale(1.05); }
.partner-official-logo { height: 40px; width: auto; object-fit: contain; }

.footer-bottom-credits { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; width: 100%; }
.copyright-text { font-size: 8.5pt; color: #666; }

/* ==========================================================================
   7. MODALES, ANIMACIONES Y RESPONSIVE
   ========================================================================== */
.shimmer-card::before { content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent); transform: skewX(-25deg); animation: sweep 6s infinite; pointer-events: none; }
@keyframes sweep { 0% { left: -150%; } 20% { left: 150%; } 100% { left: 150%; } }

.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.scroll-reveal.active { opacity: 1; transform: translateY(0); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.9); backdrop-filter: blur(12px); display: flex; justify-content: center; align-items: center; z-index: 20000; padding: 16px; }
.glass-modal { background: #111; border: 1.5px solid var(--accent-lime); padding: 30px; border-radius: 24px; max-width: 420px; width: 100%; position: relative; box-shadow: 0 0 20px rgba(204, 255, 102, 0.15); }
.modal-close { position: absolute; top: 12px; right: 18px; background: none; border: none; color: #fff; font-size: 22pt; cursor: pointer; }
.modal-label { display: block; font-size: 9pt; color: var(--text-sub); margin: 16px 0 6px 0; text-align: left;}
.modal-input { width: 100%; padding: 12px; background: rgba(255,255,255,0.05); border: 1px solid var(--panel-border); color: #fff; border-radius: 10px; font-size: 9.5pt; outline: none; }
.modal-input:focus { border-color: var(--accent-violet); }
.btn-modal-submit { width: 100%; padding: 14px; background: var(--accent-violet); color: #fff; border: none; border-radius: 12px; font-weight: 700; margin-top: 20px; cursor: pointer; font-size: 10pt; transition: 0.3s; }
.btn-modal-submit:hover { background: #7a3bf0; }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-menu { position: fixed; top: 65px; left: -100%; flex-direction: column; background: rgba(5,5,5,0.98); width: 100%; height: calc(100vh - 65px); text-align: center; transition: 0.3s; padding-top: 40px; gap: 30px; }
  .nav-menu.active { left: 0; }
  .hero-section { padding: 40px 16px; }
  .hero-title { font-size: 24pt; }
  .categories-grid { grid-template-columns: repeat(8, 1fr); } /* Carrusel horizontal forzado */
}
@media (min-width: 769px) {
  .hero-section { padding: 120px 40px 100px 40px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); overflow-x: visible; }
}