/* AI Directory - Shared Styles */
:root {
  --bg: #070913;
  --bg-2: #0b0f22;
  --txt: #e6ecff;
  --muted: #9ab0ff;
  --brand: #7a5cff;
  --brand-2: #00e7ff;
  --accent: #ff2fd4;
  --ok: #1be7a8;
  --warn: #ffc857;
  --danger: #ff4d4d;
  --card: #0d1126cc;
  --glass: rgba(13,17,38,.55);
  --ring: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent);
  --shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 40px rgba(122,92,255,.15);
  --radius: 16px;
  --grid-gap: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--txt);
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

/* Header & Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
}

.topbar .wrap {
  padding-top: 6px;
  padding-bottom: 6px;
}

.topbar .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--brand-2);
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Orbitron', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.logo:hover {
  color: var(--accent);
  transform: translateY(-1px);
  animation: neon-flicker 1.5s infinite;
}

.logo svg {
  width: 200px;
  height: auto;
  display: block;
}

@keyframes neon-flicker {
  0%, 100% { filter: brightness(100%); }
  50% { filter: brightness(120%); }
}

.logo .chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--brand);
  border-radius: 5px;
  color: white;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  color: var(--txt);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle span + span { margin-top: 3px; }

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .1px;
  background: color-mix(in srgb, var(--glass) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  font-size: 0.7em;
  line-height: 1;
  white-space: nowrap;
  color: var(--txt);
  text-decoration: none;
  position: relative;
}

.nav a:hover {
  background: color-mix(in srgb, var(--brand) 15%, var(--glass));
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0,0,0,.4), 0 0 35px rgba(122,92,255,.2);
}

.nav a.cta {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: white;
  border: none;
  font-weight: 700;
  padding: 2px 8px;
}

.nav a.cta:hover {
  background: linear-gradient(135deg, var(--accent), var(--brand));
  transform: translateY(-2px);
}

/* Categories Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown > a { display: inline-flex; align-items: center; }

.nav-dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 3px;
  margin-top: 1px;
}

.nav-dropdown:hover .dropdown-content {
  display: block;
}

.nav-dropdown .dropdown-content a {
  display: block;
  padding: 2px 6px;
  margin: 1px 0;
  border-radius: 5px;
  background: transparent;
  border: none;
  box-shadow: none;
  font-size: 0.75em;
  white-space: nowrap;
}

.nav-dropdown .dropdown-content a:hover {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  transform: none;
  box-shadow: none;
}

/* Hero Section */
.hero {
  position: relative;
  padding: clamp(8px, 2vw, 16px) 0 0;
  overflow: hidden;
  text-align: center;
}

.hero .gridbg {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 420px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(122,92,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,231,255,.16) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px;
  transform: perspective(700px) rotateX(68deg);
  transform-origin: top center;
  -webkit-mask: linear-gradient(#000, transparent 85%);
  mask: linear-gradient(#000, transparent 85%);
}

.hero h1 {
  font-size: clamp(20px, 4vw, 40px);
  margin: 0 0 10px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero .sub {
  font-size: clamp(12px, 2vw, 16px);
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat .number {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--brand-2);
  line-height: 1;
}

.stat .label {
  color: var(--muted);
  font-size: 0.8em;
  margin-top: 1px;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,.4), 0 0 60px rgba(122,92,255,.2);
}

.card .header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card .logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}

.card h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--txt);
  flex: 1;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.card .meta-section {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.meta-item {
  padding: 2px 5px;
  border-radius: 5px;
  font-size: 0.8em;
  font-weight: 600;
}

.meta-item.pricing {
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  border: 1px solid var(--ok);
  color: var(--ok);
}

.meta-item.rating {
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  border: 1px solid var(--warn);
  color: var(--warn);
}

.meta-item.tag {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  border: 1px solid var(--brand);
  color: var(--brand-2);
}

.card .go {
  display: block;
  width: 100%;
  padding: 10px 14px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--glass) 80%, transparent);
  color: var(--brand-2);
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0.3px;
  margin-top: auto;
  text-decoration: none;
}

