/* ═══════════════════════════════════════════════════════════════════
   E Care Medical Supplies — Shared component · /assets/css/ecare-item-number.css
   BUILD v2026.10.02-b002
   The "ITEM #8" pill on product photos, its tip, and the
   "Order by number — like a menu" banner. Everything is scoped to
   .ec-itemnum* / .ec-obn* so it can't change anything else on a page,
   and the old .ecare-cat-pill rules can't change it.
   ═══════════════════════════════════════════════════════════════════ */

/* The pill: bottom-right of the photo (b002 — was bottom-left). */
.ec-itemnum-wrap {
  position: absolute; right: 10px; bottom: 10px; z-index: 5;
  font-family: inherit; line-height: 1;
}
.ec-itemnum {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; margin: 0; padding: 6px 14px 6px 7px;
  border: 3px solid #fff; border-radius: 999px;
  background: #0b3a6a; color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ec-itemnum:hover { background: #082e55; }
.ec-itemnum:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.ec-itemnum__icon, .ec-obn__pill .ec-itemnum__icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: #fff; color: #0b3a6a;
  display: inline-flex; align-items: center; justify-content: center;
}
.ec-itemnum__txt { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ec-itemnum__lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.1; }
.ec-itemnum__n   { font-size: 22px; font-weight: 800; line-height: 1; }

/* The tip: above the pill. Your navy, not black — easy on older eyes. */
.ec-itemnum__tip {
  position: absolute; right: 0; bottom: calc(100% + 10px);   /* opens from the right edge, over the photo */
  width: max-content; max-width: min(270px, 78vw);
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; border-radius: 12px;
  background: #082e55; color: #fff;
  font-size: 15.5px; line-height: 1.4; font-weight: 500;
  box-shadow: 0 8px 22px rgba(8, 46, 85, .35);
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}
.ec-itemnum__tip::after {   /* the little arrow down to the pill */
  content: ""; position: absolute; right: 26px; top: 100%;
  border: 8px solid transparent; border-top-color: #082e55;
}
.ec-itemnum__call {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 0 14px; border-radius: 999px; align-self: flex-end;
  background: #fff; color: #0b3a6a !important; font-weight: 800; font-size: 16px;
  text-decoration: none !important;
}
.ec-itemnum__call:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.ec-itemnum__ask { font-size: 15.5px; text-align: right; }

/* Open: tapped (phones), keyboard focus, or hover with a mouse.
   (keyboard focus only — a tapped button can keep focus on some phones, which
   would stop a second tap from closing the tip) */
.ec-itemnum-wrap.is-open .ec-itemnum__tip,
.ec-itemnum:focus-visible + .ec-itemnum__tip,
.ec-itemnum__tip:focus-within {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .ec-itemnum-wrap:hover .ec-itemnum__tip { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
}
/* Escape closes the tip and keeps it closed while the pill still has focus */
.ec-itemnum-wrap.is-hushed .ec-itemnum__tip { visibility: hidden; opacity: 0; pointer-events: none; }

@media (max-width: 480px) {
  .ec-itemnum { min-height: 46px; padding: 5px 12px 5px 6px; gap: 7px; }
  .ec-itemnum__icon { width: 27px; height: 27px; }
  .ec-itemnum__n { font-size: 20px; }
}

/* The banner: once above the cards. */
.ec-obn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  margin: 14px 8px 18px; padding: 16px 20px; border-radius: 16px;
  background: #0b3a6a; color: #fff; font-family: inherit;
}
.ec-obn__pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 7px; border-radius: 999px; background: #fff; color: #0b3a6a;
}
.ec-obn__pill .ec-itemnum__icon { background: #0b3a6a; color: #fff; }
.ec-obn__text { flex: 999 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ec-obn__text strong { font-size: 20px; font-weight: 800; line-height: 1.2; }
.ec-obn__text span { font-size: 16px; line-height: 1.45; color: #dbe6f3; }
.ec-obn__call {
  flex: 1 1 190px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: #fff; color: #0b3a6a !important; font-weight: 800; font-size: 17px;
  text-decoration: none !important; white-space: nowrap;
}
.ec-obn__call:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ec-itemnum__tip { transition: none; transform: none; }
}
@media print {   /* a printed page keeps the number, not the tip or the banner's button */
  .ec-itemnum__tip, .ec-obn__call { display: none !important; }
  .ec-itemnum { box-shadow: none; }
}
/* ═══ END · ecare-item-number.css · BUILD v2026.10.02-b002 ═══ */
