/**
 * Phone breadcrumb (layout-both-columns.tpl). One row: "‹ Parent" back link, ▾ for the path sheet
 * (ift-crumb-sheet.js), and Quick browse / Browse similar on the right.
 * The page title below names the current page, so the current crumb is hidden here.
 * Overrides the older phone rules in theme.css, custom.css and quickbrowse.css.
 */

.breadcrumb__tree-btn,
.ift-crumb-sheet {
  display: none;
}
/* theme.css fade-in can be left painted half-way, leaving the breadcrumb washed out */
#wrapper nav.breadcrumb.breadcrumb--modern {
  animation: none;
}

@media (max-width: 575.98px) {

#wrapper nav.breadcrumb.breadcrumb--modern {
  margin-bottom: 8px;
  padding: 2px 0 !important;
  background: #fff !important;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: none;
  animation: none;
}
#wrapper nav.breadcrumb--modern .row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
#wrapper nav.breadcrumb--modern .row > .col {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
#wrapper nav.breadcrumb--modern .breadcrumb__list {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

/* Only the parent crumb stays visible */
#wrapper nav.breadcrumb--modern .breadcrumb__list .breadcrumb__item {
  display: none !important;
}
#wrapper nav.breadcrumb--modern .breadcrumb__list .breadcrumb__item:nth-last-child(2) {
  display: flex !important;
  min-width: 0;
  max-width: 100%;
}
#wrapper nav.breadcrumb--modern .breadcrumb__list .breadcrumb__item::before,
#wrapper nav.breadcrumb--modern .breadcrumb__list .breadcrumb__item::after {
  content: none !important;
}
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__sep,
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__home-icon {
  display: none !important;
}

#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link,
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link:hover,
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link:focus-visible {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 0 4px 0 2px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2;
  background: none !important;
  border-radius: 6px;
  box-shadow: none !important;
  transform: none !important;
  transition: none;
}
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link:focus-visible {
  outline: 2px solid #8cd400;
  outline-offset: 1px;
}
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link:active {
  color: #5f9400 !important;
}
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-bottom: 2px solid #64748b;
  border-left: 2px solid #64748b;
  transform: rotate(45deg);
}
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__label,
#wrapper nav.breadcrumb--modern .breadcrumb__item .breadcrumb__link:hover .breadcrumb__label {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
}

/* ▾ opens the path sheet */
#wrapper nav.breadcrumb--modern .breadcrumb__tree-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
}
#wrapper nav.breadcrumb--modern .breadcrumb__tree-btn:active {
  background: #f1f5f9;
}
#wrapper nav.breadcrumb--modern .breadcrumb__tree-btn:focus-visible {
  outline: 2px solid #8cd400;
  outline-offset: 1px;
}

/* Right side: Quick browse / Browse similar only (prev/next product arrows stay hidden on phones) */
#wrapper nav.breadcrumb--modern .breadcrumb__after {
  display: none !important;
}
#wrapper nav.breadcrumb--modern .breadcrumb__after:has(.ift-qb-trigger) {
  display: flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}
#wrapper nav.breadcrumb--modern .breadcrumb__after #iqitproductsnav {
  display: none !important;
}
#wrapper nav.breadcrumb--modern .ift-qb-trigger {
  gap: 6px;
  width: auto;
  height: 36px;
  min-height: 0;
  padding: 0 11px 0 9px;
  font-size: 13px;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}
#wrapper nav.breadcrumb--modern .ift-qb-trigger svg {
  width: 16px;
  height: 16px;
}
#wrapper nav.breadcrumb--modern .ift-qb-trigger__label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

/* —— Path sheet —— */
.ift-crumb-sheet-open,
.ift-crumb-sheet-open body {
  overflow: hidden !important;
}
.ift-crumb-sheet {
  position: fixed;
  inset: 0;
  z-index: 100070;
  display: flex;
  align-items: flex-end;
}
.ift-crumb-sheet[hidden] {
  display: none;
}
.ift-crumb-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .45);
}
.ift-crumb-sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 82vh;
  max-height: 82dvh;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ift-crumb-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 16px;
  border-bottom: 1px solid #e5e7eb;
}
.ift-crumb-sheet__title {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.ift-crumb-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #334155;
  background: none;
  border: 0;
  border-radius: 8px;
}
.ift-crumb-sheet__close:active {
  background: #f1f5f9;
}
.ift-crumb-sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0 12px;
}

/* Path as an indented tree */
.ift-crumb-sheet__path {
  margin: 0;
  padding: 0 0 6px;
  list-style: none;
}
.ift-crumb-sheet__level {
  position: relative;
}
.ift-crumb-sheet__level > .ift-crumb-sheet__link,
.ift-crumb-sheet__level--current {
  padding-left: calc(16px + var(--lvl, 0) * 18px);
}
.ift-crumb-sheet__level + .ift-crumb-sheet__level::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(20px + (var(--lvl, 1) - 1) * 18px);
  width: 9px;
  height: 22px;
  border-bottom: 1.5px solid #cbd5e1;
  border-left: 1.5px solid #cbd5e1;
  border-bottom-left-radius: 4px;
}
.ift-crumb-sheet__level--current {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-top: 8px;
  padding-right: 16px;
  padding-bottom: 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.ift-crumb-sheet__level--current .ift-crumb-sheet__name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ift-crumb-sheet__level--current::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: #8cd400;
}

.ift-crumb-sheet__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 16px;
  color: #0f172a !important;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}
.ift-crumb-sheet__link:hover,
.ift-crumb-sheet__link:focus {
  text-decoration: none;
}
.ift-crumb-sheet__path .ift-crumb-sheet__link {
  color: #334155 !important;
}
.ift-crumb-sheet__link:active {
  background: #f1f5f9;
}
.ift-crumb-sheet__name {
  flex: 1 1 auto;
  min-width: 0;
}
.ift-crumb-sheet__count {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

/* Inside / Also in lists */
.ift-crumb-sheet__section {
  border-top: 1px solid #e5e7eb;
  padding-top: 6px;
}
.ift-crumb-sheet__heading {
  margin: 6px 16px 2px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.ift-crumb-sheet__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ift-crumb-sheet__list .ift-crumb-sheet__link::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-top: 2px solid #94a3b8;
  border-right: 2px solid #94a3b8;
  transform: rotate(45deg);
}

.ift-crumb-sheet__loading {
  border-top: 1px solid #e5e7eb;
  padding: 14px 16px 4px;
}
.ift-crumb-sheet__loading span {
  display: block;
  height: 14px;
  margin-bottom: 18px;
  background: #f1f5f9;
  border-radius: 4px;
}
.ift-crumb-sheet__loading span:nth-child(2) {
  width: 70%;
}
.ift-crumb-sheet__loading span:nth-child(3) {
  width: 55%;
}

}