.card .go:hover {
  background: color-mix(in srgb, var(--brand) 15%, var(--glass));
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  transform: translateY(-1px);
}

/* Sections */
section {
  padding: clamp(10px, 2.5vw, 20px) 0;
}

section h2 {
  font-size: clamp(20px, 4vw, 30px);
  margin: 0 0 8px;
  letter-spacing: .3px;
  color: var(--brand-2);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--grid-gap);
  margin-top: 12px;
}

/* Footer */
footer {
  border-top: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  margin-top: 16px;
}

.foot {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 16px 0;
  color: var(--muted);
}

.credits {
  font-size: 12px;
}

.backtotop {
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.backtotop:hover {
  background: var(--glass);
  color: var(--brand-2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .nav a { padding: 1px 5px; font-size: 0.65em; }
  .hero h1 { font-size: clamp(18px, 4vw, 36px); }
  .stats { justify-content: center; gap: 18px; }
}

@media (max-width: 768px) {
  .topbar .inner { flex-direction: column; gap: 5px; padding: 6px 0; }
  .nav { order: 2; width: 100%; justify-content: center; flex-wrap: wrap; gap: 3px; }
  .nav a { padding: 1px 5px; font-size: 0.65em; }
  .hero { padding: clamp(6px, 2vw, 16px) 0 0; }
  .hero h1 { font-size: clamp(16px, 3.5vw, 32px); line-height: 1.1; }
  .sub { font-size: clamp(10px, 1.8vw, 14px); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .foot { flex-direction: column; gap: 12px; text-align: center; }
  .foot > div { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .wrap { padding: clamp(6px, 2vw, 12px); }
  .nav a { padding: 1px 4px; font-size: 0.6em; }
  .hero h1 { font-size: clamp(14px, 3vw, 24px); }
  .stats { flex-direction: row; gap: 12px; }
  .stat .number { font-size: 1.5em; }
  .stat .label { font-size: 0.7em; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
}

/* Page Specific Styles */
.page-header {
  text-align: center;
  margin-bottom: 24px;
  padding: 16px 0 12px;
  position: relative;
  overflow: hidden;
}

.page-title {
  font-size: clamp(28px, 5.5vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 1.1em;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.contact-info {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  box-shadow: var(--shadow);
}

.contact-info h3 {
  font-size: 1.5em;
  margin-bottom: 24px;
  color: var(--brand-2);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--glass);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 15%, transparent);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-text h4 {
  margin-bottom: 5px;
  color: var(--txt);
}

.contact-text p {
  color: var(--muted);
  margin: 0;
}

/* Contact Form */
.contact-form {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--txt);
  font-weight: 600;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 8px;
  color: var(--txt);
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-button {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(122,92,255,.3);
}

/* Messages */
.message {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid;
}

.message.success {
  background: color-mix(in srgb, var(--ok) 20%, transparent);
  border-color: var(--ok);
  color: var(--ok);
}

.message.error {
  background: color-mix(in srgb, var(--danger) 20%, transparent);
  border-color: var(--danger);
  color: var(--danger);
}

/* Content Pages Styles */
.content {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  box-shadow: var(--shadow);
}

.content h2 {
  color: var(--brand-2);
  margin: 32px 0 16px 0;
  font-size: 1.8em;
  border-bottom: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  padding-bottom: 8px;
}

.content h3 {
  color: var(--txt);
  margin: 24px 0 12px 0;
  font-size: 1.4em;
}

.content p {
  margin-bottom: 16px;
  color: var(--txt);
  line-height: 1.7;
}

.content ul {
  margin: 20px 0;
  padding-left: 30px;
}

.content li {
  margin-bottom: 10px;
  color: var(--txt);
}

.content strong {
  color: var(--brand-2);
}

.content a {
  color: var(--brand-2);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.highlight-box {
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.highlight-box h4 {
  color: var(--brand-2);
  margin-bottom: 10px;
}

/* Footer */
.footer {
  background: var(--card);
  border-top: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  margin-top: 80px;
}

.footer a {
  color: var(--brand-2);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Advanced Filters */
.advanced-filters {
  margin-top: 12px;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 0.9em;
  color: var(--muted);
  font-weight: 600;
}

.filter-select {
  padding: 6px 10px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: 8px;
  color: var(--txt);
  font-size: 0.9em;
  min-width: 120px;
}

.clear-btn {
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: color-mix(in srgb, var(--danger) 15%, var(--glass));
  transform: translateY(-1px);
}

/* Responsive Design Updates */
@media (max-width: 1024px) {
  .nav {
    gap: 4px;
  }
  
  .nav a {
    padding: 5px 10px;
    font-size: 0.75em;
  }
  
  .contact-grid {
    gap: 40px;
  }
  
  .nav-dropdown .dropdown-content {
    min-width: 180px;
    right: 0;
    left: auto;
  }
}

/* Override estilo del botón Filters en móvil (no gris) */
@media (max-width: 1024px) {
  .sticky-controls .toggle-adv {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #ffffff;
    border-color: transparent;
  }
  .sticky-controls .toggle-adv:hover {
    filter: brightness(1.05);
  }
}

@media (max-width: 768px) {
  .nav {
    order: 2;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  
  .nav a {
    padding: 6px 10px;
    font-size: 0.75em;
    scroll-snap-align: start;
  }

  .nav-dropdown > a { padding: 6px 10px; font-size: 0.75em; }
  
  .topbar .inner {
    flex-direction: column;
    gap: 8px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .page-title {
    font-size: 2.5em;
  }
  
  .contact-info,
  .contact-form {
    padding: 24px 16px;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .filter-select {
    min-width: auto;
  }
  
  .nav-dropdown .dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 4px 0 0 0;
  }
  
  .nav-dropdown:hover .dropdown-content {
    display: block;
  }
  
  .nav-dropdown .dropdown-content a {
    background: var(--glass);
    border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
    margin: 1px 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 12px;
  }
  
  .page-title {
    font-size: 2em;
  }
  
  .hero h1 {
    font-size: 2.2em;
  }
  
  .stats {
    gap: 15px;
  }
  
  .stat .number {
    font-size: 1.5em;
  }
  
  .card {
    padding: 20px;
  }
  
  .card .header {
    gap: 12px;
  }
  
  .card .logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* iPad Specific */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
  .nav {
    gap: 6px;
  }
  
  .nav a {
    padding: 6px 12px;
    font-size: 0.8em;
  }
  
  .contact-grid {
    gap: 50px;
  }
}

@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
  .nav {
    gap: 5px;
  }
  
  .nav a {
    padding: 5px 11px;
    font-size: 0.75em;
  }
}

/* iPad specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: clamp(28px, 5vw, 44px); }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .topbar .inner { flex-direction: row; }
  .nav { order: initial; width: auto; }
}

/* Sticky Search Controls */
.sticky-controls {
  position: sticky;
  top: var(--topbar-h, 24px);
  z-index: 999;
  /* background: color-mix(in srgb, var(--bg) 95%, transparent); */
  backdrop-filter: blur(20px);
  /* border-bottom: 1px solid color-mix(in srgb, var(--brand) 15%, transparent); */
  padding: 0;
  width: 100%;
}

.sticky-controls .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
  padding-top: 8px;
  padding-bottom: 8px;
}

.sticky-controls .controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin: 0;
}

.sticky-controls .control:first-child { 
  order: 1;
  margin-bottom: 2px;
}
.sticky-controls .filters-control { 
  order: 2;
  margin-bottom: 4px;
}
.sticky-controls .advanced-controls { 
  order: 3;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.sticky-controls .control {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  padding: 4px 6px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

/* Ocultar botón de toggle de filtros en escritorio */
.sticky-controls .toggle-adv { display: none; }

.sticky-controls .control input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--txt);
  font: inherit;
  font-size: 0.9em;
  padding: 2px 0;
}

.sticky-controls .control input::placeholder {
  color: color-mix(in srgb, var(--txt) 60%, transparent);
  opacity: 1;
}

.sticky-controls .filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  line-height: 1;
  padding: 2px 0;
}
@media (max-width: 1024px) {
  .sticky-controls .controls { flex-wrap: wrap; }
  .sticky-controls .control { flex: 1 1 100%; }
  .sticky-controls .filters { width: 100%; padding-bottom: 2px; }
  .sticky-controls .advanced-controls { display: none; width: 100%; }
  .sticky-controls .toggle-adv { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: .8em; border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent); background: var(--glass); color: var(--txt); border-radius: 6px; }
  .sticky-controls[data-open="true"] .advanced-controls { display: flex; margin-top: 2px; }
}

.sticky-controls .filters::-webkit-scrollbar { display: none; }

.sticky-controls .chipbtn {
  cursor: pointer;
  user-select: none;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--glass) 80%, transparent), transparent);
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  color: var(--txt);
  font-size: 0.8em;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sticky-controls .chipbtn:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 15%, var(--glass)), color-mix(in srgb, var(--brand) 8%, var(--glass)));
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(122, 92, 255, 0.2);
}



.sticky-controls .chipbtn[data-active="true"] {
  outline: var(--ring);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 20%, var(--glass)), color-mix(in srgb, var(--brand) 15%, var(--glass)));
  border-color: var(--brand);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent), 0 4px 15px rgba(122, 92, 255, 0.3);
}

