/* Search dropdown + favorites state — idle geometry unchanged */

/* Live-parity full-page search overlay (?search=) */
body.is-search-overlay-open {
  overflow: hidden;
}

.site-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  box-sizing: border-box;
  overflow: auto;
  background: #fff;
  padding: 120px 0 50px;
}

.site-search-overlay[hidden] {
  display: none !important;
}

.site-search-overlay__inner {
  box-sizing: border-box;
  width: 760px;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding-left: 0;
}

.site-search-overlay__form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-bottom: 1px solid #e4e7eb;
  padding-bottom: 8px;
}

.site-search-overlay__submit {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.site-search-overlay__submit img {
  width: 18px;
  height: 18px;
  display: block;
  margin: 0 auto;
  filter: none;
}

.site-search-overlay__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font-size: 18px;
  line-height: 1.3;
  color: #050611;
  background: transparent;
}

.site-search-overlay__clear,
.site-search-overlay__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #8a8f98;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.site-search-overlay__clear[hidden] {
  display: none !important;
}

.site-search-overlay__close {
  font-size: 28px;
  color: #c5c8ce;
}

.site-search-overlay__count {
  margin: 30px 0;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(5, 6, 17, 0.5);
}

.site-search-overlay__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 20px;
}

.site-search-overlay__card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 72px;
  text-decoration: none;
  color: inherit;
}

.site-search-overlay__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  background: #f5f6f8 center / contain no-repeat;
}

.site-search-overlay__thumb--empty {
  background-color: #f0f1f3;
}

.site-search-overlay__text {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.site-search-overlay__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: #050611;
}

.site-search-overlay__desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #8a8f98;
}

.site-search-overlay__loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.site-search-overlay__loadmore-wrap[hidden] {
  display: none !important;
}

.site-search-overlay__loadmore {
  min-width: 154px;
  height: 45px;
  padding: 0 30px;
  border: 0;
  background: #000;
  color: #fff;
  font-size: 14px;
  line-height: 45px;
  cursor: pointer;
}

.site-search-overlay__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.site-search-overlay__pages[hidden] {
  display: none !important;
}

.site-search-overlay__page,
.site-search-overlay__page-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #050611;
  font-size: 14px;
  cursor: pointer;
}

.site-search-overlay__page.is-active {
  background: #e8e9ec;
}

.site-search-overlay__page-next {
  border-radius: 0;
  color: #050611;
}

@media (max-width: 900px) {
  .site-search-overlay {
    /* Align under Live mobile header (~80@390) */
    padding: calc(96 * 100vw / 390) calc(16 * 100vw / 390) 40px;
  }

  .site-search-overlay__inner {
    width: 100%;
    max-width: 100%;
  }

  .site-search-overlay__grid {
    grid-template-columns: 1fr;
  }

  .site-search-overlay__input {
    font-size: 16px;
  }
}

.header-search__option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  color: #050611;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.header-search__option.is-active,
.header-search__option:hover,
.header-search__option:focus-visible {
  background: #f7f8fa;
  outline: none;
}

.header-search__option-title {
  font-size: 13px;
  line-height: 1.3;
}

.header-search__option-meta {
  font-size: 11px;
  color: #8a8f98;
}

.header-search__status {
  padding: 12px;
  font-size: 13px;
  color: #505156;
}

.header-search__status--error {
  color: #d93434;
}

[data-favorite-product].is-favorite {
  color: #d93434;
}

.sku-add.is-favorite {
  /* Keep square SVG; dim slightly when already favorited */
  opacity: 0.55;
  filter: grayscale(0.15);
}

.favorites-page {
  padding: calc(40 * var(--w)) 0 calc(64 * var(--w));
}

.favorites-page__title {
  margin: 0 0 calc(24 * var(--w));
  font-size: calc(30 * var(--w));
  font-weight: 600;
  color: #050611;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(20 * var(--w));
}

.favorites-empty {
  color: #505156;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f8f8f8;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__title {
  display: block;
  font-size: calc(15 * var(--w));
  color: #050611;
}

.product-card__sku {
  display: block;
  font-size: 12px;
  color: #8a8f98;
}

