/**
 * TujjarCo Wishlist — styles
 * Matches the TujjarCo design tokens used across the site.
 */

.tjc-wishlist,
.tjc-wish-toast {
  --brand: #17A56B;
  --brand-deep: #0B6B4A;
  --brand-tint: #E7F6EF;
  --ink: #0C1613;
  --mist: #F4F7F5;
  --line: #E2E8E4;
  --text: #1A2420;
  --text-soft: #5C6B64;
  --danger: #C23B3B;
  --fd: 'Sora', sans-serif;
  --fb: 'IBM Plex Sans', sans-serif;
}

/* ===================================================================
 * The heart button
 * ================================================================ */
.tjc-wish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #E2E8E4;
  border-radius: 50%;
  background: #fff;
  color: #5C6B64;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.tjc-wish:hover { color: #C23B3B; border-color: #C23B3B; }
.tjc-wish.on { color: #fff; background: #C23B3B; border-color: #C23B3B; }
.tjc-wish.on svg { fill: currentColor; }
.tjc-wish.is-busy { opacity: .6; pointer-events: none; }
.tjc-wish:active { transform: scale(.9); }
.tjc-wish:focus-visible { outline: 3px solid rgba(23,165,107,.4); outline-offset: 2px; }

/* pop when it becomes active */
.tjc-wish.on svg { animation: tjcPop .28s ease; }
@keyframes tjcPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* inline / labelled variant (single product page) */
.tjc-wish--inline {
  width: auto;
  height: auto;
  padding: 11px 18px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-family: 'IBM Plex Sans', sans-serif;
}
.tjc-wish-single { margin: 14px 0; }

/* floating heart on shop-loop cards */
.tjc-wish-loop { position: relative; }
.tjc-wish-loop .tjc-wish {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(12,22,19,.10);
}
[dir="rtl"] .tjc-wish-loop .tjc-wish { right: auto; left: 10px; }

/* ===================================================================
 * Header count button + badge
 * Self-contained: looks right in ANY theme header, and still respects
 * your own .icon-btn / .badge rules if the page already defines them.
 * ================================================================ */
.tjc-wish-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1A2420;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.tjc-wish-link:hover { background: #F4F7F5; color: #0C1613; }
.tjc-wish-link:focus-visible { outline: 3px solid rgba(23,165,107,.4); outline-offset: 2px; }

.tjc-wish-link .tjc-wish-count {
  position: absolute;
  top: 5px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #0B6B4A;
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
  transition: transform .22s cubic-bezier(.2,.9,.3,1.4), background .2s;
}
[dir="rtl"] .tjc-wish-link .tjc-wish-count { right: auto; left: 4px; }

/* faded when empty, red + bump when it changes */
.tjc-wish-link .tjc-wish-count.is-zero { background: #9AAAA2; }
.tjc-wish-link .tjc-wish-count.bump { animation: tjcBump .4s ease; }
@keyframes tjcBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ===================================================================
 * Wishlist page
 * ================================================================ */
.tjc-wishlist { font-family: var(--fb); color: var(--text); }

.tjc-wish-notice {
  background: var(--brand-tint);
  border: 1px solid #C6E7D7;
  color: var(--brand-deep);
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 0 0 20px;
}
.tjc-wish-notice a { color: var(--brand-deep); font-weight: 600; }

.tjc-wish-grid {
  display: grid;
  grid-template-columns: repeat(var(--tjc-cols, 4), 1fr);
  gap: 16px;
}

.tjc-wish-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .16s, transform .16s, box-shadow .16s, opacity .2s;
}
.tjc-wish-card:hover {
  border-color: #CBDBD3;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(12,22,19,.08);
}
.tjc-wish-card.is-going { opacity: 0; transform: scale(.96); }

.tjc-wish-media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  display: block;
  overflow: hidden;
}
.tjc-wish-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tjc-wish-oos {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(12,22,19,.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 99px;
}

.tjc-wish-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.tjc-wish-remove:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
[dir="rtl"] .tjc-wish-remove { right: auto; left: 8px; }

.tjc-wish-body {
  padding: 14px 15px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.tjc-wish-vendor { font-size: 11.5px; color: var(--text-soft); }
.tjc-wish-vendor a { color: inherit; text-decoration: none; }
.tjc-wish-vendor a:hover { color: var(--brand-deep); }

.tjc-wish-card h3 {
  font-family: var(--fd);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}
.tjc-wish-card h3 a { color: var(--ink); text-decoration: none; }
.tjc-wish-card h3 a:hover { color: var(--brand-deep); }

.tjc-wish-price {
  font-family: var(--fd);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-top: auto;
  padding-top: 8px;
}
.tjc-wish-price del { color: #9AAAA2; font-weight: 400; font-size: 13px; margin-right: 6px; }
.tjc-wish-price ins { text-decoration: none; }

.tjc-wish-foot { padding: 0 15px 15px; display: flex; }

.tjc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  font-family: var(--fb);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.tjc-btn:hover { border-color: #B9C6BF; background: var(--mist); }
.tjc-btn-primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.tjc-btn-primary:hover { background: #0A5C40; border-color: #0A5C40; color: #fff; }
.tjc-wish-foot .added_to_cart { display: none; }

/* empty state */
.tjc-wish-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--mist);
  color: var(--text-soft);
}
.tjc-wish-empty svg { color: #B4C4BC; margin-bottom: 14px; }
.tjc-wish-empty h3 {
  font-family: var(--fd);
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 6px;
}
.tjc-wish-empty p { font-size: 14px; margin: 0 0 20px; }
.tjc-wish-empty .tjc-btn { width: auto; display: inline-flex; }

/* ===================================================================
 * Toast
 * ================================================================ */
.tjc-wish-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 140%);
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  font-family: var(--fb);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 20px;
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  max-width: calc(100vw - 40px);
}
.tjc-wish-toast.show { transform: translate(-50%, 0); }
.tjc-wish-toast.is-error { background: var(--danger); }

/* ===================================================================
 * Responsive
 * ================================================================ */
@media (max-width: 1024px) {
  .tjc-wish-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .tjc-wish-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tjc-wish, .tjc-wish-card, .tjc-wish-toast, .tjc-btn { transition: none; }
  .tjc-wish.on svg { animation: none; }
}
