/* ============================================
   ENCERVEZATE YEAST TOOL - EMBEDDABLE
   ============================================ */

:root {
  /* Scope variables if possible, but global is fine for now as they are specific enough */
  --color-primary: #FAC702;
  --color-primary-light: #FEF9E7;
  --color-primary-dark: #D4A900;
  --color-bg: transparent;
  /* Transparent for WP integration */
  --color-surface: #FFFFFF;
  --color-text: #1D1D1F;
  --color-border: #E8E8ED;
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;

  /* Radar Colors */
  --bar-platano: #FBBF24;
  --bar-manzana: #84CC16;
  --bar-hueso: #F97316;
  --bar-tropical: #EC4899;
  --bar-citrico: #FB923C;
  --bar-especiado: #EF4444;
  --bar-fenolico: #8B5CF6;
  --bar-neutro: #9CA3AF;
}

/* 
  FIX: When WP theme is dark (data-theme='dark'), force text color to black 
  inside our container because our cards are white.
*/
[data-theme='dark'] .eyt-container,
body[data-theme='dark'] .eyt-container {
  --color-text: #1D1D1F !important;
  color: #1D1D1F !important;
}

[data-theme='dark'] .eyt-container .spec-label,
body[data-theme='dark'] .eyt-container .spec-label {
  color: #6b7280;
  /* Ensure labels are still gray, not pure black */
}


/* Reset restricted to container */
.eyt-container * {
  box-sizing: border-box;
}

.eyt-container {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  width: 100%;
  max-width: 100%;
  /* Ensure it fits in post content */
}

/* Override body to be safe, though purely cosmetic here */
body {
  background-color: transparent;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.main-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.main-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

@media (min-width: 768px) {
  .main-header .container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.logo-area h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-area span {
  color: var(--color-primary);
}

.logo-area p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
  display: none;
}

@media (min-width: 640px) {
  .logo-area p {
    display: block;
  }
}

/* ============================================
   TABS - Estilo Pill / Segmented Control
   ============================================ */
.tool-tabs {
  display: inline-flex;
  gap: 8px;
  background: transparent;
  padding: 0;
  width: 100%;
  justify-content: flex-end;
  /* Align right as requested */
  margin-bottom: 24px;
}

.tab-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 8px 16px;
  /* Smaller padding */
  border-radius: var(--radius-sm);
  /* Default radius (overridden later) */
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-button);
}

.tab-btn:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
  border-color: #D1D1D6;
}

.tab-btn.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  font-weight: 600;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.app-container {
  padding: 40px 24px;
}

.module-header {
  text-align: center;
  margin-bottom: 32px;
}

.module-header h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.module-header p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   CARDS - Estilo limpio Apple
   ============================================ */
.card-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.card-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
}

.card-section-title .icon {
  color: var(--color-primary);
}

/* ============================================
   RECOMENDADOR
   ============================================ */
.recommender-controls {
  max-width: 600px;
  margin: 0 auto 32px;
}

.style-selector-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.style-selector-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

#style-select {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background-color: var(--color-surface);
  color: var(--color-text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2386868B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#style-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.results-area.hidden {
  display: none;
}

.style-info-card {
  background: var(--color-surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
}

.style-info-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.style-info-card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.style-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-primary-dark);
  font-weight: 500;
}

.tips-list {
  margin-top: 16px;
  padding-left: 20px;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.tips-list li {
  margin-bottom: 6px;
}

.recommendations-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.best-match {
  position: relative;
  max-width: 360px;
  /* Ancho similar a una tarjeta del grid */
  margin: 0;
  /* Alineado a la izquierda */
  width: 100%;
}

.badge-best {
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--color-primary);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(230, 149, 0, 0.3);
}

.alternatives h4 {
  margin-bottom: 20px;
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 4px;
}

#alternatives-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* =========================================
   Yeast Card (Refined Layout)
   ========================================= */
.yeasts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0;
}

.yeast-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 280px;
}

.yeast-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--color-primary-light);
}

.card-upper {
  display: flex;
  padding: 1rem 1rem 0.25rem;
  gap: 0.75rem;
}

.card-info {
  flex: 1;
}

