/* ═══════════════════════════════════════════════════════════════════════
   COMUNIDAD CONECTA · Design system
   Los colores de marca salen de palette.css (generado desde logo.png con
   scripts/palette.php). Cambiar el logo = regenerar la paleta, nada más.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --brand-1: #2D7C4E;   /* fallback si palette.css no cargó */
  --brand-2: #F2994A;
  --brand-3: #1E6EB1;
  --brand-1-dark: #256540; --brand-1-tint: #6CA383; --brand-1-tint2: #8AB59C;
  --brand-1-soft: rgba(45,124,78,.12); --brand-1-soft2: rgba(45,124,78,.22); --brand-3-tint: #6299C8;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --header-h: 64px;
  --footer-h: 64px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F4F5F2;
  --bg-tertiary:   #E9ECE6;
  --text-primary:  #0D0D0D;
  --text-secondary:#4A4A5A;
  --text-muted:    #6E6E7E;
  --border:        #D6DAD2;
  --accent:        var(--brand-1);
  --accent-hover:  var(--brand-1-dark);
  --accent-soft:   var(--brand-1-soft);
  --accent-text:   #FFFFFF;
  --sun:           var(--brand-2);
  --sun-text:      #2A1600;
  --lake:          var(--brand-3);
  --danger:        #C0392B;
  --success:       #1A7A4A;
  --warning:       #B8650A;
  --surface:       #FFFFFF;
  --shadow:        rgba(20, 40, 25, .10);
  --hero-veil:     linear-gradient(100deg, rgba(8,20,12,.86) 0%, rgba(8,20,12,.55) 45%, rgba(8,20,12,.05) 80%);
}

[data-theme="dark"] {
  --bg-primary:    #0E100F;
  --bg-secondary:  #161A17;
  --bg-tertiary:   #1F2420;
  --text-primary:  #F0F2EE;
  --text-secondary:#A6ADA6;
  --text-muted:    #7C847D;
  --border:        #2A302B;
  --accent:        var(--brand-1-tint);
  --accent-hover:  var(--brand-1-tint2);
  --accent-soft:   var(--brand-1-soft2);
  --accent-text:   #06120A;
  --sun:           var(--brand-2);
  --sun-text:      #2A1600;
  --lake:          var(--brand-3-tint);
  --danger:        #E05252;
  --success:       #3DBE7A;
  --warning:       #E8900A;
  --surface:       #161A17;
  --shadow:        rgba(0, 0, 0, .45);
  --hero-veil:     linear-gradient(100deg, rgba(4,8,5,.92) 0%, rgba(4,8,5,.65) 45%, rgba(4,8,5,.15) 80%);
}

/* ───────────── Base ───────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6;
  background: var(--bg-primary); color: var(--text-primary);
  transition: background .25s var(--ease), color .25s var(--ease);
  overscroll-behavior-y: contain;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 18px; } h4 { font-size: 15px; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
.label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600;
}
.muted { color: var(--text-muted); }
.lucide { width: 20px; height: 20px; stroke-width: 2; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 768px) { .container { padding: 0 1rem; } }

/* ───────────── Botones ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.2rem; border-radius: 12px;
  border: 1px solid transparent; font-weight: 600; font-size: 15px;
  transition: transform .1s ease, background .2s var(--ease), border-color .2s, opacity .1s;
  white-space: nowrap;
}
.btn:active, .clickeable:active { transform: scale(.96); opacity: .92; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-sun { background: var(--sun); color: var(--sun-text); }
.btn-sun:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-secondary); }
.btn-glass { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--border); background: var(--bg-primary);
  color: var(--text-primary); transition: background .2s, transform .1s;
}
.icon-btn:hover { background: var(--bg-secondary); }
.icon-btn:active { transform: scale(.94); }

/* Ripple (skill 31) */
.ripple { position: relative; overflow: hidden; }
.ripple-wave {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255,255,255,.4); transform: scale(0); animation: ripple-anim .6s linear;
}
.btn-ghost .ripple-wave, .icon-btn .ripple-wave, .chip .ripple-wave { background: rgba(0,0,0,.12); }
[data-theme="dark"] .ripple-wave { background: rgba(255,255,255,.22); }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }

