/* public/css/detalle.css */

/* Paleta y tema */
:root{
  --bg: #ffffff;
  --fg: #0f172a;         /* slate-900 */
  --muted: #64748b;      /* slate-500 */
  --border: #e5e7eb;     /* gray-200 */
  --card-bg: #ffffff;
  --accent: #0a58ca;     /* azul marca */
  --danger: #dc2626;
  --danger-bg: #fff1f2;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.04);
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1020;
    --fg: #e5e7eb;       /* gray-200 */
    --muted: #9aa5b1;
    --border: #2a3342;
    --card-bg: #12182a;
    --accent: #6ea8fe;
    --danger: #f87171;
    --danger-bg: rgba(239,68,68,.12);
    --shadow: 0 1px 2px rgba(0,0,0,.6), 0 8px 28px rgba(0,0,0,.4);
  }
}

/* Base */
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.45;
}

/* Contenedor (opcional si quieres centrar el contenido) */
.wrap{
  max-width: 820px;
  margin: 16px auto;
  padding: 0 16px;
}

/* Tipografía y links */
h1,h2,h3{ margin: 0 0 10px; line-height: 1.2; }
a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }
.muted{ color: var(--muted); }

/* Tarjeta */
.card{
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  max-width: 720px;
}

/* Grid de atributos */
.row{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 14px;
  margin-top: 8px;
  align-items: baseline;
}
.row > div strong{ font-weight: 700; }

/* Responsive: en móviles, etiqueta arriba y valor abajo */
@media (max-width: 560px){
  .row{ grid-template-columns: 1fr; }
  .row > div:nth-child(odd){
    color: var(--muted);
    margin-top: 8px;
  }
  .row > div:nth-child(even){
    margin-top: -2px;
  }
}

/* Precio */
.price{
  font-size: clamp(22px, 3.2vw + 14px, 32px);
  font-weight: 800;
  margin: 16px 0 6px;
}
.price span{ color: var(--accent); }

/* Acciones */
.actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.button, button{
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
}
.button:hover, button:hover{
  background: rgba(0,0,0,.03);
  border-color: color-mix(in srgb, var(--border), var(--fg) 18%);
}
@media (prefers-color-scheme: dark){
  .button:hover, button:hover{
    background: rgba(255,255,255,.04);
  }
}
.button:active, button:active{ transform: translateY(1px); }

/* Estados */
.notfound{
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  padding: 12px;
  border-radius: 12px;
}

/* Utilidad para espaciados */
.mt-1{ margin-top: 8px; }
.mt-2{ margin-top: 16px; }
.mt-3{ margin-top: 24px; }
