/* botones.css — el botón universal (.bt) con los estilos que eligió Tom (mi recomendación, aceptada). La clase del
   <body> los fija: bp-n1 el botón principal (Nuevo 1, caja petróleo), bs-4 el segundo (contorno), bw-w1 los de WhatsApp
   (con el número) y bf-f2 el flotante (se abre). Además: 1 (texto con flecha) para los enlaces y 7 (claro sobre foto)
   para los dos botones del héroe D. */

.bt {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r1);
  font: 600 13px/1.1 var(--f-texto); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--tinta); background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .4s var(--facil), background-color .4s var(--facil), border-color .4s var(--facil);
}
.bt-fondo, .bt-sub { display: none; }
.bt-txts { position: relative; z-index: 1; display: grid; gap: 4px; text-align: left; }
.bt-caja { position: relative; z-index: 1; display: inline-grid; place-items: center; flex: none; transition: background-color .4s var(--facil), color .4s var(--facil); }
.bt-caja .ico { transition: transform .45s var(--facil); }
.bt:active { transform: translateY(1px); }
.bt:focus-visible { outline: 2px solid var(--petroleo); outline-offset: 3px; border-radius: var(--r1); }
.botones .bt { flex: none; }

/* ---------- 1 · texto con flecha: los enlaces (Consultar, Ver todo el inventario…) ---------- */
.rol-enlace { min-height: 44px; padding: 0 2px; overflow: visible; letter-spacing: .24em; gap: 14px; border: 0; background: none; }
.rol-enlace .bt-txt {
  padding-block: 4px; background: linear-gradient(currentColor, currentColor) left bottom / 0% 1.5px no-repeat; transition: background-size .5s var(--facil);
}
.rol-enlace:focus-visible { border-radius: 6px; }

/* ---------- 4 · contorno: el segundo botón ---------- */
.bs-4 .rol-secundario { border-color: var(--tinta); color: var(--tinta); }

/* ---------- 7 · claro sobre foto (y su segundo botón, de borde blanco): el héroe D ---------- */
.rol-foto { background: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .55); color: var(--tinta); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); }
.rol-foto-sec { border-color: rgba(255, 255, 255, .85); color: var(--papel); }
.rol-foto:focus-visible, .rol-foto-sec:focus-visible { outline-color: var(--papel); }

/* ---------- Nuevo 1 · caja petróleo: la flecha en una cajita con espacio alrededor; el petróleo llena el botón ---------- */
.bp-n1 .rol-principal { background: var(--tinta); color: var(--papel); padding: 6px 6px 6px 22px; gap: 18px; }
.bp-n1 .rol-principal .bt-caja { width: 38px; height: 38px; border-radius: var(--r1); background: var(--petroleo); color: var(--papel); }
.bp-n1 .rol-principal .bt-fondo {
  display: block; position: absolute; inset: 0; z-index: 0; background: var(--petroleo);
  clip-path: inset(6px 6px 6px calc(100% - 44px) round var(--r1)); transition: clip-path .5s var(--suave);
}

/* ---------- WhatsApp 1 · con el número: cajita petróleo con el ícono, las palabras y el número ---------- */
.bw-w1 .rol-wa { background: var(--tinta); color: var(--papel); padding: 6px 24px 6px 6px; gap: 16px; min-height: 56px; }
.bw-w1 .rol-wa .bt-caja { order: -1; width: 44px; height: 44px; border-radius: var(--r1); background: var(--petroleo); }
.bw-w1 .rol-wa .bt-caja .ico { width: 20px; height: 20px; }
.bw-w1 .rol-wa .bt-sub { display: block; font: 400 13px/1.2 var(--f-texto); letter-spacing: .06em; text-transform: none; opacity: .86; }
.bw-w1 .rol-wa .bt-fondo {
  display: block; position: absolute; inset: 0; z-index: 0; background: var(--petroleo);
  clip-path: inset(6px calc(100% - 50px) 6px 6px round var(--r1)); transition: clip-path .5s var(--suave);
}

/* ---------- al pasar el mouse (solo con mouse: en un celular no se queda pegado) ---------- */
@media (hover: hover) and (pointer: fine) {
  .rol-enlace:hover .bt-txt { background-size: 100% 1.5px; }
  .rol-enlace:hover .bt-caja .ico { transform: translateX(4px); }
  .bs-4 .rol-secundario:hover { background: var(--tinta); color: var(--papel); }
  .bs-4 .rol-secundario:hover .bt-caja .ico { transform: translateX(3px); }
  .rol-foto:hover { background: var(--papel); }
  .rol-foto:hover .bt-caja .ico, .rol-foto-sec:hover .bt-caja .ico { transform: translateX(3px); }
  .rol-foto-sec:hover { background: var(--papel); color: var(--tinta); border-color: var(--papel); }
  .bp-n1 .rol-principal:hover .bt-fondo { clip-path: inset(0 0 0 0 round var(--r1)); transition-duration: .8s; }
  .bp-n1 .rol-principal:hover .bt-caja .ico { transform: translateX(3px); }
  .bw-w1 .rol-wa:hover .bt-fondo { clip-path: inset(0 0 0 0 round var(--r1)); transition-duration: .8s; }
  .bw-w1 .rol-wa:hover .bt-caja .ico { transform: scale(1.08); }
}

/* ---------- el botón de WhatsApp fijo abajo a la derecha: Flotante 2, se abre al pasar el mouse ---------- */
.wa-flot {
  position: fixed; z-index: 60; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px);
  display: inline-flex; align-items: center; text-decoration: none; color: var(--papel); background: var(--tinta);
  box-shadow: 0 12px 30px rgba(14, 14, 16, .22); -webkit-tap-highlight-color: transparent;
  transition: background-color .35s var(--facil), max-width .55s var(--suave), box-shadow .35s var(--facil);
}
.wa-flot-ico { display: grid; place-items: center; flex: none; width: 58px; height: 58px; }
.wa-flot-txt { display: grid; gap: 3px; white-space: nowrap; font: 600 13px/1.1 var(--f-texto); letter-spacing: .14em; text-transform: uppercase; }
.wa-flot:focus-visible { outline: 2px solid var(--petroleo); outline-offset: 3px; }
.wa-flot:active { transform: translateY(1px); }
.bf-f2 .wa-flot { border-radius: var(--r2); max-width: 58px; overflow: hidden; }
.bf-f2 .wa-flot-txt { padding-right: 22px; }
.bf-f2 .wa-flot:focus-visible { max-width: 360px; }
@media (hover: hover) and (pointer: fine) { .bf-f2 .wa-flot:hover { max-width: 360px; background: var(--tinta); } }
