/* InFront Quick Browse — breadcrumb button + category product modal (see js/quickbrowse.js) */

/* ---------- Breadcrumb button ---------- */
.breadcrumb .breadcrumb__after {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ift-qb-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: 600 14px/1 inherit;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.ift-qb-trigger svg { flex: 0 0 auto; color: #5f9400; }
.ift-qb-trigger:hover,
.ift-qb-trigger:focus-visible {
  border-color: #8cd400;
  background: #f7fcec;
  box-shadow: 0 2px 8px rgba(95, 148, 0, .18);
  transform: translateY(-1px);
  outline: none;
}
@media (max-width: 575.98px) {
  .ift-qb-trigger { height: 40px; padding: 0 12px 0 10px; font-size: 13px; border-radius: 8px; }
}

/* ---------- Modal ---------- */
.ift-qb-open,
.ift-qb-open body { overflow: hidden !important; }

.ift-qb {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 3vw;
}
.ift-qb[hidden] { display: none; }
.ift-qb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .18s ease;
}
.ift-qb__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1280px, 100%);
  height: min(900px, 94vh);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(2, 6, 23, .5), 0 0 0 1px rgba(148, 163, 184, .25);
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}
.ift-qb.is-visible .ift-qb__backdrop { opacity: 1; }
.ift-qb.is-visible .ift-qb__panel { opacity: 1; transform: none; }

.ift-qb svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Title bar */
.ift-qb__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 20px;
  background: #0f172a;
  color: #e2e8f0;
}
.ift-qb__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -6px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
}
.ift-qb__back[hidden] { display: none; }
.ift-qb__back:hover { background: rgba(255, 255, 255, .2); }
.ift-qb__heading { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ift-qb__eyebrow {
  color: #8cd400;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ift-qb__title {
  margin: 2px 0 0;
  overflow: hidden;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ift-qb__open {
  color: #cbd5e1 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.ift-qb__open:hover { color: #8cd400 !important; }
.ift-qb__close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 600 13px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.ift-qb__close:hover { background: #dc2626; }

/* Toolbar */
.ift-qb__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 10px;
  border-bottom: 1px solid #eef1f4;
}
.ift-qb__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  margin: 0;
}
.ift-qb__search svg { position: absolute; left: 12px; color: #94a3b8; pointer-events: none; }
.ift-qb__search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
}
.ift-qb__search input:focus {
  border-color: #8cd400;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(140, 212, 0, .2);
  outline: none;
}
.ift-qb__sort {
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}
.ift-qb__stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #334155;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.ift-qb__stock input { width: 16px; height: 16px; accent-color: #5f9400; }

/* Sub-category chips */
.ift-qb__chips {
  display: flex;
  gap: 8px;
  padding: 10px 20px 12px;
  overflow-x: auto;
  border-bottom: 1px solid #eef1f4;
  scrollbar-width: thin;
}
.ift-qb__chips:empty { display: none; }
.ift-qb__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  background: #fff;
  color: #1f2937 !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
  transition: border-color .15s, background .15s;
}
.ift-qb__chip em {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475569;
  font-size: 11.5px;
  font-style: normal;
}
.ift-qb__chip:hover { border-color: #8cd400; background: #f7fcec; }
.ift-qb__chip.is-active { border-color: #0f172a; background: #0f172a; color: #fff !important; }
.ift-qb__chip.is-active em { background: rgba(255, 255, 255, .18); color: #fff; }
.ift-qb__chip--up { color: #475569 !important; }
.ift-qb__chip--up svg { width: 14px; height: 14px; }

/* Product grid */
.ift-qb__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 20px 24px;
  background: #f6f8fa;
  overscroll-behavior: contain;
  outline: none;
}
.ift-qb__count { margin: 0 0 12px; color: #475569; font-size: 13px; }
.ift-qb__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ift-qb__card {
  position: relative;
  border: 1px solid #e5e9ee;
  border-radius: 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ift-qb__card:hover {
  border-color: #8cd400;
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .35);
  transform: translateY(-2px);
}
.ift-qb__card.is-current { border: 2px solid #0f172a; }
.ift-qb__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  color: inherit !important;
  text-decoration: none !important;
}
.ift-qb__flag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.ift-qb__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
.ift-qb__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ift-qb__brand {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ift-qb__name {
  display: -webkit-box;
  margin: 3px 0 10px;
  overflow: hidden;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.ift-qb__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-top: auto;
}
.ift-qb__price { color: #0f172a; font-size: 16px; font-weight: 800; }
.ift-qb__regular { color: #94a3b8; font-size: 12.5px; }
.ift-qb__stock-badge {
  flex-basis: 100%;
  font-size: 12px;
  font-weight: 600;
}
.ift-qb__stock-badge::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
  background: currentColor;
}
.ift-qb__stock-badge.is-in { color: #3f7d00; }
.ift-qb__stock-badge.is-order { color: #b45309; }
.ift-qb__stock-badge.is-out { color: #b91c1c; }
.ift-qb__empty {
  grid-column: 1 / -1;
  padding: 40px 0;
  color: #475569;
  text-align: center;
}

/* Loading skeleton */
.ift-qb__card--skeleton { height: 300px; padding: 12px; }
.ift-qb__card--skeleton span {
  display: block;
  margin-bottom: 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef1f4 0%, #f8fafc 50%, #eef1f4 100%);
  background-size: 200% 100%;
  animation: ift-qb-shimmer 1.2s infinite linear;
}
.ift-qb__card--skeleton span:nth-child(1) { height: 170px; }
.ift-qb__card--skeleton span:nth-child(2) { height: 14px; width: 80%; }
.ift-qb__card--skeleton span:nth-child(3) { height: 14px; width: 45%; }
.ift-qb__card--skeleton:hover { transform: none; box-shadow: none; border-color: #e5e9ee; }
@keyframes ift-qb-shimmer { to { background-position: -200% 0; } }

/* Mobile: full-screen sheet */
@media (max-width: 767.98px) {
  .ift-qb { padding: 0; }
  .ift-qb__panel { width: 100%; height: 100%; border-radius: 0; }
  .ift-qb__bar { padding: 10px 10px 10px 14px; }
  .ift-qb__title { font-size: 16px; }
  .ift-qb__open { display: none; }
  .ift-qb__close span { display: none; }
  .ift-qb__close { padding: 0 9px; }
  .ift-qb__tools { padding: 10px 12px 8px; gap: 8px; }
  .ift-qb__search { flex-basis: 100%; }
  .ift-qb__sort { flex: 1 1 auto; }
  .ift-qb__chips { padding: 8px 12px 10px; }
  .ift-qb__body { padding: 12px 12px 24px; }
  .ift-qb__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ift-qb__link { padding: 10px; }
  .ift-qb__name { font-size: 13px; }
  .ift-qb__price { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .ift-qb__backdrop, .ift-qb__panel, .ift-qb__card, .ift-qb-trigger { transition: none; }
  .ift-qb__card--skeleton span { animation: none; }
}