/* ───────────── Header ───────────── */
.app-header {
  position: sticky; top: 0; z-index: 900; height: var(--header-h);
  background: var(--bg-primary);
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .app-header { -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
}
.app-header .container { height: 100%; display: flex; align-items: center; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text-primary); min-width: 0; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.brand-name small { display: block; white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: .02em; }
.header-nav { display: flex; gap: .25rem; margin-left: 1.5rem; }
.header-nav a {
  padding: .5rem .75rem; border-radius: 10px; color: var(--text-secondary);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.header-nav a:hover { background: var(--bg-secondary); color: var(--text-primary); }
.header-nav a.active { color: var(--accent); background: var(--accent-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.loc-pill {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; max-width: 240px;
  padding: .35rem .75rem .35rem .6rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-secondary);
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.loc-pill .lucide { width: 16px; height: 16px; color: var(--accent); }
.loc-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .6rem .25rem .25rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--bg-primary); min-height: 40px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

#theme-toggle .icon-dark { display: none; }
[data-theme="dark"] #theme-toggle .icon-dark { display: inline-flex; }
[data-theme="dark"] #theme-toggle .icon-light { display: none; }

@media (max-width: 1100px) { .header-nav { display: none; } }
@media (max-width: 1520px) { .brand-name small { display: none; } }
@media (max-width: 768px) {
  .brand-name small, .hide-mobile { display: none !important; }
  .loc-pill { max-width: 150px; }
}
@media (min-width: 769px) { .hide-desktop { display: none !important; } }

/* ───────────── Vistas + transiciones (skill 52) ───────────── */
#app { min-height: calc(100vh - var(--header-h)); }
.vista { animation: slideIn .28s var(--ease); }
#app.saliendo .vista { animation: slideOut .18s ease forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes slideOut { to { opacity: 0; transform: translateX(-20px); } }
@media (max-width: 768px) { .main-content { padding-bottom: calc(var(--footer-h) + 16px + env(safe-area-inset-bottom)); } }

/* Loader de vista */
.vista-loading { display: flex; justify-content: center; padding: 5rem 1rem; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--bg-tertiary); border-top-color: var(--accent); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────────── HOME ───────────── */
.hero {
  position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end;
  color: #fff; overflow: hidden; isolation: isolate; background: #0b1a10;
}
.hero-img { position: absolute; inset: 0; z-index: -2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1.0); } }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--hero-veil); }
.hero::after { /* línea topográfica / camino que conecta */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; z-index: 1;
  background: linear-gradient(90deg, var(--brand-1) 0 40%, var(--brand-2) 40% 62%, var(--brand-3) 62% 100%);
}
.hero-inner { width: 100%; padding-top: 4rem; padding-bottom: 3.5rem; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(242,153,74,.25); }
.hero h1 {
  font-size: clamp(36px, 6.4vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: .98;
  margin: 1rem 0 1rem; max-width: 12ch;
}
.hero h1 em { font-style: normal; color: var(--brand-2); }
.hero-lead { font-size: clamp(15px, 1.6vw, 19px); max-width: 46ch; color: rgba(255,255,255,.86); margin-bottom: 1.75rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.2); max-width: 640px;
}
.hero-meta div { min-width: 120px; }
@media (max-width: 560px) {
  .hero-meta { gap: 1rem; margin-top: 1.75rem; justify-content: space-between; }
  .hero-meta div { min-width: 0; }
  .hero-meta strong { font-size: 15px; }
  .hero-inner { padding-top: 3rem; padding-bottom: 3rem; }
}
.hero-meta .label { color: rgba(255,255,255,.65); }
.hero-meta strong { display: block; font-size: 17px; font-weight: 600; }

