/* ============================================================
   LAYOUTS.CSS — Page Layouts & Responsive
   CuponPass — Directorio de Empresas
   ============================================================ */

/* ── MAIN CONTENT OFFSET (below fixed navbar) ── */
#app {
  padding-top: var(--navbar-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════ */
.hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--grad-hero);
  padding: var(--space-20) 0 var(--space-16);
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--color-indigo-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, var(--font-6xl));
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-5);
}

.hero-subtitle {
  font-size: var(--font-lg);
  color: var(--color-text-2);
  margin-bottom: var(--space-10);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  margin-top: var(--space-12);
}

.hero-stat-value {
  font-size: var(--font-2xl);
  font-weight: 800;
  color: var(--color-text);
}

.hero-stat-label {
  font-size: var(--font-xs);
  color: var(--color-text-2);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border-2);
}

/* ══════════════════════════════════════════
   PRO CAROUSEL BANNER (SLIDER)
   ══════════════════════════════════════════ */
.ml-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-bg-2);
}

.ml-slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.ml-slider-slide {
  min-width: 100%;
  height: 400px;
  position: relative;
  cursor: pointer;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .ml-slider-slide { height: 250px; }
  .ml-slider-name { font-size: 1.5rem !important; }
}

.ml-slider-img {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.ml-slider-overlay {
  position: absolute;
  inset: 0;
  max-width: var(--max-w, 1200px);
  margin: 0 auto;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
  display: flex;
  align-items: flex-end;
  padding: 40px;
}

.ml-slider-name {
  color: white;
  font-size: 2.5rem;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.ml-slider-badge {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: black;
  font-size: 1rem;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 4px;
  margin-left: 15px;
  text-transform: uppercase;
  display: inline-block;
  vertical-align: middle;
}

.swiper-pagination {
  bottom: 20px !important;
}
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.4);
  opacity: 1;
  transition: all 0.3s;
}
.swiper-pagination-bullet-active {
  background: white;
  transform: scale(1.2);
}

/* ══════════════════════════════════════════
   CATEGORY SECTION
   ══════════════════════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
}

.category-card {
  background: var(--grad-card);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.category-card:hover {
  border-color: var(--color-indigo);
  background: rgba(99,102,241,0.08);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-2);
  display: block;
}

.category-card-name {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text);
}

.category-card-count {
  font-size: var(--font-xs);
  color: var(--color-text-3);
  margin-top: 2px;
}

/* ══════════════════════════════════════════
   BUSINESS GRID
   ══════════════════════════════════════════ */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.biz-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ══════════════════════════════════════════
   SEARCH PAGE LAYOUT
   ══════════════════════════════════════════ */
.search-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-8);
  align-items: start;
}

.search-sidebar {
  position: sticky;
  top: calc(var(--navbar-h) + var(--space-6));
}

.filter-panel {
  background: var(--grad-card);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.filter-section {
  margin-bottom: var(--space-6);
}

.filter-section:last-child { margin-bottom: 0; }

.filter-title {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: 0.02em;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 6px 0;
  cursor: pointer;
  font-size: var(--font-sm);
  color: var(--color-text-2);
  transition: color var(--transition-fast);
}

.filter-option:hover { color: var(--color-text); }

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-indigo);
  cursor: pointer;
}

.search-main {}

.search-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border-2);
}

.search-count {
  font-size: var(--font-sm);
  color: var(--color-text-2);
}

.search-count strong {
  color: var(--color-text);
  font-weight: 700;
}

/* ══════════════════════════════════════════
   DASHBOARD LAYOUT
   ══════════════════════════════════════════ */
.dashboard-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--navbar-h));
  gap: 0;
}

.dash-sidebar {
  background: var(--color-bg-2);
  border-right: 1px solid var(--color-border-2);
  padding: var(--space-6);
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.dash-sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-6);
  border-bottom: 1px solid var(--color-border-2);
  margin-bottom: var(--space-6);
}

.dash-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--grad-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-md);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.dash-user-name {
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-plan {
  margin-top: 2px;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--color-text-2);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  text-align: left;
  width: 100%;
}

.dash-nav-item:hover {
  background: var(--color-bg-3);
  color: var(--color-text);
}

.dash-nav-item.active {
  background: rgba(99,102,241,0.15);
  color: var(--color-indigo-2);
}

.dash-nav-icon { font-size: 1.1rem; }

.dash-content {
  padding: var(--space-8);
  overflow-y: auto;
}

.dash-header {
  margin-bottom: var(--space-8);
}

