/* ==========================================================================
   Fijate Tools - Configurador de Kit de Herramientas de MTB
   Estilos CSS Canónicos, Accesibilidad y Modo Claro / Oscuro
   ========================================================================== */

:root {
  /* Tipografías corporativas */
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta cromática - Tema Claro */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border-color: #cbd5e1;
  --border-focus: #2563eb;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;

  /* Acentos de ciclismo / taller */
  --accent-mtb: #0284c7;
  --accent-mtb-light: #e0f2fe;
  --accent-mtb-hover: #0369a1;

  --success-color: #16a34a;
  --success-bg: #dcfce7;
  --success-text: #14532d;

  --warning-color: #d97706;
  --warning-bg: #fef3c7;
  --warning-text: #78350f;

  --danger-color: #dc2626;
  --danger-bg: #fee2e2;
  --danger-text: #7f1d1d;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  /* Paleta cromática - Modo Oscuro (Midnight Slate) */
  --bg-page: #0b0f17;
  --bg-card: #131b26;
  --bg-subtle: #1a2433;
  --bg-hover: #223044;
  --border-color: #273549;
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  --accent-mtb: #38bdf8;
  --accent-mtb-light: rgba(56, 189, 248, 0.15);
  --accent-mtb-hover: #7dd3fc;

  --success-color: #4ade80;
  --success-bg: rgba(34, 197, 94, 0.16);
  --success-text: #86efac;

  --warning-color: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.18);
  --warning-text: #fde68a;

  --danger-color: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.18);
  --danger-text: #fca5a5;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   Layout base y contención
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-title,
.panel-section-title,
.section-heading,
.seo-guide-title {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
  color: var(--text-main);
}

.mono, code, .kpi-value, .torque-value {
  font-family: var(--font-mono);
}

.main-wrapper.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Hero introductorio
   -------------------------------------------------------------------------- */
.tool-hero-box {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 2rem;
  background-color: var(--accent-mtb-light);
  color: var(--accent-mtb);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 820px;
}

/* --------------------------------------------------------------------------
   Panel de configuración de bicicleta y perfil
   -------------------------------------------------------------------------- */
.config-panel {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.panel-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.config-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.config-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-select,
.form-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0.5rem 2.2rem 0.5rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 16px;
  cursor: pointer;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-mtb-light);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: 0.35rem;
}

/* Alerta técnica adaptativa */
.tech-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background-color: var(--accent-mtb-light);
  border: 1px solid var(--accent-mtb);
  border-radius: 0.6rem;
  transition: all 0.3s ease;
}

.alert-icon {
  color: var(--accent-mtb);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.alert-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.alert-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Dashboard de KPIs y métricas en vivo
   -------------------------------------------------------------------------- */
.kpi-dashboard {
  margin-bottom: 2rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.kpi-card.highlight-card {
  border-color: var(--accent-mtb);
  background: linear-gradient(135deg, var(--bg-card) 70%, var(--accent-mtb-light) 100%);
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.kpi-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
}

.kpi-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.kpi-badge-val {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  background-color: var(--success-bg);
  color: var(--success-text);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.4rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-mtb) 0%, var(--success-color) 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* Barra de acciones de exportación */
.actions-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.btn-tool-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px;
  min-height: 40px;
  padding: 0 1rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-tool-action:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-tool-action.btn-tool-accent {
  background-color: var(--accent-mtb);
  border-color: var(--accent-mtb);
  color: #ffffff;
}

.btn-tool-action.btn-tool-accent:hover {
  background-color: var(--accent-mtb-hover);
}

.btn-tool-action.btn-tool-whatsapp {
  background-color: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.btn-tool-action.btn-tool-whatsapp:hover {
  background-color: #1ebd5a;
}

.btn-tool-action.btn-tool-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-tool-action.btn-tool-ghost:hover {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   Matriz de checklist de herramientas
   -------------------------------------------------------------------------- */
.tools-checklist-section {
  margin-bottom: 2.5rem;
}

.category-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}

.filter-pill {
  padding: 0.45rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.825rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  background-color: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.filter-pill.active {
  background-color: var(--accent-mtb);
  border-color: var(--accent-mtb);
  color: #ffffff;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  height: 42px;
  font-size: 0.875rem;
  padding-left: 1rem;
}

/* Stack de items de herramientas */
.tools-items-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  min-width: 0;
}

.tool-item-card:hover {
  border-color: var(--accent-mtb);
  box-shadow: var(--shadow-sm);
}

.tool-item-card.is-owned {
  background-color: var(--bg-subtle);
  border-color: var(--border-color);
  opacity: 0.88;
}

.tool-item-card.is-bought {
  border-left: 4px solid var(--accent-mtb);
}

/* Controles de estado (Checkboxes custom) */
.tool-status-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: var(--text-main);
}

.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.8px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--bg-card);
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
  display: inline-grid;
  place-content: center;
}