/* Bloque "estás en" — localidad */
.loc-band { margin-top: -2.25rem; position: relative; z-index: 2; }
.loc-card {
  display: grid; grid-template-columns: 1.1fr 1fr; border-radius: var(--radius-l); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 50px var(--shadow);
}
.loc-card-media { position: relative; min-height: 220px; background: var(--bg-tertiary); }
.loc-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loc-card-media .coord {
  position: absolute; left: 1rem; bottom: 1rem; padding: .3rem .6rem; border-radius: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.loc-card-body { padding: 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.loc-card-body h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; }
.loc-card-body .acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
@media (max-width: 768px) {
  .loc-band { margin-top: -1.5rem; }
  .loc-card { grid-template-columns: 1fr; }
  .loc-card-media { min-height: 170px; }
  .loc-card-body { padding: 1.25rem; }
}

/* Secciones — bento asimétrico */
.section { padding: 4rem 0 1rem; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(22px, 3vw, 32px); letter-spacing: -.025em; margin: .25rem 0 0; }
.section-head p { color: var(--text-secondary); max-width: 46ch; margin: 0; }
.bento {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px; grid-auto-flow: dense;
}
.tile {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  border-radius: var(--radius-l); overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-primary);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 16px 40px var(--shadow); border-color: var(--accent); }
.tile:active { transform: scale(.98); }
.tile-img { position: relative; flex: 1; min-height: 0; background: #FFF8EE; overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform .5s var(--ease); }
.tile:hover .tile-img img { transform: scale(1.05); }
.tile-body { padding: .8rem 1.1rem .9rem; border-top: 1px solid var(--border); background: var(--surface); }
.tile-ico {
  position: absolute; top: .9rem; left: .9rem; z-index: 1; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-text); box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.tile-num {
  position: absolute; top: .95rem; right: 1rem; z-index: 1; padding: .15rem .45rem; border-radius: 6px;
  background: rgba(255,255,255,.85); color: #4A4A5A;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums;
}
.tile h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tile h3 .lucide { width: 18px; height: 18px; color: var(--accent); transition: transform .2s; }
.tile:hover h3 .lucide { transform: translateX(3px); }
.tile p { margin: .2rem 0 0; font-size: 13px; color: var(--text-secondary); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile--xl { grid-column: span 2; grid-row: span 2; }
.tile--xl .tile-body { padding: 1.1rem 1.4rem 1.25rem; }
.tile--xl h3 { font-size: 26px; }
.tile--xl p { font-size: 15px; max-width: 44ch; }
.tile--wide { grid-column: span 2; }
.tile--sun .tile-ico { background: var(--sun); color: var(--sun-text); }
.tile--lake .tile-ico { background: var(--lake); color: #fff; }
.tile--alert .tile-ico { background: var(--danger); color: #fff; }
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; gap: .75rem; }
  .tile { border-radius: var(--radius-m); }
  .tile-body { padding: .6rem .75rem .7rem; }
  .tile--xl { grid-column: span 2; grid-row: span 1; min-height: 250px; }
  .tile--xl h3 { font-size: 21px; }
  .tile--wide { grid-column: span 2; }
  .tile h3 { font-size: 15px; }
  .tile p, .tile-num { display: none; }
  .tile--xl p { display: -webkit-box; font-size: 13px; }
  .tile-ico { width: 34px; height: 34px; top: .6rem; left: .6rem; border-radius: 10px; }
}

/* Franja CTA — sumate */
.cta-band {
  margin: 4rem 0 2rem; border-radius: var(--radius-l); overflow: hidden; position: relative;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center;
  padding: 2.5rem; background: var(--accent); color: var(--accent-text);
}
.cta-band h2 { font-size: clamp(22px, 3vw, 34px); letter-spacing: -.025em; }
.cta-band p { opacity: .9; }
.cta-band .tipos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cta-band .tipo {
  display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border-radius: 14px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-weight: 600; font-size: 14px;
  color: inherit;
}
[data-theme="dark"] .cta-band .tipo { background: rgba(0,0,0,.08); border-color: rgba(0,0,0,.15); }
@media (max-width: 768px) { .cta-band { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.25rem; margin-top: 3rem; } }

.site-footer {
  border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; margin-top: 2rem;
  color: var(--text-muted); font-size: 13px;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.site-footer .brand img { width: 28px; height: 28px; }

/* ───────────── Footer nav mobile (skill 03/31) ───────────── */
.app-footer-nav { display: none; }
@media (max-width: 768px) {
  .app-footer-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; display: flex;
    height: calc(var(--footer-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-primary); border-top: 1px solid var(--border);
  }
  .app-footer-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 12px; font-weight: 500; color: var(--text-muted); min-height: 44px; cursor: pointer;
  }
  .app-footer-nav a.active { color: var(--accent); }
  .app-footer-nav a.active .lucide { stroke-width: 2.4; }
}

/* ───────────── WhatsApp flotante ───────────── */
.wa-float {
  position: fixed; right: 16px; bottom: 24px; z-index: 950; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .15s;
}
.wa-float:active { transform: scale(.92); }
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 768px) { .wa-float { bottom: calc(var(--footer-h) + 16px + env(safe-area-inset-bottom)); } }

/* ───────────── Modales / sheets (skill 02) ───────────── */
.modal-wrapper {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(0,0,0,.5); animation: fadeIn .2s ease;
}
.modal {
  background: var(--bg-primary); color: var(--text-primary); border-radius: 18px; width: 100%; max-width: 560px;
  max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3);
  animation: popIn .25s var(--ease);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .5rem; }
