/* ================================================================
   Indexeo Catalogs — Front Office Styles
   ================================================================ */

/* ── Wrapper ─────────────────────────────────────────────────── */
.ic-wrapper {
  font-family: inherit;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0 40px;
  box-sizing: border-box;
}

/* ── Barra de búsqueda ───────────────────────────────────────── */
.ic-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.ic-search-input-wrap {
  position: relative;
  flex: 1 1 260px;
}

.ic-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #888;
  pointer-events: none;
}

.ic-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  background: #fff;
}

.ic-input:focus {
  border-color: #e77818;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* ── Dropdown de categorías ──────────────────────────────────── */
.ic-category-wrap {
  flex: 0 1 240px;
}

.ic-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  box-sizing: border-box;
}

.ic-select:focus {
  border-color: #e77818;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* ── Contador de resultados ──────────────────────────────────── */
.ic-results-count {
  font-size: 13px;
  color: #777;
  margin-bottom: 16px;
}

/* ── Grid de tarjetas ────────────────────────────────────────── */
.ic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .ic-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .ic-grid { grid-template-columns: 1fr; }
  .ic-search-bar { flex-direction: column; }
  .ic-category-wrap { flex: 1 1 auto; }
}

/* ── Tarjeta ─────────────────────────────────────────────────── */
.ic-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}

.ic-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Logo */
.ic-card-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  min-height: 140px;
}

.ic-card-logo img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.ic-card-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-card-logo-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

/* Cuerpo */
.ic-card-body {
  padding: 14px 16px 10px;
  flex: 1;
}

.ic-card-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #222;
  line-height: 1.4;
}

.ic-card-size {
  font-size: 12px;
  color: #888;
  margin: 0 0 6px;
}

.ic-card-downloads {
  font-size: 13px;
  color: #666;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ic-card-downloads svg {
  flex-shrink: 0;
  color: #e77818;
}

/* Acciones */
.ic-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #f9f9f9;
  border-top: 1px solid #f0f0f0;
}

/* ── Botones ─────────────────────────────────────────────────── */
.ic-btn {
  flex: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.1s;
}

.ic-btn:active {
  transform: scale(0.97);
}

.ic-btn-preview {
  background: #fff;
  color: #e77818;
  border: 2px solid #e77818;
}

.ic-btn-preview:hover {
  background: #e77818;
  color: #fff;
}

.ic-btn-download {
  background: #e77818;
  color: #fff;
  border: 2px solid #e77818;
}

.ic-btn-download:hover {
  background: #c55e0e;
  border-color: #c55e0e;
  color: #fff;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.ic-spinner {
  display: flex;
  justify-content: center;
  padding: 32px 0;
}

.ic-spinner-inner {
  width: 40px;
  height: 40px;
  border: 4px solid #eee;
  border-top-color: #e77818;
  border-radius: 50%;
  animation: ic-spin 0.7s linear infinite;
}

@keyframes ic-spin {
  to { transform: rotate(360deg); }
}

/* ── Empty state ─────────────────────────────────────────────── */
.ic-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: #888;
  font-size: 15px;
}

/* ── Paginación ──────────────────────────────────────────────── */
.ic-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ic-page-link,
.ic-page-current,
.ic-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  color: #333;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.ic-page-link:hover {
  background: #e77818;
  color: #fff;
  border-color: #e77818;
}

.ic-page-current {
  background: #e77818;
  color: #fff;
  border-color: #e77818;
  cursor: default;
}

.ic-page-ellipsis {
  border: none;
  background: transparent;
  cursor: default;
  color: #aaa;
}

.ic-page-prev,
.ic-page-next {
  font-weight: 700;
}