.custom-checkbox:checked {
  background-color: var(--accent-mtb);
  border-color: var(--accent-mtb);
}

.custom-checkbox:checked::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-owned .custom-checkbox:checked {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

/* Miniatura oficial del producto desde Amazon CDN */
.tool-item-thumb {
  width: 90px;
  height: 90px;
  min-width: 90px;
  background-color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.tool-item-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.tool-item-card:hover .tool-item-thumb img {
  transform: scale(1.08);
}

/* Contenido de la tarjeta */
.tool-item-main {
  flex: 1 1 0%;
  min-width: 0;
}

.tool-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.tool-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.tool-badges-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-must {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

.badge-recommended {
  background-color: var(--warning-bg);
  color: var(--warning-text);
}

.badge-pro {
  background-color: var(--accent-mtb-light);
  color: var(--accent-mtb);
}

.badge-scope {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.tool-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 0.5rem;
}

.tool-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.meta-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tool-item-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.45rem;
  flex-shrink: 0;
  min-width: 140px;
  text-align: right;
  margin-top: 0.15rem;
}

.item-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.item-price-sub {
  font-size: 0.725rem;
  color: var(--text-sub);
  display: block;
}

/* Botón directo de compra en Amazon con estilo ámbar corporativo */
.btn-tool-buy-amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  min-height: 38px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  color: #fbbf24;
  font-size: 0.785rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

[data-theme="light"] .btn-tool-buy-amazon {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.btn-tool-buy-amazon:hover {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-tool-buy-amazon svg {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Comparativa y Tabla de pares de apriete
   -------------------------------------------------------------------------- */
.comparative-section,
.torque-specs-section {
  margin-bottom: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.section-header-box {
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.section-subheading {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.comparative-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 0.65rem;
}

.comparative-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.comparative-table th,
.comparative-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
}

.comparative-table th {
  background-color: var(--bg-subtle);
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.85rem;
}

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

.table-feature {
  font-weight: 600;
  color: var(--text-main);
  width: 25%;
}

.table-negative {
  color: var(--danger-text);
  background-color: rgba(239, 68, 68, 0.04);
}

.table-positive {
  color: var(--success-text);
  background-color: rgba(34, 197, 94, 0.04);
}

/* Grilla de pares de apriete */
.torque-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.torque-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.85rem;
  min-width: 0;
}

.torque-part {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.torque-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-mtb);
  margin-bottom: 0.25rem;
}

.torque-tip {
  font-size: 0.75rem;
  color: var(--text-sub);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Modal interactivo accesible
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  place-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-backdrop.is-visible {
  display: grid;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.btn-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
}

.btn-modal-primary {
  background-color: var(--accent-mtb);
  border-color: var(--accent-mtb);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Estilos de Impresión (@media print)
   -------------------------------------------------------------------------- */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }

  body {
    background-color: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt;
  }

  /* Ocultar elementos auxiliares, cabecera, sidebar, anuncios y footer */
  .app-header,
  .tool-ad-sidebar,
  .tools-ad-banner-section,
  .actions-toolbar,
  .category-filter-bar,
  .fijate-footer,
  .comparative-section,
  .seo-guide-section,
  .amazon-affiliate-showcase,
  .btn-tool-action,
  .checkbox-label input,
  .modal-backdrop {
    display: none !important;
  }

  .main-wrapper.tool-layout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card-main {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tool-hero-box {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }

  .hero-title {
    font-size: 1.4rem;
  }

  .kpi-dashboard {
    margin-bottom: 1rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .kpi-card {
    border: 1px solid #cbd5e1 !important;
    padding: 0.5rem !important;
  }

  .tool-item-card {
    page-break-inside: avoid;
    border: 1px solid #e2e8f0 !important;
    padding: 0.6rem !important;
    margin-bottom: 0.4rem !important;
  }

  .tool-item-card.is-owned {
    display: none !important; /* En la lista impresa solo mostramos lo que falta comprar */
  }

  .tool-status-controls::before {
    content: "☐";
    font-size: 14pt;
    margin-right: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   Ajustes Responsivos y Móvil
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .main-wrapper.tool-layout {
    margin: 0.75rem auto 2rem;
    padding: 0 0.75rem;
  }

  .card-main {
    padding: 1.25rem;
    border-radius: 0.75rem;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .config-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: stretch;
  }

  .btn-tool-action {
    flex: 1 1 auto;
    justify-content: center;
  }

  .tool-item-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .tool-status-controls {
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
    gap: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
  }

  .tool-item-thumb {
    width: 100%;
    height: 120px;
    align-self: center;
  }

  .tool-item-price-col {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.65rem;
    margin-top: 0.25rem;
    align-self: stretch;
    text-align: left;
  }

  .btn-tool-buy-amazon {
    height: 40px;
    min-height: 40px;
    padding: 0 1rem;
    font-size: 0.825rem;
  }
}



