:root {
  --tks-forest: var(--tk-forest, #235b43);
  --tks-ink: var(--tk-ink, #173a2d);
  --tks-petal: var(--tk-petal, #d95578);
  --tks-mist: var(--tk-mist, #edf5ef);
  --tks-line: var(--tk-line, #dbe5dd);
  --tks-white: #fff;
}

.tk-favorites-header svg,
.tk-favorite-button svg { display: block; }

.tk-favorites-count {
  display: grid;
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--tks-petal);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.tk-favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(35, 91, 67, .18);
  color: var(--tks-forest);
  background: #fff;
  font: 800 14px/1.2 var(--tk-sans, Arial, sans-serif);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.tk-favorite-button:hover,
.tk-favorite-button:focus-visible {
  border-color: var(--tks-petal);
  color: #a62e52;
  background: #fff7f8;
}

.tk-favorite-button.is-favorite {
  border-color: rgba(217, 85, 120, .34);
  color: #a62e52;
  background: #fff0f4;
}

.tk-favorite-button.is-favorite svg path { fill: currentColor; }

.tk-favorite-button--single {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 13px;
}

li.product { position: relative; }

.tk-favorite-button--loop {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(27, 62, 46, .1);
}

.tk-favorite-button--loop .tk-favorite-button__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.tk-favorites-open { overflow: hidden; }

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

.tk-favorites-drawer {
  position: fixed;
  z-index: 999999;
  inset: 0;
}

.tk-favorites-drawer__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(12, 40, 29, .42);
  opacity: 0;
  cursor: default;
  transition: opacity .22s ease;
}

.tk-favorites-drawer__panel {
  display: grid;
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100%);
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--tks-ink);
  background: #fffdfa;
  box-shadow: -30px 0 80px rgba(16, 56, 40, .2);
  transform: translateX(102%);
  transition: transform .22s ease;
}

.tk-favorites-drawer.is-open .tk-favorites-drawer__backdrop { opacity: 1; }
.tk-favorites-drawer.is-open .tk-favorites-drawer__panel { transform: translateX(0); }

.tk-favorites-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 30px 23px;
  border-bottom: 1px solid var(--tks-line);
  background: radial-gradient(circle at 90% 0, rgba(217, 85, 120, .14), transparent 34%), #fffdfa;
}

.tk-favorites-drawer__head span {
  display: block;
  margin-bottom: 5px;
  color: var(--tks-forest);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tk-favorites-drawer__head h2 {
  margin: 0;
  color: var(--tks-ink);
  font-family: var(--tk-serif, Georgia, serif);
  font-size: 39px;
  font-weight: 400;
  line-height: 1;
}

.tk-favorites-drawer__head h2 small {
  font-family: var(--tk-sans, Arial, sans-serif);
  font-size: 14px;
  font-weight: 800;
}

.tk-favorites-drawer__close {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--tks-line);
  border-radius: 50%;
  color: var(--tks-forest);
  background: #fff;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
}

.tk-favorites-drawer__content {
  overflow-y: auto;
  padding: 8px 30px 24px;
}

.tk-favorites-item {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 34px;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--tks-line);
}

.tk-favorites-item__image {
  display: block;
  overflow: hidden;
  border-radius: 15px;
  background: var(--tks-mist);
}

.tk-favorites-item__image img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin: 0;
  object-fit: contain;
}

.tk-favorites-item__body > a {
  display: block;
  color: var(--tks-ink);
  font-family: var(--tk-serif, Georgia, serif);
  font-size: 20px;
  line-height: 1.12;
  text-decoration: none;
}

.tk-favorites-item__stock {
  display: block;
  margin-top: 8px;
  color: var(--tks-forest);
  font-size: 11px;
  font-weight: 800;
}

.tk-favorites-item__stock::before { content: "● "; }
.tk-favorites-item__stock.is-out { color: #9b3d55; }

.tk-favorites-item__price {
  margin-top: 5px;
  color: var(--tks-forest);
  font-size: 16px;
  font-weight: 850;
}

.tk-favorites-item__remove {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #6f7d75;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.tk-favorites-item__remove:hover { color: #a62e52; background: #fff0f4; }

.tk-favorites-empty {
  display: grid;
  min-height: 360px;
  padding: 50px 28px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.tk-favorites-empty > span {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 50%;
  color: var(--tks-petal);
  background: #fff0f4;
  font-size: 42px;
}

.tk-favorites-empty strong { font: 400 29px/1.1 var(--tk-serif, Georgia, serif); }
.tk-favorites-empty p { max-width: 330px; margin: 11px 0 0; color: #647168; font-size: 14px; line-height: 1.55; }
.tk-favorites-loading, .tk-favorites-error { padding: 40px 0; color: #647168; text-align: center; }

.tk-favorites-drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 30px;
  border-top: 1px solid var(--tks-line);
  background: #f2f7f2;
}

.tk-favorites-drawer__foot > span { color: #647168; font-size: 11px; }
.tk-favorites-drawer__foot a { color: var(--tks-forest); font-size: 13px; font-weight: 850; text-decoration: none; white-space: nowrap; }

@media (max-width: 680px) {
  .tk-favorite-button--loop { top: 11px; right: 11px; width: 38px; height: 38px; }
  .tk-favorites-drawer__head { padding: 22px 20px 18px; }
  .tk-favorites-drawer__head h2 { font-size: 34px; }
  .tk-favorites-drawer__content { padding-inline: 20px; }
  .tk-favorites-item { grid-template-columns: 82px minmax(0, 1fr) 32px; gap: 12px; }
  .tk-favorites-item__body > a { font-size: 18px; }
  .tk-favorites-drawer__foot { padding: 16px 20px; }
}

