/* frontend/public/css/main.css */

:root {
  --bg: #0b1120;
  --bg-dark: #0b1120;
  --surface: #1e293b;
  --surface-card: #1e293b;
  --surface-alt: #0f172a;
  --border: #334155;
  --primary: #f59e0b;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;
  --text: #f8fafc;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Botones Globales */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary);
  color: #0f172a;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-secondary {
  background-color: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: #fff;
}

.btn-accent {
  background-color: var(--accent-emerald);
  color: #064e3b;
}

.btn-accent:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-full {
  width: 100%;
}

/* =========================================================
   ESTILOS DEL DIRECTORIO PRINCIPAL (index.html)
   ========================================================= */

.main-header {
  background: linear-gradient(180deg, #1e293b 0%, #0b1120 100%);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem 1.75rem;
  text-align: center;
}

.top-nav-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1rem;
}

.btn-merchant-top {
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
}

.header-content {
  max-width: 960px;
  margin: 0 auto;
}

.main-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.main-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Filtros por Ciudad y Categoría en el Directorio */
.directory-controls {
  max-width: 960px;
  margin: 1.25rem auto 0;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.city-filters,
.filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.city-filters::-webkit-scrollbar,
.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn,
.city-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover,
.city-btn:hover {
  border-color: var(--primary);
  color: #fff;
}

.filter-btn.active,
.city-btn.active {
  background: var(--primary);
  color: #0f172a;
  border-color: var(--primary);
  font-weight: 700;
}

/* Grilla de Tiendas en index.html */
.stores-grid {
  max-width: 960px;
  margin: 1rem auto 3rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.15rem;
}

.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.store-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.store-card h2,
.store-card h3 {
  font-size: 1.1rem;
  color: #fff;
  line-height: 1.3;
}

.distance-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.store-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.store-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.store-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* Pie de página */
.main-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Utilidades */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}