.modal-head h3 { margin: 0; }
.modal-body { flex: 1; overflow-y: auto; padding: .75rem 1.25rem 1.25rem; -webkit-overflow-scrolling: touch; }
.modal-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end;
  background: var(--bg-primary); border-radius: 0 0 18px 18px;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 768px) {
  .modal-wrapper { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 20px 20px 0 0; animation: sheetUp .28s var(--ease); }
  .modal-footer { border-radius: 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
@keyframes sheetUp { from { transform: translateY(100%); } }

.loc-list { display: flex; flex-direction: column; gap: .5rem; }
.loc-opt {
  display: flex; align-items: center; gap: .9rem; padding: .6rem; border-radius: 14px; width: 100%; text-align: left;
  border: 1px solid var(--border); background: var(--bg-primary); min-height: 64px;
}
.loc-opt:hover { background: var(--bg-secondary); }
.loc-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.loc-opt .thumb { width: 64px; height: 48px; border-radius: 10px; overflow: hidden; background: var(--bg-tertiary); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.loc-opt .thumb img { width: 100%; height: 100%; object-fit: cover; }
.loc-opt strong { display: block; font-size: 15px; }
.loc-opt .check { margin-left: auto; color: var(--accent); }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.menu-grid a, .menu-grid button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  min-height: 88px; padding: .75rem .5rem; border-radius: 16px; text-align: center;
  border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.menu-grid .lucide { width: 24px; height: 24px; color: var(--accent); }
.menu-sep { margin: 1.1rem 0 .6rem; }

/* ───────────── Formularios ───────────── */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8A9A' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.4rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .err { font-size: 12px; color: var(--danger); min-height: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 3rem; }
.password-field .toggle-password {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-muted);
}
.req { color: var(--danger); }

/* ───────────── Auth ───────────── */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-media { position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; padding: 3rem; isolation: isolate; background: #0b1a10; }
.auth-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-media::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5,12,7,.85), rgba(5,12,7,.1) 70%); }
.auth-media h2 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -.03em; max-width: 16ch; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .logo { width: 56px; height: 56px; object-fit: contain; margin-bottom: 1rem; }
.auth-tabs { display: flex; gap: .25rem; padding: .25rem; border-radius: 12px; background: var(--bg-secondary); margin: 1.25rem 0 1.5rem; }
.auth-tabs button { flex: 1; min-height: 44px; border: none; border-radius: 10px; background: transparent; font-weight: 600; color: var(--text-secondary); }
.auth-tabs button.active { background: var(--bg-primary); color: var(--text-primary); box-shadow: 0 2px 8px var(--shadow); }
.tipo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tipo-opt { position: relative; }
.tipo-opt input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-opt span {
  display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem .75rem; border-radius: 12px;
  border: 1px solid var(--border); font-size: 14px; font-weight: 600; cursor: pointer;
}
.tipo-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tipo-opt input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-media { display: none; } }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