.yeast-brand {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.yeast-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.yeast-desc {
  font-size: 0.75rem;
  color: #6b7280;
  /* Gray-500 */
  line-height: 1.3;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-image-box {
  width: 94px;
  height: 94px;
  flex-shrink: 0;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.yeast-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-lower {
  padding: 0.5rem 1.25rem 1.25rem;
  margin-top: auto;
}

.card-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 2px;
}

.spec-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.card-tags {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.mini-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  text-transform: uppercase;
}

/* =========================================
   Filters (Compact)
   ========================================= */
/* Estilos de filtros movidos abajo al bloque de EXPLORADOR */

/* ============================================
   EXPLORADOR
   ============================================ */
.filters-bar {
  background: var(--color-surface);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--color-border);
}

/* Desktop: filtros en horizontal */
@media (min-width: 1024px) {
  .filters-bar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .search-box {
    flex: 0 0 auto;
  }

  .filter-group {
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .results-count {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

.search-box {
  width: 100%;
}

.search-box input {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 100%;
  min-width: 200px;
  max-width: 280px;
  font-size: 0.9375rem;
  background: var(--color-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.search-box input::placeholder {
  color: var(--color-text-tertiary);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

@media (min-width: 1024px) {
  .filter-group {
    width: auto;
  }
}

.filter-group select {
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  min-width: 140px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-group select:hover {
  border-color: var(--color-primary-dark);
  background-color: var(--color-surface-hover);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.results-count {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  padding: 10px 0;
}

.results-count span {
  font-weight: 600;
  color: var(--color-text);
}

/* Botón "Mostrar más" */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0 3rem;
}

.load-more-container.hidden {
  display: none;
}

.load-more-btn {
  padding: 14px 32px;
  background: var(--color-primary);
  color: var(--color-text);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-button);
}

.load-more-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 199, 2, 0.3);
}

.load-more-btn:active {
  transform: translateY(0);
}



/* ============================================
   COMPARADOR
   ============================================ */
.comparator-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .comparator-controls {
    grid-template-columns: 1fr;
  }
}

.yeast-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.yeast-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  background: var(--color-bg);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 18%;
}

.comparison-table td {
  width: 27%;
  vertical-align: top;
  font-size: 0.9375rem;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-start;
    /* Align to top instead of center */
    padding-top: 80px;
    /* Push down to clear potential sticky headers */
    overflow-y: auto;
    /* Allow scrolling overlay if needed */
  }

  .modal-content {
    margin-bottom: 80px;
    /* Space at bottom */
    max-height: none;
    /* Let content flow */
  }
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  background: var(--color-surface);
  width: 90%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  padding: 32px;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
}

/* Modal Grid - Responsive */
.modal-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.modal-specs ul {
  list-style: none;
  line-height: 2;
}

.modal-radar {
  order: -1;
}

@media (min-width: 640px) {
  .modal-radar {
    order: 0;
  }
}

.modal-radar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#modal-radar-canvas {
  max-width: 100%;
  height: auto;
}

/* Modal Navigation Hint */
.modal-nav-hint {
  text-align: center;
  padding: 16px 0 8px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-tertiary);
  font-size: 0.8125rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  .modal-nav-hint {
    display: none;
  }
}

/* Clickable substitutes */
.substitute-link {
  transition: all 0.2s ease;
}

.substitute-link:hover {
  border-color: #9ca3af !important;
  background-color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

/* Modal Characteristics Bars */
.modal-char-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-char-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-char-label {
  min-width: 110px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.modal-char-bar-container {
  flex-grow: 1;
  /* Restore width! */
  height: 8px;
  background: #f3f4f6;
  /* Restore visible track */
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}

.modal-char-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--color-primary);
  transition: width 1s ease-out;
}

.modal-char-value {
  min-width: 70px;
  text-align: right;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.modal-char-pof-text {
  font-size: 0.8125rem;
  font-weight: 600;
}

.pof-positive {
  color: #DC2626;
}

.pof-negative {
  color: #16A34A;
}

/* Perfil Aromático Bars */
.profile-bars {
  margin-top: 12px;
}

.profile-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8125rem;
}