.dash-title {
  font-size: var(--font-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}

.dash-subtitle {
  font-size: var(--font-sm);
  color: var(--color-text-2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* ══════════════════════════════════════════
   BUSINESS PROFILE PAGE
   ══════════════════════════════════════════ */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}

.profile-header {
  background: var(--grad-card);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}

.profile-header.is-pro {
  border-color: rgba(245,158,11,0.3);
}

.profile-header-top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.profile-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: var(--grad-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-name {
  font-size: var(--font-3xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* ══════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  position: relative;
}

.auth-card {
  background: var(--grad-card);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 440px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-logo .logo-text {
  font-size: var(--font-2xl);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.auth-tabs {
  display: flex;
  background: var(--color-bg-3);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: var(--space-8);
}

.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-2);
  border: none;
  background: none;
}

.auth-tab.active {
  background: var(--color-indigo);
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .search-layout {
    grid-template-columns: 1fr;
  }
  .search-sidebar {
    position: static;
  }
  .filter-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border-2);
  }
  .dash-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .biz-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-actions .btn-ghost { display: none; }
  .hero-stats { gap: var(--space-6); }
  .hero-stat-divider { display: none; }
  .section { padding: var(--space-10) 0; }
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--space-3);
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
  .section-header { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .upgrade-banner { flex-direction: column; text-align: center; }
  .biz-list-card { flex-direction: column; }
  .biz-list-actions { flex-direction: row; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-content { padding: var(--space-5); }
  .auth-card { padding: var(--space-6); }
  .profile-header-top { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: var(--font-md); }
  .biz-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .search-bar { padding: 5px 5px 5px 16px; }
  .search-bar input { font-size: var(--font-sm); }
  .filter-panel { grid-template-columns: 1fr; }
}

/* ── MOBILE NAV OPEN ── */
.nav-links.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  background: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border-2);
  padding: var(--space-4);
  gap: var(--space-2);
  z-index: 99;
  animation: fadeInUp 0.2s ease;
}

/* ══════════════════════════════════════════
   BIZ CARD WOW — Premium Search Result Cards
   ══════════════════════════════════════════ */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.biz-card-wow {
  position: relative;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border-2);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: cardSlideIn 0.4s ease both;
  margin-bottom: var(--space-4);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.biz-card-wow:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.05);
}

.biz-card-wow.is-pro {
  border-color: rgba(245,158,11,0.4);
}
.biz-card-wow.is-pro:hover {
  border-color: rgba(245,158,11,0.6);
  box-shadow: 0 6px 16px rgba(245,158,11,0.12);
}

.biz-card-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #f97316, #a855f7);
  width: 100%;
}

.biz-card-wow-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
}

.biz-card-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 14px;
  background: var(--grad-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  transition: transform 0.2s ease;
}
.biz-card-wow:hover .biz-card-avatar { transform: scale(1.06); }

.biz-card-avatar.is-pro {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 4px 14px rgba(245,158,11,0.35);
}

.biz-card-body {
  flex: 1;
  min-width: 0;
}

.biz-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  flex-wrap: wrap;
}

.biz-card-name {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.biz-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.biz-card-desc {
  font-size: var(--font-sm);
  color: var(--color-text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.biz-card-wow.is-pro .biz-card-desc {
  -webkit-line-clamp: unset;
}

.biz-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.biz-meta-item {
  font-size: var(--font-xs);
  color: var(--color-text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.biz-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.biz-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  background: rgba(99,102,241,0.08);
  color: var(--color-indigo-2);
  border: 1px solid rgba(99,102,241,0.15);
  transition: all 0.15s ease;
}
.biz-card-wow:hover .biz-tag {
  background: rgba(99,102,241,0.14);
}

.biz-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
  flex-shrink: 0;
}

.coupon-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(5,150,105,0.08));
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}

.biz-card-cta {
  white-space: nowrap;
  transition: all 0.2s ease !important;
}
.biz-card-wow:hover .biz-card-cta {
  transform: translateX(2px);
}

/* Dark mode WOW cards */
[data-theme="dark"] .biz-card-wow {
  background: rgba(30,32,48,0.8);
  border-color: rgba(255,255,255,0.07);
}
[data-theme="dark"] .biz-card-wow:hover {
  background: rgba(40,42,58,0.9);
  border-color: rgba(99,102,241,0.35);
}
[data-theme="dark"] .biz-card-wow.is-pro {
  background: linear-gradient(135deg, rgba(30,32,48,0.9), rgba(245,158,11,0.06));
  border-color: rgba(245,158,11,0.2);
}

/* Responsive WOW cards */
@media (max-width: 768px) {
  .biz-card-wow-inner { flex-wrap: wrap; gap: var(--space-4); padding: var(--space-4); }
  .biz-card-actions   { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .biz-card-avatar    { width: 48px; height: 48px; min-width: 48px; font-size: 1.3rem; }
}

/* ============================================================
   MOBILE RESPONSIVENESS OVERRIDES
   ============================================================ */
@media (max-width: 768px) {
  /* Navbar adjustments */
  .navbar-inner {
    padding: 0 var(--space-4);
  }
  
  #nav-actions .btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-sm);
  }
  
  /* Hero adjustments */
  .hero {
    min-height: auto;
    padding: var(--space-12) var(--space-4);
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  /* Grids and Layouts */
  .categories-grid, .features-grid, .pricing-grid, .stats-grid {
    grid-template-columns: 1fr !important; /* Stack vertically */
    gap: var(--space-4);
  }
  
  .search-hero {
    padding: var(--space-8) var(--space-4);
  }
  
  /* Dashboard / Admin */
  .dashboard-layout {
    flex-direction: column; /* Sidebar on top of content */
  }
  
  .dash-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    position: static;
  }
  
  .dash-content {
    padding: var(--space-4);
  }
  
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Modals */
  .modal-box {
    width: 95%;
    max-height: 90vh;
    padding: var(--space-4);
  }
  
  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--space-6);
  }
}

