/* Ficha de producto v2 (2026-10-21). HTML agl-* generado por el hub; ver inc/product-v2.php. */
:root {
  --agl-dark: #2B3E4F;
  --agl-orange: #E57E25;
  --agl-line: #e2e8f0;
  --agl-soft: #f8fafc;
  --agl-muted: #64748b;
  --agl-text: #1f2937;
}

/* --- Resumen rápido (columna del precio) --- */
.agl-quick { display: grid; gap: .75rem; }
.agl-quick-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0;
  background: var(--agl-line); border: 1px solid var(--agl-line); border-radius: 12px; overflow: hidden;
}
.agl-quick-facts > div { background: #fff; padding: .55rem .7rem; min-width: 0; }
.agl-quick-facts dt { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--agl-muted); margin: 0; }
.agl-quick-facts dd { margin: .1rem 0 0; font-size: .9rem; font-weight: 700; color: var(--agl-dark); overflow-wrap: anywhere; }
.agl-quick-fit { margin: 0; font-size: .875rem; color: #334155; line-height: 1.45; }
.agl-quick-fit a { color: var(--agl-orange); font-weight: 700; white-space: nowrap; }
.agl-quick-pair { margin: 0; }
.agl-quick-pair a {
  display: block; text-align: center; padding: .6rem .8rem; border-radius: 12px;
  border: 1.5px solid var(--agl-dark); color: var(--agl-dark); font-weight: 700; font-size: .875rem; text-decoration: none;
}
.agl-quick-pair a:hover { background: var(--agl-dark); color: #fff; }

/* --- Menú de anclas --- */
.agl-anchors { display: flex; gap: .5rem; overflow-x: auto; margin: 0 0 1rem; padding-bottom: .25rem; }
.agl-anchors a {
  flex: 0 0 auto; padding: .45rem .9rem; border-radius: 999px; background: var(--agl-soft);
  border: 1px solid var(--agl-line); color: #475569; font-weight: 700; font-size: .875rem; text-decoration: none;
}
.agl-anchors a:hover { border-color: var(--agl-orange); color: var(--agl-orange); }

/* --- Secciones --- */
.agl-product { color: var(--agl-text); }
.agl-sec { padding: 1.5rem 0; border-top: 1px solid var(--agl-line); scroll-margin-top: 140px; }
.agl-sec:first-of-type { border-top: 0; padding-top: 0; }
.agl-sec > h3 { margin: 0 0 .9rem; font-size: 1.15rem; font-weight: 800; color: var(--agl-dark); }
.agl-sec p { margin: 0 0 .75rem; line-height: 1.6; }
.agl-notes { color: #475569; }

/* Características: tabla de dos columnas */
.agl-specs { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--agl-line); border-radius: 12px; overflow: hidden; font-size: .925rem; }
.agl-specs th, .agl-specs td { padding: .6rem .85rem; text-align: left; vertical-align: top; border-top: 1px solid var(--agl-line); }
.agl-specs tr:first-child th, .agl-specs tr:first-child td { border-top: 0; }
.agl-specs th { width: 38%; font-weight: 600; color: var(--agl-muted); background: var(--agl-soft); }
.agl-specs td { color: var(--agl-text); font-weight: 500; }
.agl-specs tr:nth-child(even) td { background: #fcfdfe; }

/* Compatibilidad: acordeón por modelo */
.agl-fit-summary { color: #334155; }
.agl-fit { display: grid; gap: .5rem; }
.agl-fit-model { border: 1px solid var(--agl-line); border-radius: 12px; background: #fff; }
.agl-fit-model[open] { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(15, 23, 42, .05); }
.agl-fit-model > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; padding: .7rem .9rem;
  cursor: pointer; list-style: none; font-weight: 700; color: var(--agl-dark);
}
.agl-fit-model > summary::-webkit-details-marker { display: none; }
.agl-fit-model > summary::after { content: "+"; margin-left: auto; font-size: 1.1rem; color: var(--agl-muted); }
.agl-fit-model[open] > summary::after { content: "−"; }
.agl-fit-name { flex: 1 1 14rem; }
.agl-fit-years { font-size: .85rem; color: var(--agl-orange); }
.agl-fit-count { font-size: .78rem; font-weight: 600; color: var(--agl-muted); }
.agl-fit-model .agl-chips { padding: 0 .9rem .85rem; }
.agl-fit-list { margin: 0 0 .75rem; padding: 0; list-style: none; display: grid; gap: .35rem; }
.agl-fit-list li { padding: .5rem .8rem; border: 1px solid var(--agl-line); border-radius: 10px; font-weight: 600; color: var(--agl-dark); }
.agl-note { margin-top: 1rem !important; padding: .75rem .9rem; border-radius: 12px; background: rgba(229, 126, 37, .08); border: 1px solid rgba(229, 126, 37, .2); font-size: .9rem; }
.agl-note a { color: var(--agl-orange); font-weight: 700; }

/* Etiquetas (motores, OEM) */
.agl-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.agl-chips li { padding: .25rem .6rem; border-radius: 999px; background: var(--agl-soft); border: 1px solid var(--agl-line); font-size: .8rem; font-weight: 600; color: #334155; }
.agl-chips--oem li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.agl-chips--oem li span { font-family: inherit; color: var(--agl-muted); font-weight: 500; margin-left: .25rem; }

/* Referencias */
.agl-refs { margin: 0; display: grid; gap: .9rem; }
.agl-refs dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--agl-muted); margin: 0 0 .3rem; }
.agl-refs dd { margin: 0; font-weight: 600; color: var(--agl-dark); }
.agl-refs a { color: var(--agl-orange); }

/* Ficha antigua (pestañas): el resumen queda arriba de la descripción */
.woocommerce-Tabs-panel .agl-quick { margin-bottom: 1.25rem; max-width: 34rem; }

@media (max-width: 640px) {
  .agl-specs th { width: 45%; }
  .agl-specs th, .agl-specs td { padding: .55rem .65rem; font-size: .875rem; }
}
@media (max-width: 359px) {
  .agl-quick-facts { grid-template-columns: 1fr; }
}