/* ───────────── Estados vacíos / sección en preparación (skill 04) ───────────── */
.empty-state { text-align: center; padding: 3rem 1rem; max-width: 520px; margin: 0 auto; }
.empty-state img { width: min(320px, 80%); margin: 0 auto 1.25rem; border-radius: var(--radius-l); }
.empty-state p { color: var(--text-secondary); }
.empty-state .acciones { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.seccion-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: 3rem 0;
}
.seccion-hero .art { border-radius: var(--radius-l); overflow: hidden; background: var(--bg-secondary); aspect-ratio: 4/3; }
.seccion-hero .art img { width: 100%; height: 100%; object-fit: cover; }
.seccion-hero h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent);
}
.badge--sun { background: rgba(242,153,74,.2); color: var(--text-primary); background: color-mix(in srgb, var(--sun) 20%, transparent); color: color-mix(in srgb, var(--sun) 55%, var(--text-primary)); }
@media (max-width: 768px) { .seccion-hero { grid-template-columns: 1fr; padding: 1.5rem 0; gap: 1.25rem; } .seccion-hero .art { order: -1; } }

/* ───────────── Splash (skill 02/09) ───────────── */
#splash {
  position: fixed; inset: 0; z-index: 10001; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0b1a10; color: #fff; transition: opacity .5s ease; text-align: center; padding: 2rem;
}
#splash .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
#splash .inner { position: relative; }
#splash .logo-wrap {
  width: 108px; height: 108px; margin: 0 auto 1.25rem; border-radius: 28px; background: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: splashPop .8s var(--ease);
}
#splash .logo-wrap img { width: 84px; height: 84px; object-fit: contain; }
#splash h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
#splash p { color: rgba(255,255,255,.75); margin: .35rem 0 2rem; }
#splash .bar { width: 220px; height: 4px; margin: 0 auto; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
#splash .bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-1), var(--brand-2), var(--brand-3)); transition: width .1s linear; }
@keyframes splashPop { from { transform: scale(.7); opacity: 0; } }