.sticky-controls .chipbtn:active {
  transform: translateY(1px);
}

.sticky-controls .advanced-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Estilo del botón Filters en móvil */
.sticky-controls .toggle-adv {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: .85em;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  background: var(--glass);
  color: var(--txt);
  border-radius: 6px;
}

.sticky-controls .filter-select {
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--txt);
  font-size: 0.8em;
  outline: none;
  transition: all 0.2s ease;
  min-width: 110px;
}

.sticky-controls .filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 20%, transparent);
}

.sticky-controls .clear-btn {
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--danger);
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.sticky-controls .clear-btn:hover {
  background: color-mix(in srgb, var(--danger) 10%, var(--glass));
  border-color: var(--danger);
}

/* Responsive adjustments for sticky controls */
@media (max-width: 768px) {
  /* Mobile navbar behavior */
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    order: 2;
    width: 100%;
    flex-direction: column;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    overflow: visible;
    white-space: normal;
    background: color-mix(in srgb, var(--glass) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
    border-radius: 8px;
    padding: 8px;
  }
  .topbar[data-nav-open="true"] .nav { display: flex; }
  .nav a { padding: 6px 10px; font-size: 0.85em; }

  .sticky-controls {
    top: 20px;
  }
  
  .sticky-controls .controls { flex-direction: column; gap: 4px; }
  .sticky-controls .filters { flex-wrap: wrap; overflow-x: visible; gap: 6px; }
  .sticky-controls .chipbtn { padding: 5px 10px; font-size: 0.8em; min-height: 28px; }
  
  .sticky-controls .control {
    flex: 1 1 auto;
    padding: 4px 6px;
  }
  
  .sticky-controls .advanced-controls {
    width: 100%;
    justify-content: space-between;
  }
  
  .sticky-controls .filter-select {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .sticky-controls {
    top: 22px;
  }
  
  .sticky-controls .controls {
    gap: 3px;
  }
  
  .sticky-controls .control { padding: 4px 6px; }
  
  .sticky-controls .chipbtn { 
    padding: 4px 8px; 
    font-size: 0.75em; 
    min-height: 26px;
  }
  
  .sticky-controls .filters {
    gap: 5px;
  }
}
