/* Functional storefront features layered onto the existing Tectronis design. */

.yith-wcwl-add-to-wishlist-button,
.yith-wcwl-add-button,
a.compare.button,
a.compare.added {
  display: none !important;
}

.header-action__badge[hidden],
.mobile-bottom-nav__badge[hidden] {
  display: none !important;
}

.header-action > .header-action__badge {
  top: 4px;
  right: 7px;
}

.mobile-bottom-nav > a > .mobile-bottom-nav__badge {
  top: 2px;
  right: calc(50% - 22px);
}

.t-product-saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .7rem;
}

.t-save-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid var(--store-line);
  border-radius: .65rem;
  padding: .55rem .75rem;
  background: #fff;
  color: var(--store-navy);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}

.t-save-action:hover,
.t-save-action:focus-visible,
.t-save-action.is-active {
  border-color: var(--store-blue);
  background: #eef7fd;
  color: var(--store-blue);
}

.t-save-action--remove {
  min-height: 34px;
  margin-top: .65rem;
  padding: .4rem .6rem;
  color: var(--store-danger);
}

.t-saved-list {
  min-height: 260px;
}

.t-saved-loading,
.t-saved-error {
  padding: 2rem;
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  background: #fff;
  color: var(--store-muted);
  text-align: center;
}

.t-saved-empty {
  display: grid;
  max-width: 680px;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: .7rem;
  margin: 0 auto;
  border: 1px solid var(--store-line);
  border-radius: calc(var(--store-radius) * 1.25);
  padding: 2rem;
  background: linear-gradient(145deg, #fff, var(--store-surface));
  text-align: center;
}

.t-saved-empty__icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: var(--store-soft);
  color: var(--store-blue);
  font-size: 2rem;
}

.t-saved-empty h2,
.t-saved-empty p {
  margin: 0;
}

.t-saved-empty p {
  max-width: 480px;
  color: var(--store-muted);
}

.t-wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.t-wishlist-card {
  overflow: hidden;
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(11,31,54,.06);
}

.t-wishlist-card__image {
  display: grid;
  aspect-ratio: 4/3;
  place-items: center;
  padding: 1rem;
  background: var(--store-surface);
}

.t-wishlist-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.t-wishlist-card__body {
  padding: 1rem;
}

.t-wishlist-card__brand,
.t-live-search__brand {
  color: var(--store-blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.t-wishlist-card h2 {
  margin: .35rem 0;
  font-size: 1rem;
  line-height: 1.35;
}

.t-wishlist-card h2 a {
  color: var(--store-navy);
  text-decoration: none;
}

.t-wishlist-card__model,
.t-live-search__model {
  color: var(--store-muted);
  font-size: .78rem;
}

.t-wishlist-card__price {
  margin-top: .75rem;
  color: var(--store-navy);
  font-weight: 800;
}

.t-stock {
  margin-top: .35rem;
  font-size: .75rem;
  font-weight: 700;
}

.t-stock.is-in-stock { color: var(--store-success); }
.t-stock.is-out-of-stock { color: var(--store-danger); }

.t-compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: 0 8px 28px rgba(11,31,54,.06);
  scrollbar-gutter: stable;
}

.t-compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.t-compare-table th,
.t-compare-table td {
  min-width: 190px;
  border-right: 1px solid var(--store-line);
  border-bottom: 1px solid var(--store-line);
  padding: .85rem;
  text-align: left;
  vertical-align: top;
}

.t-compare-table th:first-child {
  position: sticky;
  z-index: 2;
  left: 0;
  width: 175px;
  min-width: 175px;
  background: var(--store-surface);
  color: var(--store-navy);
}

.t-compare-table thead th {
  background: #fff;
}

.t-compare-table tr:last-child th,
.t-compare-table tr:last-child td {
  border-bottom: 0;
}

.t-compare-product {
  display: grid;
  gap: .5rem;
  color: var(--store-navy);
  font-size: .85rem;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.t-compare-product img {
  width: 100%;
  height: 130px;
  object-fit: contain;
}

.t-live-search {
  overflow: visible;
}

.t-live-search__dropdown {
  position: absolute;
  z-index: 250;
  top: calc(100% + .45rem);
  right: 0;
  left: 0;
  max-height: min(520px, 70vh);
  overflow-y: auto;
  border: 1px solid var(--store-line);
  border-radius: var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow);
}

.t-live-search__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid var(--store-line);
  padding: .7rem;
  color: var(--store-navy);
  text-decoration: none;
}

.t-live-search__item:last-child {
  border-bottom: 0;
}

.t-live-search__item:hover,
.t-live-search__item:focus,
.t-live-search__item[aria-selected="true"] {
  outline: 0;
  background: var(--store-surface);
}

.t-live-search__image {
  display: grid;
  width: 64px;
  height: 58px;
  place-items: center;
  border-radius: .45rem;
  background: var(--store-surface);
}

.t-live-search__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.t-live-search__content,
.t-live-search__commerce {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.t-live-search__content strong {
  overflow: hidden;
  font-size: .84rem;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.t-live-search__commerce {
  justify-items: end;
  text-align: right;
  white-space: nowrap;
}

.t-live-search__price {
  font-size: .82rem;
  font-weight: 800;
}

.t-live-search__loading,
.t-live-search__empty {
  padding: 1.1rem;
  color: var(--store-muted);
  font-size: .84rem;
  text-align: center;
}

@media (max-width: 900px) {
  .t-wishlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .t-live-search__dropdown {
    position: fixed;
    top: 108px;
    right: .75rem;
    left: .75rem;
    max-height: calc(100vh - 190px);
  }
}

@media (max-width: 600px) {
  .t-wishlist-grid {
    grid-template-columns: 1fr;
  }

  .t-saved-empty {
    min-height: 250px;
    padding: 1.25rem;
  }

  .t-product-saved-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .t-compare-table {
    min-width: 640px;
  }

  .t-compare-table th:first-child {
    width: 130px;
    min-width: 130px;
  }

  .t-compare-table th,
  .t-compare-table td {
    min-width: 170px;
    padding: .65rem;
  }

  .t-live-search__item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .t-live-search__image {
    width: 52px;
    height: 50px;
  }

  .t-live-search__commerce {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}