.product-card__fav {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: #fff;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

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

@media (max-width: 560px) {
  .favorites-page {
    padding: calc(24 * 100vw / 320) 0 calc(40 * 100vw / 320);
  }

  .favorites-page__title {
    font-size: calc(28 * 100vw / 320);
    margin-bottom: calc(20 * 100vw / 320);
  }

  .favorites-grid {
    grid-template-columns: 1fr;
    gap: calc(16 * 100vw / 320);
  }
}

/* —— Favorites drawer (Live t706 cart) —— */
.fav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}

.fav-drawer[hidden] {
  display: none !important;
}

.fav-drawer.is-open {
  pointer-events: auto;
}

.fav-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.fav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  height: 100%;
  overflow: auto;
  padding: 40px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  -webkit-overflow-scrolling: touch;
}

.fav-drawer.is-open .fav-drawer__panel {
  transform: translateX(0);
}

.fav-drawer__close {
  position: fixed;
  z-index: 10051;
  top: 10px;
  left: 10px;
  width: 43px;
  height: 43px;
  border: 0;
  padding: 0;
  background: #d93434;
  color: #fff;
  font-size: 28px;
  line-height: 43px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.fav-drawer.is-open .fav-drawer__close {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1199px) {
  .fav-drawer__close {
    left: auto;
    right: 570px;
  }
}

html.is-fav-drawer-open,
html.is-fav-drawer-open body {
  overflow: hidden;
}

.fav-drawer__title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  color: #050611;
}

.fav-drawer__top {
  padding: 20px 0;
}

.fav-drawer__products {
  margin-bottom: 28px;
}

.fav-drawer__empty {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.45;
  color: #050611;
}

.fav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fav-drawer__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 10px;
  background: #f1f3f5;
  box-sizing: border-box;
}

.fav-drawer__thumb {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  background-color: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.fav-drawer__thumb--empty {
  background: #e5e7ea;
}

.fav-drawer__item-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  color: #050611;
}

@media (min-width: 1199px) {
  .fav-drawer__item-title {
    font-size: 14px;
  }
}

.fav-drawer__del {
  flex: 0 0 35px;
  box-sizing: border-box;
  width: 35px;
  height: 35px;
  padding: 10px;
  border: 1px solid #d93434;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23d93434' d='M1.2 1.2l9.6 9.6m0-9.6L1.2 10.8' stroke='%23d93434' stroke-width='1.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
  cursor: pointer;
  color: transparent;
  font-size: 0;
}

.fav-drawer__form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.fav-drawer__honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.fav-drawer__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.fav-drawer__label {
  font-size: 14px;
  line-height: 1.3;
  color: #050611;
}

.fav-drawer__input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 14px 0 12px;
  border: 0;
  border-bottom: 1px solid #000;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.3;
  color: #050611;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.fav-drawer__input:focus {
  border-bottom-color: #d93434;
}

.fav-drawer__input[aria-invalid='true'] {
  border-bottom-color: #d93434;
}

.fav-drawer__phone {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #000;
}

.fav-drawer__phone:focus-within {
  border-bottom-color: #d93434;
}

.fav-drawer__flag {
  flex: 0 0 22px;
  width: 22px;
  height: 15px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(
    to bottom,
    #fff 0 33.33%,
    #0039a6 33.33% 66.66%,
    #d52b1e 66.66% 100%
  );
}

.fav-drawer__input--phone {
  border-bottom: 0;
  padding-top: 10px;
  padding-bottom: 10px;
}

.fav-drawer__error {
  font-size: 12px;
  color: #d93434;
}

.fav-drawer__status {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.fav-drawer__status[data-status='error'] {
  color: #d93434;
}

.fav-drawer__status[data-status='success'] {
  color: #1a7f37;
}

.fav-drawer__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 14px 20px;
  border: 0;
  background: #d93434;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease;
}

.fav-drawer__submit:hover {
  background: #c12d2d;
}

.fav-drawer__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 1198px) {
  .fav-drawer__panel {
    padding: 40px 10px;
  }

  .fav-drawer__title {
    font-size: 26px;
    padding-right: 48px;
  }
}