.profile-label {
  width: 80px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.profile-track {
  flex-grow: 1;
  background: #f3f4f6;
  /* Restore visible track */
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.profile-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ============================================
   RADAR CHART
   ============================================ */
.radar-chart-section,
.comparison-table-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

.radar-chart-header {
  margin-bottom: 20px;
}

.radar-chart-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.radar-chart-header p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.radar-chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

#radar-canvas {
  max-width: 100%;
  height: auto;
}

.radar-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-label {
  color: var(--color-text);
}

/* Color indicator in table */
.color-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--color-text-tertiary);
  font-size: 0.8125rem;
}

/* ============================================
   DESCRIPTORS PANEL (Collapsible)
   ============================================ */
.descriptors-toggle {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.toggle-descriptors-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: background 0.2s;
}

.toggle-descriptors-btn:hover {
  background: var(--color-primary-light);
}

.toggle-descriptors-btn .toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-descriptors-btn.active .toggle-icon {
  transform: rotate(180deg);
}

.descriptors-panel {
  margin-top: 16px;
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  animation: slideDown 0.3s ease;
}

.descriptors-panel.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.descriptors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.descriptor-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.descriptor-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.descriptor-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.descriptor-text strong {
  font-size: 0.875rem;
  color: var(--color-text);
}

.descriptor-text span {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ============================================
   BAR COMPARISON (BeerMaverick style)
   ============================================ */
.bar-comparison-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
}

#bar-comparison-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.bar-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-tertiary);
  font-size: 0.9375rem;
}

/* Each characteristic group */
.bar-group {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.bar-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bar-group-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.bar-group-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-group-title h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-group-title p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  max-width: 400px;
  line-height: 1.4;
}

/* Individual bars */
.bar-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-value-label {
  min-width: 70px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  text-align: right;
}

.bar-track {
  flex-grow: 1;
  height: 24px;
  background: #f3f4f6;
  /* Restore visible track color */
  border-radius: var(--radius-sm);
  position: relative;
  overflow: visible;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  position: relative;
  min-width: 4px;
  transition: width 1s ease-out;
}

/* Range indicator (marker) */
.bar-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Legend at top */
.bar-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.bar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.bar-legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* ============================================
   UTILITIES
   ============================================ */
.capitalize {
  text-transform: capitalize;
}

.hidden {
  display: none !important;
}

/* Style Linking Badges */
.style-link-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  margin-right: 6px;
  margin-bottom: 6px;
  border: 1px solid #dbeafe;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.style-link-badge:hover {
  background: #dbeafe;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  color: #1e40af;
}

/* ============================================
   FORCE OVERRIDES FOR WORDPRESS THEMES
   ============================================ */
.eyt-container .tab-btn {
  border-radius: 6px !important;
  /* Rectangular-ish */
  font-size: 0.85rem !important;
  /* Smaller font */
  padding: 6px 14px !important;
  /* Force smaller padding */
}

.eyt-container .load-more-btn,
.eyt-container .style-link-badge,
.eyt-container .toggle-descriptors-btn,
.eyt-container .close-btn {
  border-radius: 9999px !important;
  /* Keep others rounded/pill if desired, or change all? keeping pills for badges */
}

.eyt-container select,
.eyt-container input[type="text"],
.eyt-container .card-section,
.eyt-container #style-select,
.eyt-container .modal-content {
  border-radius: 12px !important;
  /* Rounded corners */
}

.eyt-container button {
  border-radius: 9999px !important;
  /* Safety for other buttons */
}

/* ============================================
   RESPONSIVE TABS (MOBILE)
   ============================================ */
@media (max-width: 768px) {
  .eyt-container .tool-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    width: 100% !important;
    gap: 6px !important;
    justify-content: center !important;
    margin-bottom: 20px !important;
  }

  .eyt-container .tab-btn {
    width: 100% !important;
    padding: 8px 4px !important;
    font-size: 0.75rem !important;
    /* Smaller text to fit "Recomendación" */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    /* Slightly rounded rects */
    margin-right: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* ============================================
   RESPONSIVE GRIDS (MOBILE)
   ============================================ */
@media (max-width: 640px) {
  .container {
    padding: 0 16px !important;
    /* Reduce padding on mobile */
  }

  /* Force single column for yeast cards on mobile to prevent overflow */
  .yeasts-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Adjust specific card items if needed */
  .yeast-card {
    min-height: auto !important;
    /* Let height adapt */
  }
}