.gpt-grid-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.gpt-grid-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}

.gpt-grid-controls input,
.gpt-grid-controls select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.gpt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .gpt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .gpt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .gpt-grid {
    grid-template-columns: 1fr;
  }
}

.gpt-card {
  border: 2px solid #000;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gpt-card-image {
  padding: 24px 16px;
  text-align: center;
  border-bottom: 1px solid #000;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpt-card-image img {
  max-width: 100%;
  height: auto;
}

.gpt-card-placeholder {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
}

.gpt-card-body {
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.gpt-card-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 16px;
}

.gpt-card-desc {
  font-size: 14px;
  color: #333;
}

.gpt-card-category {
  font-size: 12px;
  color: #666;
}

.gpt-card-button {
  margin-top: 10px;
  padding: 10px 16px;
  border: 2px solid #000;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  font-size: 14px;
}

.gpt-card-button:hover {
  background: #000;
  color: #fff;
}

/* ==== ESTILOS MODERNOS GPT GRID (override) ==== */

/* Contenedor general */
.gpt-grid-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  background: #f5f7fb;
  border-radius: 18px;
}

/* Barra de controles */
.gpt-grid-controls {
  padding: 12px 16px;
  margin-bottom: 24px;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Inputs y selects */
.gpt-grid-controls input,
.gpt-grid-controls select {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #d0d7e2;
  background: #ffffff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}

.gpt-grid-controls input:focus,
.gpt-grid-controls select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Grid de tarjetas */
.gpt-grid {
  gap: 18px;
}

/* Tarjeta */
.gpt-card {
  border-radius: 18px;
  border: 1px solid #e1e5ef;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.gpt-card:hover {
  transform: translateY(-4px);
  border-color: #6366f1;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

/* Imagen */
.gpt-card-image {
  padding: 28px 20px;
  background: radial-gradient(circle at top left, #fee2e2, #eff6ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpt-card-image img {
  max-width: 80%;
  height: auto;
}

/* Cuerpo */
.gpt-card-body {
  padding: 18px 18px 20px;
  text-align: left;
}

/* Título */
.gpt-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: none;
}

/* Descripción */
.gpt-card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: #4b5563;
  margin-bottom: 10px;
}

/* CATEGORÍA: chip / etiqueta destacada */
.gpt-card-category {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #4f46e5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}

/* Botón */
.gpt-card-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(88, 80, 236, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.gpt-card-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(88, 80, 236, 0.45);
  opacity: 0.95;
}

/* ==== CONTROLES MODERNOS: BUSCADOR + SELECTS ==== */

.gpt-grid-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Buscador */
.gpt-grid-search {
  flex: 1 1 1;
  font-size: 14px;
}

/* Selects (categoría y orden) en estilo pill moderno */
.gpt-grid-filter-category,
.gpt-grid-sort {
  flex: 0 0 auto;
  min-width: 180px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;

  /* estilo base */
  padding: 9px 36px 9px 14px;
  border-radius: 999px;
  border: 1px solid #d0d7e2;
  background-color: #ffffff;

  /* quitar estilo nativo y poner flecha custom */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7L10 12L15 7' stroke='%236366F1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, transform 0.1s ease;
}

.gpt-grid-filter-category:hover,
.gpt-grid-sort:hover {
  background-color: #f4f4ff;
  border-color: #6366f1;
  transform: translateY(-1px);
}

.gpt-grid-filter-category:focus,
.gpt-grid-sort:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* placeholder del buscador algo más suave */
.gpt-grid-search::placeholder {
  color: #9ca3af;
}

/* ==== FIX SOLO MOBILE ==== */
@media (max-width: 768px) {
  /* Controles en columna y sin fondo feo */
  .gpt-grid-controls {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 18px !important;
    gap: 10px !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* TODOS LOS INPUTS Y SELECTS CON EL MISMO TAMAÑO EXACTO */
  .gpt-grid-search,
  .gpt-grid-filter-category,
  .gpt-grid-sort {
    width: 100% !important;
    height: 46px !important;
    font-size: 15px !important;
    padding: 0 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
  }

  /* Quitar estilos internos del tema que los deforman */
  .gpt-grid-controls select,
  .gpt-grid-controls input {
    max-width: 100% !important;
    min-width: 100% !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
  }

  /* Grid en una sola columna para que los GPT se vean grandes */
  .gpt-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Tarjeta más grande en mobile */
  .gpt-card {
    border-radius: 14px !important;
  }
}
