/* =====================================================================
 * vidriera.css — Las pantallas públicas del marketplace: portada (index.php),
 * resultados (productos.php) y ficha de producto (verproductos.php).
 *
 * Todos los colores salen de las variables de asociame.css (la paleta
 * naranja), con su valor de repuesto por si esa hoja no carga. Sin amarillo
 * #FFE600 ni #f5c518: ésas son las paletas viejas.
 *
 * Todo va por clase con prefijo "vd-": titulo.php se carga DESPUÉS y trae
 * `*{margin:0;padding:0}` y `body{font-family:Arial}`; un selector de clase
 * les gana, uno de etiqueta pierde. Por eso la letra se fija en .vd-page y no
 * en body.
 * ===================================================================== */

/* ---- Página ----------------------------------------------------------- */
.vd-body{ background:var(--as-fondo,#EEEDEA); }
.vd-page{
  font-family:var(--as-letra,"Nunito Sans","Segoe UI",Arial,sans-serif);
  font-size:14px; line-height:1.45; color:var(--as-tinta,#262626);
  -webkit-font-smoothing:antialiased;
}
.vd-page ::selection{ background:var(--as-resalte,#FFF4C2); color:var(--as-sobre-resalte,#6A4A00); }
.vd-page :focus-visible{ outline:3px solid var(--as-enlace,#1A4FA0); outline-offset:2px; border-radius:3px; }
/* Los enlaces heredan el color del texto; los botones NO (.as-btn trae el
 * suyo y una regla de contenedor con más peso lo dejaba azul sobre azul). */
.vd-page a{ text-decoration:none; }
.vd-page a:not(.as-btn):not(.as-btn-sec){ color:inherit; }
.vd-page img{ display:block; }
.vd-page p{ margin:0; }
.vd-page h1,.vd-page h2,.vd-page h3{ margin:0; font-weight:700; line-height:1.2; text-wrap:balance; }
.vd-page button{ font:inherit; }
.vd-page ul{ list-style:none; }
.vd-wrap{ max-width:1200px; margin:0 auto; padding:0 16px; }
.vd-num{ font-variant-numeric:tabular-nums; }
.vd-link{ color:var(--as-enlace,#1A4FA0); }
.vd-link:hover{ text-decoration:underline; }
.vd-mut{ color:var(--as-tinta-2,#666); }
.vd-card{ background:var(--as-superficie,#fff); border-radius:var(--as-radio,6px); box-shadow:var(--as-sombra,0 1px 2px rgba(0,0,0,.12)); }
.vd-oculto{ position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Iconos: dibujados en SVG, un solo trazo (1.8) y tamaño. */
.vd-ico{ width:18px; height:18px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.vd-ico.chico{ width:15px; height:15px; }
.vd-ico.grande{ width:28px; height:28px; stroke-width:1.5; }

/* ---- Migas de pan ----------------------------------------------------- */
.vd-migas{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; padding:14px 0 10px; font-size:13px; color:var(--as-tinta-2,#666); }
.vd-migas a:hover{ color:var(--as-enlace,#1A4FA0); text-decoration:underline; }
.vd-migas .sep{ color:var(--as-tinta-3,#767676); }
.vd-migas .actual{ color:var(--as-tinta,#262626); }

/* ---- Títulos de sección ----------------------------------------------- */
.vd-sec{ margin:28px 0 0; }
.vd-sec-enc{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:0 0 14px; }
.vd-sec-enc h2{ font-size:22px; font-weight:700; letter-spacing:-.01em; }
.vd-sec-enc .vd-link{ font-size:14px; font-weight:600; white-space:nowrap; }

/* ---- Botones ------------------------------------------------------------ */
/* .as-btn / .as-btn-sec vienen de asociame.css. Variantes de tamaño: */
.vd-btn-ancho{ width:100%; }
.vd-btn-chico{ padding:8px 14px!important; font-size:14px!important; }
.vd-btn-wa{ border-color:var(--as-ok,#1E7045)!important; color:var(--as-ok,#1E7045)!important; }
.vd-btn-wa:hover{ background:rgba(30,112,69,.07)!important; }

/* ---- Campos ------------------------------------------------------------ */
.vd-campo{
  padding:9px 12px; border:1px solid var(--as-borde,#BDBDBD); border-radius:var(--as-radio-sm,4px);
  font:inherit; font-size:14px; color:var(--as-tinta,#262626); background:#fff; max-width:100%;
}
.vd-campo:focus{ outline:2px solid var(--as-enlace,#1A4FA0); outline-offset:0; border-color:var(--as-enlace,#1A4FA0); }
.vd-page select.vd-campo{ padding-right:30px; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; background-size:14px; }

/* ---- Insignias y precio ----------------------------------------------- */
.vd-badge{ display:inline-block; padding:2px 8px; border-radius:3px; background:var(--as-resalte,#FFF4C2); color:var(--as-sobre-resalte,#6A4A00); font-size:12px; font-weight:700; line-height:1.5; }
.vd-badge.ok{ background:var(--as-ok-fondo,#E3F2E9); color:var(--as-ok,#1E7045); }
.vd-precio{ font-size:20px; font-weight:400; letter-spacing:-.01em; color:var(--as-tinta,#262626); }
.vd-precio small{ font-size:13px; color:var(--as-tinta-2,#666); margin-left:4px; }
.vd-precio-tachado{ font-size:13px; color:var(--as-tinta-2,#666); text-decoration:line-through; }
.vd-precio-cuenta{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--as-enlace,#1A4FA0); }
.vd-precio-cuenta:hover{ text-decoration:underline; }
.vd-consultar{ font-size:15px; color:var(--as-tinta-2,#666); }

/* ---- Tarjeta de producto (un solo componente para las tres pantallas) --- */
.vd-grilla{ display:grid; gap:14px; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); }
.vd-prod{
  display:flex; flex-direction:column; min-width:0; overflow:hidden;
  background:var(--as-superficie,#fff); border-radius:var(--as-radio,6px);
  box-shadow:var(--as-sombra,0 1px 2px rgba(0,0,0,.12));
  transition:box-shadow .18s ease-out, transform .18s ease-out;
}
.vd-prod:hover{ box-shadow:var(--as-sombra-2,0 8px 22px rgba(0,0,0,.14)); transform:translateY(-2px); }
.vd-prod-foto{ position:relative; aspect-ratio:1/1; background:#fff; border-bottom:1px solid var(--as-linea,#E6E6E6); overflow:hidden; }
.vd-prod-foto img{ width:100%; height:100%; object-fit:contain; padding:10px; transition:transform .25s ease-out; }
.vd-prod:hover .vd-prod-foto img{ transform:scale(1.03); }
.vd-prod-foto .vd-badge{ position:absolute; top:10px; left:10px; }
.vd-prod-cuerpo{ display:flex; flex-direction:column; gap:6px; padding:12px 14px 14px; flex:1; }
.vd-prod-tit{ font-size:14px; font-weight:600; line-height:1.35; color:var(--as-tinta,#262626);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.7em; }
.vd-prod:hover .vd-prod-tit{ color:var(--as-enlace,#1A4FA0); }
.vd-prod-precio{ min-height:28px; display:flex; align-items:center; }
.vd-prod-emp{ margin-top:auto; padding-top:8px; border-top:1px solid var(--as-linea,#E6E6E6); font-size:12px; line-height:1.4; }
.vd-prod-emp b{ display:block; color:var(--as-enlace,#1A4FA0); font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-prod-emp span{ color:var(--as-tinta-2,#666); }
.vd-sinfoto{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; height:100%; color:var(--as-tinta-3,#767676); font-size:12px; background:var(--as-fondo-2,#F7F6F4); }
.vd-sinfoto .vd-ico{ width:34px; height:34px; stroke-width:1.3; }

/* Fila deslizable (carrusel): sin JS es una fila con scroll; con JS, flechas. */
.vd-fila{ position:relative; }
.vd-fila-pista{ display:grid; grid-auto-flow:column; grid-auto-columns:calc((100% - 5 * 14px) / 6); gap:14px;
  overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; padding:4px 2px 10px; scrollbar-width:thin; scrollbar-color:var(--as-borde,#BDBDBD) transparent; }
.vd-fila-pista::-webkit-scrollbar{ height:8px; }
.vd-fila-pista::-webkit-scrollbar-thumb{ background:var(--as-borde,#BDBDBD); border-radius:4px; }
.vd-fila-pista > *{ scroll-snap-align:start; }
/* Las flechas nunca tapan texto: a la altura de la FOTO (que es cuadrada y
 * va arriba) cuando no hay margen a los costados, y en el margen de la
 * página, fuera de las tarjetas, cuando la pantalla es ancha. */
.vd-fila-btn{ position:absolute; top:74px; width:44px; height:44px; border:0; border-radius:50%;
  background:var(--as-superficie,#fff); box-shadow:var(--as-sombra-2,0 8px 22px rgba(0,0,0,.14)); color:var(--as-enlace,#1A4FA0);
  display:none; align-items:center; justify-content:center; cursor:pointer; z-index:2; transition:transform .15s; }
.vd-fila-btn:hover{ transform:scale(1.06); }
.vd-fila-btn.izq{ left:-12px; } .vd-fila-btn.der{ right:-12px; }
.vd-fila.con-js .vd-fila-btn{ display:flex; }
.vd-fila.con-js .vd-fila-pista{ scrollbar-width:none; }
.vd-fila.con-js .vd-fila-pista::-webkit-scrollbar{ display:none; }
@media (min-width:1330px){ .vd-fila-btn{ top:calc(50% - 26px); } .vd-fila-btn.izq{ left:-58px; } .vd-fila-btn.der{ right:-58px; } }
@media (max-width:1100px){ .vd-fila-pista{ grid-auto-columns:calc((100% - 3 * 14px) / 4); } .vd-fila-btn{ top:112px; } }
@media (max-width:760px){ .vd-fila-pista{ grid-auto-columns:calc((100% - 14px) / 2.3); } .vd-fila-btn{ display:none!important; } }

/* ---- Paginación --------------------------------------------------------- */
.vd-pag{ display:flex; justify-content:center; flex-wrap:wrap; gap:6px; padding:24px 0 8px; }
.vd-pag a, .vd-pag span{ min-width:38px; height:38px; padding:0 12px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:var(--as-radio-sm,4px); background:var(--as-superficie,#fff); box-shadow:var(--as-sombra,0 1px 2px rgba(0,0,0,.12)); font-weight:600; }
.vd-pag a:hover{ color:var(--as-enlace,#1A4FA0); }
.vd-pag .act{ background:var(--as-accion,#1A4FA0); color:#fff; }

/* ---- Pie compartido: franja de confianza ---------------------------------- */
.vd-beneficios{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:32px; }
.vd-beneficio{ display:flex; gap:12px; align-items:flex-start; padding:16px; }
.vd-beneficio .vd-ico{ width:26px; height:26px; color:var(--as-marca,#1A4FA0); stroke-width:1.6; margin-top:1px; }
.vd-beneficio b{ display:block; font-size:14px; margin-bottom:2px; }
.vd-beneficio span{ font-size:13px; color:var(--as-tinta-2,#666); }
@media (max-width:900px){ .vd-beneficios{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){ .vd-beneficios{ grid-template-columns:1fr; } }

/* =====================================================================
 * PORTADA
 * ===================================================================== */
.vd-hero{ margin-top:16px; display:grid; grid-template-columns:minmax(0,11fr) minmax(0,9fr); overflow:hidden; }
.vd-hero-txt{ padding:40px 40px 36px; display:flex; flex-direction:column; justify-content:center; }
.vd-hero h1{ font-size:38px; font-weight:800; letter-spacing:-.02em; line-height:1.1; max-width:19ch; }
.vd-hero h1 em{ font-style:normal; color:var(--as-marca-hover,#133A78); }
.vd-hero-sub{ margin-top:12px; font-size:16px; color:var(--as-tinta-2,#666); max-width:48ch; }
.vd-buscar{ margin-top:22px; display:flex; gap:0; align-items:stretch; border:1px solid var(--as-borde,#BDBDBD); border-radius:var(--as-radio,6px); overflow:hidden; background:#fff; }
.vd-buscar:focus-within{ border-color:var(--as-enlace,#1A4FA0); box-shadow:0 0 0 2px rgba(26,79,160,.18); }
.vd-buscar input{ flex:1; min-width:0; border:0; padding:14px 16px; font:inherit; font-size:16px; color:var(--as-tinta,#262626); outline:none; }
.vd-buscar input::placeholder{ color:var(--as-tinta-3,#767676); }
.vd-buscar select{ border:0; border-left:1px solid var(--as-linea,#E6E6E6); padding:0 30px 0 12px; font:inherit; font-size:14px; background:var(--as-fondo-2,#F7F6F4); color:var(--as-tinta,#262626); cursor:pointer; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23262626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center; background-size:14px; outline:none; }
.vd-buscar button{ border:0; background:var(--as-accion,#1A4FA0); color:var(--as-sobre-accion,#fff); padding:0 22px; font-weight:700; font-size:15px; cursor:pointer; display:flex; align-items:center; gap:8px; transition:background-color .15s; }
.vd-buscar button:hover{ background:var(--as-accion-hover,#133A78); }
.vd-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.vd-chip{ display:inline-flex; align-items:center; padding:7px 13px; border-radius:999px; border:1px solid var(--as-linea,#E6E6E6); background:#fff; font-size:13px; font-weight:600; color:var(--as-tinta,#262626); transition:border-color .15s, background-color .15s; }
.vd-chip:hover{ border-color:var(--as-marca,#1A4FA0); background:var(--as-resalte,#FFF4C2); color:var(--as-sobre-resalte,#6A4A00); }
.vd-chip.mas{ color:var(--as-enlace,#1A4FA0); border-style:dashed; }

/* El mosaico vivo: seis productos reales de seis empresas; cada tanto una
 * celda cambia a otro producto (ver index.php). */
.vd-mosaico{ display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(2,1fr); gap:2px; background:var(--as-linea,#E6E6E6); border-left:1px solid var(--as-linea,#E6E6E6); min-height:380px; }
.vd-celda{ position:relative; display:block; background:#fff; overflow:hidden; min-height:170px; }
.vd-celda img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:14px 14px 40px; transition:opacity .6s ease-out, transform .6s ease-out; }
.vd-celda.saliendo img{ opacity:0; transform:scale(.96); }
.vd-celda-pie{ position:absolute; left:0; right:0; bottom:0; padding:8px 10px; font-size:11.5px; line-height:1.3; background:linear-gradient(to top, rgba(255,255,255,.98) 60%, rgba(255,255,255,0)); }
.vd-celda-pie b{ display:block; font-weight:700; color:var(--as-tinta,#262626); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-celda-pie span{ display:block; color:var(--as-tinta-2,#666); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-celda:hover .vd-celda-pie b{ color:var(--as-enlace,#1A4FA0); }

.vd-cifras{ display:flex; flex-wrap:wrap; gap:0 36px; padding:14px 4px 0; font-size:14px; color:var(--as-tinta-2,#666); }
.vd-cifras b{ font-size:20px; font-weight:800; color:var(--as-tinta,#262626); margin-right:6px; letter-spacing:-.01em; }

/* Categorías: foto arriba, nombre y cantidad abajo. */
.vd-cats{ display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:14px; }
.vd-cat{ display:flex; flex-direction:column; min-width:0; overflow:hidden; transition:box-shadow .18s ease-out, transform .18s ease-out; }
.vd-cat:hover{ box-shadow:var(--as-sombra-2,0 8px 22px rgba(0,0,0,.14)); transform:translateY(-2px); }
.vd-cat-foto{ aspect-ratio:4/3; background:var(--as-fondo-2,#F7F6F4); overflow:hidden; }
.vd-cat-foto img{ width:100%; height:100%; object-fit:cover; transition:transform .3s ease-out; }
.vd-cat:hover .vd-cat-foto img{ transform:scale(1.04); }
.vd-cat-txt{ padding:10px 12px 12px; }
.vd-cat-txt b{ display:block; font-size:14px; font-weight:700; line-height:1.3; overflow-wrap:anywhere; }
.vd-cat-txt span{ font-size:12px; color:var(--as-tinta-2,#666); }
@media (max-width:1000px){ .vd-cats{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:600px){ .vd-cats{ grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Empresas destacadas. minmax(0,…) y min-width:0 a propósito: los nombres van
 * en una línea sin cortar, y sin eso la grilla se estiraba más que la página. */
.vd-emps{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.vd-emp{ display:flex; gap:14px; padding:16px; align-items:center; min-width:0; transition:box-shadow .18s ease-out, transform .18s ease-out; position:relative; }
.vd-emp:hover{ box-shadow:var(--as-sombra-2,0 8px 22px rgba(0,0,0,.14)); transform:translateY(-2px); }
.vd-emp-logo{ width:64px; height:64px; flex:none; border-radius:var(--as-radio-sm,4px); border:1px solid var(--as-linea,#E6E6E6); background:#fff; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.vd-emp-logo img{ width:100%; height:100%; object-fit:contain; padding:4px; }
.vd-emp-logo .vd-ico{ width:26px; height:26px; color:var(--as-tinta-3,#767676); stroke-width:1.4; }
.vd-emp-txt{ min-width:0; }
.vd-emp-txt b{ display:block; font-size:14px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-emp-txt span{ display:block; font-size:12px; color:var(--as-tinta-2,#666); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-emp .vd-badge{ position:absolute; top:-8px; right:12px; }
.vd-emp.destacada{ grid-column:span 2; }
.vd-emp.destacada .vd-emp-logo{ width:84px; height:84px; }
@media (max-width:900px){ .vd-emps{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px){ .vd-emps{ grid-template-columns:minmax(0,1fr); } .vd-emp.destacada{ grid-column:auto; } }

/* Publicá tu empresa. */
.vd-publica{ margin-top:32px; display:grid; grid-template-columns:1fr auto; gap:24px; align-items:center; padding:28px 32px; background:var(--as-resalte,#FFF4C2); border-radius:var(--as-radio,6px); }
.vd-publica h2{ font-size:22px; font-weight:800; color:var(--as-sobre-resalte,#6A4A00); letter-spacing:-.01em; }
.vd-publica p{ margin-top:6px; font-size:15px; color:var(--as-sobre-resalte,#6A4A00); max-width:60ch; }
@media (max-width:700px){ .vd-publica{ grid-template-columns:1fr; padding:22px; } }

/* Invitación a registrarse (tras varias páginas vistas). */
.vd-invita{ position:fixed; inset:0; background:rgba(30,24,16,.55); z-index:10000; display:flex; align-items:center; justify-content:center; padding:20px; animation:vdAparece .25s ease-out; }
@keyframes vdAparece{ from{ opacity:0; } to{ opacity:1; } }
.vd-invita-caja{ position:relative; width:100%; max-width:440px; padding:30px 28px 24px; text-align:center; animation:vdSube .3s cubic-bezier(.2,.8,.2,1); }
@keyframes vdSube{ from{ transform:translateY(14px); opacity:0; } to{ transform:none; opacity:1; } }
.vd-invita-caja h2{ font-size:22px; font-weight:800; margin:6px 0 8px; }
.vd-invita-caja p{ font-size:15px; color:var(--as-tinta-2,#666); margin-bottom:18px; }
.vd-invita-caja .as-btn, .vd-invita-caja .as-btn-sec{ width:100%; margin-bottom:10px; }
.vd-invita-cerrar{ position:absolute; top:10px; right:10px; width:36px; height:36px; border:0; background:none; cursor:pointer; color:var(--as-tinta-2,#666); display:flex; align-items:center; justify-content:center; border-radius:50%; }
.vd-invita-cerrar:hover{ background:var(--as-fondo,#EEEDEA); }
.vd-invita-luego{ background:none; border:0; color:var(--as-tinta-2,#666); font-size:13px; text-decoration:underline; cursor:pointer; padding:4px; }

@media (max-width:900px){
  .vd-hero{ grid-template-columns:minmax(0,1fr); }
  .vd-hero-txt{ padding:26px 20px 22px; }
  .vd-hero h1{ font-size:28px; max-width:none; }
  .vd-mosaico{ border-left:0; border-top:1px solid var(--as-linea,#E6E6E6); min-height:0; }
  .vd-celda{ min-height:150px; }
  .vd-celda img{ padding:10px 10px 40px; }
  .vd-buscar select{ padding-left:8px; font-size:13px; }
  .vd-buscar button span{ display:none; }
  .vd-buscar button{ padding:0 16px; }
}
/* En el teléfono el mosaico pasa a 2×3: con tres columnas los nombres de
 * producto y empresa no se podían leer, y son la prueba de la portada. */
@media (max-width:760px){
  .vd-mosaico{ grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(3,1fr); }
  .vd-celda{ min-height:168px; }
  .vd-celda-pie{ font-size:13px; }
}

/* =====================================================================
 * RESULTADOS (productos.php)
 * ===================================================================== */
.vd-res-enc{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:10px 20px; margin:0 0 16px; }
.vd-res-enc h1{ font-size:24px; font-weight:800; letter-spacing:-.015em; }
.vd-res-enc .cant{ display:block; margin-top:2px; font-size:14px; color:var(--as-tinta-2,#666); font-weight:400; }
.vd-orden{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--as-tinta-2,#666); }
.vd-cuerpo{ display:grid; grid-template-columns:250px minmax(0,1fr); gap:24px; align-items:start; }
.vd-cuerpo > *{ min-width:0; }
.vd-cuerpo.sin-filtros{ grid-template-columns:minmax(0,1fr); }
.vd-filtros{ padding:6px 0 10px; }
.vd-filtros h2{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--as-tinta-2,#666); padding:14px 18px 6px; }
.vd-filtros a{ display:flex; justify-content:space-between; gap:8px; padding:7px 18px; font-size:14px; color:var(--as-tinta,#262626); }
.vd-filtros a:hover{ background:var(--as-fondo,#EEEDEA); }
.vd-filtros a.act{ color:var(--as-enlace,#1A4FA0); font-weight:700; }
.vd-filtros a .n{ color:var(--as-tinta-2,#666); font-size:13px; }
.vd-filtros .quitar{ color:var(--as-enlace,#1A4FA0); font-size:13px; font-weight:600; }
/* El botón «Filtrar» es del teléfono. Va con dos clases a propósito: la hoja
 * asociame.css se carga también después de ésta (la pide titulo.php) y su
 * .as-btn-sec{display:inline-flex} le ganaba a un .vd-filtrar-btn solo. */
.vd-orden .vd-filtrar-btn{ display:none; }
.vd-vacio{ padding:48px 24px; text-align:center; }
.vd-vacio h2{ font-size:20px; margin-bottom:8px; }
.vd-vacio p{ color:var(--as-tinta-2,#666); margin-bottom:18px; }
.vd-vacio .vd-chips{ justify-content:center; }
.vd-vacio .vd-ico{ width:44px; height:44px; color:var(--as-tinta-3,#767676); stroke-width:1.2; margin:0 auto 12px; }
.vd-subcats{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
@media (max-width:1100px){ .vd-grilla{ grid-template-columns:repeat(3,minmax(0,1fr)); } .vd-subcats{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px){
  .vd-cuerpo{ grid-template-columns:minmax(0,1fr); gap:14px; }
  .vd-orden .vd-filtrar-btn{ display:inline-flex; }
  .vd-filtros{ display:none; }
  .vd-filtros.abierto{ display:block; }
}
@media (max-width:700px){ .vd-grilla{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .vd-subcats{ grid-template-columns:repeat(2,minmax(0,1fr)); } .vd-prod-cuerpo{ padding:10px 10px 12px; } }

/* =====================================================================
 * FICHA (verproductos.php)
 * ===================================================================== */
.vd-admin{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; padding:10px 14px; font-size:13px; }
.vd-admin b{ margin-right:6px; color:var(--as-tinta-2,#666); font-weight:600; }
.vd-admin a, .vd-admin button{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:var(--as-radio-sm,4px); border:1px solid var(--as-linea,#E6E6E6); background:#fff; color:var(--as-tinta,#262626); cursor:pointer; font-size:13px; font-weight:600; }
.vd-admin a:hover, .vd-admin button:hover{ border-color:var(--as-accion,#1A4FA0); color:var(--as-accion,#1A4FA0); }
.vd-admin .peligro{ color:var(--as-error,#B3261E); }
.vd-admin .alerta{ color:var(--as-alerta,#8A5A00); }
.vd-admin form{ display:inline; }

.vd-ficha{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:0; overflow:hidden; }
.vd-ficha > *, .vd-galeria > *, .vd-abajo > *{ min-width:0; }
.vd-galeria{ display:grid; grid-template-columns:64px minmax(0,1fr); gap:14px; padding:24px 20px 24px 24px; align-items:start; }
.vd-thumbs{ display:flex; flex-direction:column; gap:8px; max-height:520px; overflow:auto; scrollbar-width:none; }
.vd-thumbs::-webkit-scrollbar{ display:none; }
.vd-thumb{ width:56px; height:56px; border:1px solid var(--as-linea,#E6E6E6); border-radius:var(--as-radio-sm,4px); background:#fff; padding:0; cursor:pointer; overflow:hidden; transition:border-color .15s; }
.vd-thumb img{ width:100%; height:100%; object-fit:contain; padding:3px; }
.vd-thumb:hover{ border-color:var(--as-tinta-3,#767676); }
.vd-thumb.act{ border:2px solid var(--as-accion,#1A4FA0); }
.vd-principal{ position:relative; height:520px; background:#fff; border-radius:var(--as-radio-sm,4px); overflow:hidden; cursor:zoom-in;
  background-repeat:no-repeat; background-size:0; }
/* La pista: todas las fotos en fila; se ve una por vez. */
.vd-pista{ display:flex; height:100%; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; transition:opacity .2s; }
.vd-pista::-webkit-scrollbar{ display:none; }
.vd-pista img{ flex:0 0 100%; width:100%; height:100%; object-fit:contain; scroll-snap-align:center; }
.vd-principal.zoom{ background-size:200%; }
.vd-principal.zoom .vd-pista{ opacity:0; }
.vd-principal-aviso{ position:absolute; left:50%; bottom:12px; transform:translateX(-50%); padding:5px 12px; border-radius:999px; background:rgba(38,38,38,.72); color:#fff; font-size:12px; pointer-events:none; white-space:nowrap; opacity:0; transition:opacity .2s; }
.vd-principal:hover .vd-principal-aviso{ opacity:1; }
.vd-principal-contar{ position:absolute; top:12px; right:12px; padding:4px 10px; border-radius:999px; background:rgba(38,38,38,.72); color:#fff; font-size:12px; pointer-events:none; }
.vd-puntos{ display:none; justify-content:center; gap:6px; padding:10px 0 2px; }
.vd-puntos i{ width:7px; height:7px; border-radius:50%; background:var(--as-borde,#BDBDBD); }
.vd-puntos i.act{ background:var(--as-accion,#1A4FA0); }

.vd-decide{ padding:28px 28px 28px 24px; border-left:1px solid var(--as-linea,#E6E6E6); }
.vd-decide-fija{ position:sticky; top:16px; }
.vd-decide h1{ font-size:22px; font-weight:600; line-height:1.25; letter-spacing:-.01em; }
.vd-estado{ margin-top:8px; font-size:13px; color:var(--as-tinta-2,#666); }
.vd-vende{ margin-top:6px; font-size:13px; color:var(--as-tinta-2,#666); line-height:1.5; }
.vd-vende a{ color:var(--as-enlace,#1A4FA0); font-weight:700; }
.vd-vende a:hover{ text-decoration:underline; }
.vd-precio-bloque{ margin:18px 0 6px; }
.vd-precio-bloque .vd-precio{ font-size:28px; }
.vd-precio-bloque .nota{ font-size:13px; color:var(--as-tinta-2,#666); margin-top:2px; }
.vd-precio-gate{ margin:18px 0 6px; padding:12px 14px; border-radius:var(--as-radio-sm,4px); background:var(--as-fondo,#EEEDEA); font-size:13px; color:var(--as-tinta-2,#666); }
.vd-precio-gate a{ color:var(--as-enlace,#1A4FA0); font-weight:700; }
.vd-precio-gate a:hover{ text-decoration:underline; }
.vd-acciones{ display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.vd-garantias{ margin-top:18px; display:flex; flex-direction:column; gap:9px; font-size:13px; color:var(--as-tinta-2,#666); }
.vd-garantias li{ display:flex; gap:9px; align-items:flex-start; }
.vd-garantias .vd-ico{ color:var(--as-ok,#1E7045); margin-top:1px; }
.vd-garantias b{ color:var(--as-tinta,#262626); font-weight:600; }
.vd-compartir{ margin-top:16px; font-size:13px; }
.vd-compartir a{ display:inline-flex; align-items:center; gap:6px; color:var(--as-enlace,#1A4FA0); font-weight:600; }
.vd-compartir a:hover{ text-decoration:underline; }
.vd-compartir .vd-denunciar{ color:var(--as-tinta-2,#666); }

.vd-oferta{ margin:0 0 16px; padding:14px 16px; border-radius:var(--as-radio-sm,4px); background:var(--as-resalte,#FFF4C2); color:var(--as-sobre-resalte,#6A4A00); }
.vd-oferta b{ display:block; font-size:13px; text-transform:uppercase; letter-spacing:.05em; }
.vd-oferta .vd-precio{ color:var(--as-sobre-resalte,#6A4A00); font-weight:700; font-size:24px; margin:4px 0 2px; }
.vd-oferta form{ margin-top:10px; }

.vd-abajo{ display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:16px; margin-top:16px; align-items:start; }
.vd-bloque{ padding:24px; }
.vd-bloque h2{ font-size:20px; font-weight:700; margin-bottom:14px; }
.vd-specs{ width:100%; border-collapse:collapse; font-size:14px; }
.vd-specs th, .vd-specs td{ padding:10px 14px; text-align:left; vertical-align:top; }
.vd-specs th{ width:38%; font-weight:600; color:var(--as-tinta-2,#666); }
.vd-specs tr:nth-child(odd) th, .vd-specs tr:nth-child(odd) td{ background:var(--as-fondo-2,#F7F6F4); }
.vd-specs tr:first-child th{ border-radius:4px 0 0 4px; }
.vd-desc{ font-size:15px; line-height:1.65; color:var(--as-tinta,#262626); }
.vd-desc .desc-html{ overflow-x:auto; }
.vd-desc img{ max-width:100%; height:auto; }
.vd-desc table{ max-width:100%; border-collapse:collapse; margin:10px 0; font-size:14px; }
.vd-desc td, .vd-desc th{ border:1px solid var(--as-linea,#E6E6E6); padding:6px 9px; vertical-align:top; }
.vd-desc th{ background:var(--as-fondo-2,#F7F6F4); text-align:left; }
.vd-desc iframe{ max-width:100%; margin:12px 0; border:0; }
.vd-desc font{ font-size:inherit!important; font-family:inherit!important; }
.vd-desc p{ margin:0 0 10px; }
.vd-desc a{ color:var(--as-enlace,#1A4FA0); }
.vd-desc a:not(.desc-yt){ overflow-wrap:anywhere; }
/* Un enlace de YouTube pegado en una descripción de texto: se ve como video. */
.vd-desc .desc-yt{ position:relative; display:block; max-width:480px; margin:12px 0; border-radius:var(--as-radio-sm,4px); overflow:hidden; background:#262626; }
.vd-desc .desc-yt img{ display:block; width:100%; max-width:none; aspect-ratio:16/9; object-fit:cover; transition:transform .3s, filter .3s; }
.vd-desc .desc-yt:hover img{ transform:scale(1.03); filter:brightness(.85); }
.vd-desc .desc-yt span{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); padding:8px 14px; border-radius:999px; background:rgba(38,38,38,.78); color:#fff; font-size:13px; font-weight:700; white-space:nowrap; }
.vd-desc *{ max-width:100%; box-sizing:border-box; }
.vd-video{ position:relative; display:block; aspect-ratio:16/9; border-radius:var(--as-radio-sm,4px); overflow:hidden; background:#262626; margin-top:14px; }
.vd-video img{ width:100%; height:100%; object-fit:cover; transition:transform .3s, filter .3s; }
.vd-video:hover img{ transform:scale(1.03); filter:brightness(.85); }
.vd-video .play{ position:absolute; top:50%; left:50%; width:68px; height:48px; transform:translate(-50%,-50%); }
.vd-video video{ width:100%; height:100%; }
.vd-empresa{ padding:22px 24px; }
.vd-empresa h2{ font-size:16px; font-weight:700; margin-bottom:12px; }
.vd-empresa-nombre{ display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.vd-empresa-nombre .vd-emp-logo{ width:52px; height:52px; }
.vd-empresa-nombre b{ display:block; font-size:15px; }
.vd-empresa-nombre span{ display:block; font-size:12.5px; color:var(--as-tinta-2,#666); }
.vd-empresa dl{ margin:0; font-size:13.5px; display:grid; grid-template-columns:auto 1fr; gap:6px 12px; }
.vd-empresa dt{ color:var(--as-tinta-2,#666); }
.vd-empresa dd{ margin:0; }
.vd-empresa .vd-acciones{ margin-top:16px; }

/* Barra fija al pie en celular: la acción principal siempre a mano. */
.vd-barra-pie{ display:none; }

@media (max-width:1000px){
  .vd-ficha{ grid-template-columns:minmax(0,1fr); }
  .vd-decide{ border-left:0; border-top:1px solid var(--as-linea,#E6E6E6); padding:20px; }
  .vd-decide-fija{ position:static; }
  .vd-abajo{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:700px){
  .vd-galeria{ grid-template-columns:minmax(0,1fr); gap:0; padding:0; }
  .vd-thumbs{ display:none; }
  .vd-principal{ height:auto; aspect-ratio:1/1; cursor:default; border-radius:0; }
  .vd-principal-aviso{ display:none; }
  .vd-puntos{ display:flex; }
  .vd-decide-fija{ padding-bottom:60px; }
  .vd-barra-pie{ display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50; gap:10px; align-items:center; padding:10px 14px; background:var(--as-superficie,#fff); box-shadow:0 -4px 16px rgba(0,0,0,.12); }
  .vd-barra-pie > div{ flex:1; min-width:0; font-size:13px; }
  .vd-barra-pie .vd-precio{ font-size:18px; }
  .vd-barra-pie .as-btn{ flex:none; white-space:nowrap; padding:12px 18px; }
  .vd-bloque{ padding:18px 16px; }
}

/* ---- Visor de fotos (modal; conserva el JavaScript de siempre) ------------ */
.vd-visor{ position:fixed; inset:0; z-index:9999; background:rgba(38,38,38,.92); display:none; align-items:center; justify-content:center; }
.vd-visor-caja{ width:min(1100px,96vw); max-height:96vh; display:flex; flex-direction:column; background:#fff; border-radius:var(--as-radio,6px); overflow:hidden; }
.vd-visor-enc{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--as-linea,#E6E6E6); }
.vd-visor-enc b{ font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vd-visor-cerrar{ width:38px; height:38px; border:0; border-radius:50%; background:var(--as-fondo,#EEEDEA); cursor:pointer; display:flex; align-items:center; justify-content:center; color:var(--as-tinta,#262626); }
.vd-visor-cerrar:hover{ background:var(--as-linea,#E6E6E6); }
.vd-visor-img{ position:relative; background:#fff; background-repeat:no-repeat; background-position:50% 50%; background-size:150%; cursor:zoom-in; }
.vd-visor-img img{ width:100%; height:60vh; object-fit:contain; }
.vd-visor-img.zoomeando{ cursor:zoom-out; }
.vd-visor-img.zoomeando img{ opacity:0; }
.vd-visor-flechas{ position:absolute; inset:0; display:flex; justify-content:space-between; align-items:center; padding:0 14px; pointer-events:none; }
.vd-visor-flechas button{ pointer-events:all; width:46px; height:46px; border:0; border-radius:50%; background:rgba(38,38,38,.6); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s, transform .15s; }
.vd-visor-flechas button:hover{ background:rgba(38,38,38,.85); transform:scale(1.06); }
.vd-visor-aviso{ position:absolute; left:50%; bottom:12px; transform:translateX(-50%); padding:5px 12px; border-radius:999px; background:rgba(38,38,38,.7); color:#fff; font-size:12px; pointer-events:none; white-space:nowrap; }
.vd-visor-img.zoomeando .vd-visor-aviso{ opacity:0; }
.vd-visor-tiras{ display:flex; gap:8px; padding:10px 14px; overflow-x:auto; border-top:1px solid var(--as-linea,#E6E6E6); }
.vd-visor-tiras .vd-thumb{ width:72px; height:72px; flex:none; }
