:root{
  --ac-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  --ac-text:#0f172a;
  --ac-muted:#64748b;
  --ac-border:#e2e8f0;
  --ac-card:#ffffff;
  --ac-bg:#ffffff;
  --ac-radius:14px;
  --ac-radius-sm:12px;
  --ac-shadow: 0 14px 40px rgba(2,6,23,.10);
  --ac-input-h: 48px;
  --ac-primary:#3b2f84; /* purple like sample */
  --ac-primary-2:#2e2567;
}

#ac-catalog-wrap{
  font-family: var(--ac-font);
  color: var(--ac-text);
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 14px 44px;
}

#ac-catalog-wrap h1{
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 6px 0 14px;
}

.ac-logo{
  display:flex;
  align-items:center;
  gap:12px;
  margin: 6px 0 10px;
}
.ac-logo img{ height:48px; width:auto; display:block; }

.ac-card{
  background: var(--ac-card);
  border:1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  box-shadow: var(--ac-shadow);
  padding: 14px;
}

.ac-filters{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:flex-end;
}

/* sticky filter bar under menu */
.ac-sticky{
  position: sticky;
  top: var(--ac-sticky-top, 0px);
  z-index: 20;
}

.ac-field{
  min-width: 160px;
  flex: 1 1 180px;
}
.ac-field.ac-field--kw{ flex: 1.4 1 260px; min-width: 240px; }
.ac-field.ac-field--btn{ flex: 0 0 auto; min-width: auto; }

.ac-field label{
  display:block;
  font-size: 12px;
  color: var(--ac-muted);
  margin: 0 0 6px;
}

.ac-input, .ac-select{
  width: 100%;
  height: var(--ac-input-h);
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius-sm);
  padding: 0 14px;
  background: #fff;
  outline: none;
  font-size: 15px;
  font-weight: 650;
}

.ac-input::placeholder{ color:#94a3b8; font-weight:500; }

.ac-input:focus, .ac-select:focus{
  border-color: rgba(59,47,132,.55);
  box-shadow: 0 0 0 4px rgba(59,47,132,.12);
}

.ac-btn{
  height: var(--ac-input-h);
  border-radius: var(--ac-radius-sm);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--ac-border);
  background: #fff;
}

.ac-btn--primary{
  background: var(--ac-primary);
  border-color: var(--ac-primary);
  color:#fff;
}
.ac-btn--primary:hover{ background: var(--ac-primary-2); }

.ac-btns{display:flex; gap:10px; align-items:center;}
.ac-btn--ghost{background:#f1f5f9; border-color:#e2e8f0; color:#0f172a;}
.ac-btn--ghost:hover{background:#e2e8f0;}
.ac-logo-link{display:inline-flex;}


.ac-meta{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-top: 12px;
  color: var(--ac-muted);
  font-size: 13px;
}

.ac-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border:1px solid var(--ac-border);
  border-radius: 999px;
  background:#f8fafc;
  font-weight: 650;
}

.ac-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  overflow: hidden;
  background:#fff;
}

.ac-table thead th{
  position: sticky;
  top: calc(var(--ac-sticky-top, 0px) + 88px);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #334155;
  padding: 12px 10px;
  border-bottom: 1px solid var(--ac-border);
}

.ac-table td{
  padding: 12px 10px;
  border-bottom: 1px solid var(--ac-border);
  vertical-align: top;
  font-size: 14px;
}

.ac-table tbody tr:hover td{ background:#fbfdff; }

.ac-table tr:last-child td{ border-bottom:none; }

.ac-ref a{
  color: var(--ac-primary);
  font-weight: 900;
  text-decoration:none;
}
.ac-ref a:hover{ text-decoration: underline; }

.ac-desc small{
  display:block;
  color: var(--ac-muted);
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
}

.ac-empty{
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed var(--ac-border);
  border-radius: var(--ac-radius);
  color: var(--ac-muted);
  background: #fcfcfd;
}

/* During AJAX calls we dim the filter card but still allow clicking buttons
   (e.g. "Limpiar") so users can recover if a request hangs. */
.ac-loading{ opacity:.75; }
.ac-loading .ac-input,
.ac-loading .ac-select{ pointer-events:none; }
.ac-loading .ac-btn{ pointer-events:auto; }

.ac-right{ text-align:right; white-space:nowrap; }

@media (max-width: 800px){
  #ac-catalog-wrap h1{ font-size: 28px; }
  .ac-field{ flex: 1 1 100%; min-width: 0; }
  .ac-field.ac-field--btn{ width: 100%; }
  .ac-btn{ width: 100%; }
}

.ac-thumb{width:56px;}
.ac-thumb img{width:44px;height:44px;object-fit:contain;border:1px solid var(--ac-border);border-radius:12px;background:#fff;display:block;}