/* ───────────── Toasts ───────────── */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 10002;
  padding: .75rem 1.25rem; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: calc(100vw - 2rem);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; animation: toastIn .25s var(--ease);
}
.toast-error   { background: var(--danger);  color: #fff; }
.toast-success { background: var(--success); color: #fff; }
.toast-warning { background: var(--warning); color: #fff; }
.toast-info    { background: var(--text-primary); color: var(--bg-primary); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Pull to refresh */
.ptr-indicator {
  position: fixed; top: -50px; left: 50%; transform: translateX(-50%); z-index: 9999; width: 40px; height: 40px;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); display: flex; align-items: center; justify-content: center;
  transition: top .2s; box-shadow: 0 6px 18px var(--shadow);
}
.ptr-indicator.girando .lucide { animation: spin .8s linear infinite; }

.modo-app .app-header { padding-top: env(safe-area-inset-top); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═════════════ Fase 3 · Directorio, ficha, perfiles ═════════════ */
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field.invalid textarea { border-color: var(--danger); }
.field .hint { font-size: 12px; color: var(--text-muted); }
.input-icon { position: relative; }
.input-icon > .lucide { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.input-icon input { padding-left: 2.6rem; }

/* Estrellas (solo lectura y selector) */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars .star { width: 15px; height: 15px; display: inline-block; background: var(--bg-tertiary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") center/contain no-repeat; }
.stars .star.on { background: var(--sun); }
.stars .star.half { background: linear-gradient(90deg, var(--sun) 50%, var(--bg-tertiary) 50%); }
.stars.lg .star { width: 22px; height: 22px; }
.star-picker { display: flex; gap: .25rem; }
.star-picker button { width: 44px; height: 44px; border: none; background: none; padding: 6px; border-radius: 10px; }
.star-picker button .star { width: 100%; height: 100%; }
.star-picker button:focus-visible { outline: 2px solid var(--accent); }

/* Chips de filtro (scroll horizontal en mobile) */
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .75rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .35rem .9rem .35rem .4rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary);
  font: inherit; font-size: 14px; font-weight: 600; position: relative; overflow: hidden; transition: border-color .2s, background .2s; }
.chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.chip .chip-ico { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.chip .chip-ico .lucide { width: 16px; height: 16px; }
.chip .n { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.chip.sm { min-height: 38px; padding: .3rem .85rem; font-size: 13px; }
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip.active .n { color: var(--accent); }

/* Directorio */
.dir-hero { position: relative; padding: 2.25rem 0 1.25rem; }
.dir-hero::before { content: ''; position: absolute; left: -1.5rem; top: 1rem; width: 6px; height: 64px; border-radius: 6px; background: var(--sun); }
.dir-hero h1 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.035em; margin: .35rem 0 .5rem; line-height: 1.05; }
.dir-hero p { color: var(--text-secondary); margin: 0; max-width: 56ch; }
.dir-top { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: end; }
.dir-search { display: flex; gap: .5rem; margin: 1.25rem 0 1rem; flex-wrap: wrap; }
.dir-search .input-icon { flex: 1 1 280px; }
.dir-search input { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font: inherit; font-size: 16px; padding: .7rem 1rem .7rem 2.6rem; }
.dir-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dir-search .btn { min-height: 52px; }
.dir-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.dir-toolbar .count { font-size: 14px; color: var(--text-secondary); }
.dir-toolbar .count strong { color: var(--text-primary); }
.dir-toolbar .selects { display: flex; gap: .5rem; flex-wrap: wrap; }
.dir-toolbar select { min-height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-primary); font: inherit; font-size: 14px; padding: .4rem 2rem .4rem .75rem; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238A8A9A' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; }

.com-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.com-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px 22px 22px 22px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.com-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px var(--shadow); border-color: var(--accent); }
.com-card .media { position: relative; height: 180px; background: var(--bg-secondary); overflow: hidden; }
.com-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.com-card:hover .media img { transform: scale(1.04); }
.com-card .media .sin-foto { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.com-card .media .sin-foto .lucide { width: 42px; height: 42px; }
.com-card .cat-ico { position: absolute; left: .85rem; bottom: -20px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); background: var(--surface); overflow: hidden; z-index: 1; }
.com-card .cat-ico img { width: 100%; height: 100%; object-fit: cover; }
.com-card .flags { position: absolute; top: .7rem; left: .7rem; right: .7rem; display: flex; justify-content: space-between; gap: .5rem; }
.flag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(10,20,12,.72); color: #fff; }
.flag .lucide { width: 13px; height: 13px; }
.flag--sun { background: var(--sun); color: var(--sun-text); }
.com-card .body { padding: 1.6rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.com-card h3 { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; }
.com-card .meta { font-size: 13px; color: var(--text-secondary); }
.com-card .rating { display: flex; align-items: center; gap: .4rem; font-size: 13px; color: var(--text-muted); margin-top: auto; padding-top: .4rem; }
.com-card .rating strong { color: var(--text-primary); }
.com-card--wide { grid-column: span 2; flex-direction: row; }
.com-card--wide .media { height: auto; min-height: 240px; flex: 1.2; }
.com-card--wide .body { flex: 1; padding: 1.5rem; justify-content: center; }
.com-card--wide h3 { font-size: 22px; }
.com-card--wide .cat-ico { left: auto; right: -22px; bottom: 1rem; }
.com-card .desc { font-size: 14px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: .25rem 0 0; }
.cargar-mas { display: flex; justify-content: center; margin: 0 0 3rem; }
.skeleton { background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%); background-size: 200% 100%; animation: skel 1.2s infinite linear; border-radius: 18px; }
@keyframes skel { to { background-position: -200% 0; } }
.com-grid .skeleton { height: 300px; }

/* Ficha */
.ficha { padding-top: 1.5rem; padding-bottom: 3rem; }
.ficha-back { display: inline-flex; align-items: center; gap: .35rem; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; min-height: 44px; }
.ficha-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.galeria .principal { position: relative; border-radius: 4px 26px 26px 26px; overflow: hidden; background: var(--bg-secondary); height: 420px; }
.galeria .principal img { width: 100%; height: 100%; object-fit: cover; }
.galeria .thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.galeria .thumbs button { flex: 0 0 76px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--bg-secondary); }
.galeria .thumbs button.active { border-color: var(--accent); }
.galeria .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ficha-head h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.03em; line-height: 1.08; margin: .6rem 0 .4rem; }
.ficha-head .meta { color: var(--text-secondary); font-size: 15px; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.ficha-head .meta span { display: inline-flex; align-items: center; gap: .3rem; }
.ficha-head .meta .lucide { width: 16px; height: 16px; color: var(--accent); }
.ficha-rating { display: flex; align-items: center; gap: .6rem; margin: .9rem 0 1.1rem; font-size: 14px; color: var(--text-muted); }
.ficha-rating strong { font-size: 20px; color: var(--text-primary); }
.ficha-acciones { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #178a45; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; margin-top: 1rem; }
.panel h3 { margin: 0 0 .6rem; font-size: 15px; display: flex; align-items: center; gap: .45rem; }
.panel h3 .lucide { width: 18px; height: 18px; color: var(--accent); }
.panel p { margin: 0; color: var(--text-secondary); white-space: pre-line; }
.panel .mapa { margin-top: .8rem; border-radius: 12px; overflow: hidden; height: 220px; background: var(--bg-secondary); border: 1px solid var(--border); }
.panel .mapa iframe { width: 100%; height: 100%; border: 0; }
.dueno { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; }
.dueno .avatar { width: 48px; height: 48px; font-size: 16px; }
.dueno small { display: block; color: var(--text-muted); font-size: 13px; }
.redes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.redes a { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-primary); text-decoration: none; font-size: 13px; font-weight: 600; }
.redes a .lucide { width: 16px; height: 16px; color: var(--accent); }

/* Reseñas */
.resenas { margin-top: 2.5rem; }
.resenas-top { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
.resumen { background: var(--bg-secondary); border-radius: 4px 22px 22px 22px; padding: 1.25rem; text-align: center; }
.resumen .big { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.resumen .total { font-size: 13px; color: var(--text-muted); margin-top: .4rem; }
.dist { margin-top: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.dist div { display: grid; grid-template-columns: 14px 1fr 26px; gap: .5rem; align-items: center; font-size: 12px; color: var(--text-muted); }
.dist .bar { height: 8px; border-radius: 4px; background: var(--bg-tertiary); overflow: hidden; }
.dist .bar span { display: block; height: 100%; background: var(--sun); border-radius: 4px; }
.resena-form { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.25rem; margin-bottom: 1.25rem; }
.resena-form h3 { margin: 0 0 .5rem; font-size: 16px; }
.resena { display: flex; gap: .85rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.resena:last-child { border-bottom: none; }
.resena .avatar { width: 40px; height: 40px; }
.resena .cab { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; font-size: 14px; }
.resena .cab a { color: var(--text-primary); font-weight: 700; text-decoration: none; }
.resena .cab small { color: var(--text-muted); font-size: 12px; }
.resena p { margin: .35rem 0 0; color: var(--text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.resena .acc { margin-left: auto; }
.link-btn { background: none; border: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; padding: .4rem; min-height: 36px; }
.link-btn.danger { color: var(--danger); }

/* Perfil */
.perfil-head { position: relative; margin: 1.5rem 0 1.25rem; border-radius: 4px 28px 28px 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.perfil-head .cover { height: 150px; background: linear-gradient(120deg, var(--brand-1) 0%, var(--brand-1-dark) 55%, var(--brand-3) 100%); position: relative; }
.perfil-head .cover::after { content: ''; position: absolute; right: 8%; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; background: var(--sun); opacity: .9; }
.perfil-head .info { display: flex; align-items: flex-end; gap: 1.25rem; padding: 0 1.5rem 1.4rem; margin-top: -54px; position: relative; z-index: 1; flex-wrap: wrap; }
.perfil-head .avatar { width: 112px; height: 112px; font-size: 36px; border: 4px solid var(--surface); box-shadow: 0 8px 24px var(--shadow); }
.perfil-head h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
.perfil-head .sub { color: var(--text-secondary); font-size: 14px; display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin-top: .2rem; }
.perfil-head .sub span { display: inline-flex; align-items: center; gap: .3rem; }
.perfil-head .sub .lucide { width: 15px; height: 15px; }
.perfil-head .acciones { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.avatar-edit { position: relative; }
.avatar-edit .cam { position: absolute; right: 2px; bottom: 6px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); background: var(--sun); color: var(--sun-text); display: flex; align-items: center; justify-content: center; }
.avatar-edit .cam .lucide { width: 17px; height: 17px; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex-shrink: 0; background: none; border: none; border-bottom: 3px solid transparent; padding: .8rem 1rem; min-height: 48px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: .45rem; }
.tabs button .lucide { width: 17px; height: 17px; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.5rem; max-width: 820px; margin-bottom: 3rem; }
.form-card h3 { margin: 0 0 1rem; font-size: 17px; }
.form-card .sep { border: none; border-top: 1px solid var(--border); margin: .5rem 0 1.25rem; }
.form-acciones { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.aviso { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.15rem; border-radius: 14px; background: var(--accent-soft); color: var(--text-primary); margin-bottom: 1.25rem; }
.aviso > .lucide { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.aviso p { margin: .2rem 0 .6rem; color: var(--text-secondary); font-size: 14px; }
.mis-items { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 3rem; }
.mi-item { display: flex; gap: 1rem; align-items: center; padding: .75rem; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.mi-item img { width: 92px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--bg-secondary); }
.mi-item .txt { flex: 1; min-width: 0; }
.mi-item h4 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-item small { color: var(--text-muted); font-size: 13px; }
.mi-item .acc { display: flex; gap: .25rem; flex-shrink: 0; }

/* Form comercio: fotos y ubicación */
.fotos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.foto-slot { position: relative; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg-secondary); border: 1px dashed var(--border); }
.foto-slot img { width: 100%; height: 100%; object-fit: cover; }
.foto-slot .quitar { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,.65); color: #fff; display: flex; align-items: center; justify-content: center; }
.foto-slot .quitar .lucide { width: 16px; height: 16px; }
.foto-slot .portada { position: absolute; left: 4px; bottom: 4px; font-size: 11px; font-weight: 700; padding: .15rem .45rem; border-radius: 6px; background: var(--sun); color: var(--sun-text); }
.foto-add { height: 96px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; font: inherit; font-size: 13px; font-weight: 600; }
.foto-slot.subiendo::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%232D7C4E' stroke-width='2.5'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3C/svg%3E") center no-repeat; }
.ubic { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ubic .estado { font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 160px; }

@media (max-width: 1024px) {
  .com-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Mobile/tablet: galería → título y acciones → descripción → resto */
  .ficha-grid { display: flex; flex-direction: column; gap: 0; }
  .ficha-grid > div { display: contents; }
  .ficha-grid .galeria { order: 1; margin-bottom: 1.25rem; }
  .ficha-grid .ficha-head { order: 2; }
  .ficha-grid .panel { order: 3; }
}
@media (max-width: 768px) {
  .dir-hero { padding-top: 1.25rem; }
  .dir-hero::before { display: none; }
  .dir-top { grid-template-columns: 1fr; gap: .75rem; }
  .dir-top .btn { width: 100%; }
  .dir-search .input-icon { flex-basis: 100%; }
  .dir-search .btn { flex: 1; padding-left: .5rem; padding-right: .5rem; }
  .dir-toolbar .selects { width: 100%; flex-wrap: nowrap; }
  .dir-toolbar select { flex: 1; min-width: 0; }
  .com-grid { grid-template-columns: 1fr; gap: 1rem; }
  .com-card--wide { grid-column: auto; flex-direction: column; }
  .com-card--wide .media { min-height: 0; height: 200px; flex: none; }
  .com-card--wide .body { padding: 1.6rem 1rem 1rem; }
  .com-card--wide h3 { font-size: 18px; }
  .com-card--wide .cat-ico { right: auto; left: .85rem; bottom: -20px; }
  .galeria .principal { height: 260px; margin: 0 -1rem; border-radius: 0; }
  .resenas-top { grid-template-columns: 1fr; gap: 1rem; }
  .perfil-head { margin-top: 1rem; }
  .perfil-head .cover { height: 110px; }
  .perfil-head .info { padding: 0 1rem 1.1rem; gap: .8rem; }
  .perfil-head .avatar { width: 92px; height: 92px; font-size: 30px; }
  .perfil-head .acciones { margin-left: 0; width: 100%; }
  .perfil-head .acciones .btn { flex: 1; }
  .form-card { padding: 1.1rem; border-radius: 16px; }
  .mi-item img { width: 72px; height: 60px; }
}
