/* ==========================================================================
   Dead Sea Shoping — Wishlist / Favorites Module (css/wishlist.css)
   Trilingual RTL/LTR · Matches Dead Sea Luxury Palette
   ========================================================================== */

:root {
  --dsw-deep:    #0b3446;
  --dsw-teal:    #166374;
  --dsw-gold:    #c8a24a;
  --dsw-sand-lt: #faf8f4;
  --dsw-heart:   #e11d48;
  --dsw-heart-bg:#fff1f2;
  --dsw-wa:      #25d366;
  --dsw-wa-dk:   #1da851;
  --dsw-ink:     #162329;
  --dsw-muted:   #5c727c;
  --dsw-line:    rgba(11, 52, 70, 0.10);
  --dsw-ease:    cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Heart Button on Product Cards ───────────────────────────────────────── */
.dsw-card-btn {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(11, 52, 70, 0.10);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--dsw-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 3px 10px rgba(11, 52, 70, 0.10);
  transition: transform 0.22s var(--dsw-ease), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.dsw-card-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, transform 0.25s var(--dsw-ease);
}
.dsw-card-btn:hover {
  transform: scale(1.1);
  color: var(--dsw-heart);
  background: #ffffff;
}
.dsw-card-btn.is-active {
  color: var(--dsw-heart);
  background: var(--dsw-heart-bg);
  border-color: rgba(225, 29, 72, 0.25);
}
.dsw-card-btn.is-active svg {
  fill: var(--dsw-heart);
  animation: dsw-pop 0.34s var(--dsw-ease);
}

@keyframes dsw-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.32); }
  100% { transform: scale(1); }
}

/* ── Product Detail Page Inline Wishlist Button ──────────────────────────── */
.dsw-pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--dsw-line);
  background: #fff;
  color: var(--dsw-deep);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dsw-pd-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.dsw-pd-btn:hover {
  border-color: rgba(225, 29, 72, 0.35);
  color: var(--dsw-heart);
}
.dsw-pd-btn.is-active {
  background: var(--dsw-heart-bg);
  border-color: rgba(225, 29, 72, 0.35);
  color: var(--dsw-heart);
}
.dsw-pd-btn.is-active svg {
  fill: var(--dsw-heart);
}

/* ── Header Wishlist Button (injected beside .cart-btn) ──────────────────── */
.dsw-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--dsw-line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--dsw-deep);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.dsw-header-btn:hover {
  background: var(--dsw-heart-bg);
  border-color: rgba(225, 29, 72, 0.25);
  color: var(--dsw-heart);
}
.dsw-header-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.dsw-header-btn.has-items svg {
  fill: var(--dsw-heart);
  stroke: var(--dsw-heart);
}
.dsw-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--dsw-heart);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: none;
  place-items: center;
  line-height: 1;
}
.dsw-header-btn.has-items .dsw-badge {
  display: grid;
}

/* ── Floating Fallback Launcher (if header .cart-btn not found) ──────────── */
.dsw-fab {
  position: fixed;
  bottom: 84px;
  inset-inline-start: 18px;
  z-index: 990;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: #fff;
  color: var(--dsw-heart);
  box-shadow: 0 8px 26px rgba(11, 52, 70, 0.18);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s var(--dsw-ease);
}
.dsw-fab:hover { transform: scale(1.07); }
.dsw-fab .dsw-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
}

/* ── Slide-Out Wishlist Drawer ───────────────────────────────────────────── */
.dsw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9996;
  background: rgba(11, 30, 40, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.dsw-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.dsw-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 9997;
  width: min(440px, 100vw);
  background: #ffffff;
  box-shadow: -12px 0 44px rgba(11, 52, 70, 0.22);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.36s var(--dsw-ease);
  font-family: inherit;
}
[dir="rtl"] .dsw-drawer {
  transform: translateX(-100%);
  box-shadow: 12px 0 44px rgba(11, 52, 70, 0.22);
}
.dsw-drawer.is-open {
  transform: translateX(0) !important;
}

.dsw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--dsw-line);
}
.dsw-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dsw-deep);
}
.dsw-title-count {
  background: var(--dsw-heart-bg);
  color: var(--dsw-heart);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}
.dsw-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--dsw-line);
  background: var(--dsw-sand-lt);
  color: var(--dsw-deep);
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.dsw-close:hover {
  background: var(--dsw-deep);
  color: #fff;
  transform: rotate(90deg);
}

/* Shared Banner (when opened via ?wishlist=...) */
.dsw-shared-bar {
  padding: 10px 22px;
  background: linear-gradient(135deg, #fff1f2 0%, #faf8f4 100%);
  border-bottom: 1px solid rgba(225, 29, 72, 0.14);
  font-size: 0.83rem;
  color: var(--dsw-deep);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dsw-shared-bar.is-visible { display: flex; }
.dsw-shared-save {
  border: 0;
  background: var(--dsw-heart);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.dsw-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dsw-empty {
  text-align: center;
  padding: 52px 18px;
  color: var(--dsw-muted);
}
.dsw-empty-ico {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.75;
}
.dsw-empty h4 {
  color: var(--dsw-deep);
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.dsw-empty p {
  font-size: 0.86rem;
  margin-bottom: 18px;
}

/* Wishlist Item Row */
.dsw-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px;
  padding: 12px;
  background: var(--dsw-sand-lt);
  border: 1px solid var(--dsw-line);
  border-radius: 14px;
  align-items: center;
  transition: border-color 0.2s ease;
}
.dsw-item:hover {
  border-color: rgba(11, 52, 70, 0.2);
}
.dsw-thumb {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--dsw-line);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  text-decoration: none;
}
.dsw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.dsw-info { min-width: 0; }
.dsw-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dsw-ink);
  line-height: 1.32;
  text-decoration: none;
  margin-bottom: 6px;
}
.dsw-name:hover { color: var(--dsw-teal); }
.dsw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dsw-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--dsw-deep);
  font-variant-numeric: tabular-nums;
}
.dsw-item-acts {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dsw-add-btn {
  padding: 6px 12px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(135deg, #d4af55 0%, #bd953a 100%);
  color: #1f1702;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.dsw-add-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.dsw-rm-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--dsw-line);
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.dsw-rm-btn:hover {
  color: var(--dsw-heart);
  border-color: rgba(225, 29, 72, 0.3);
}

/* Drawer Footer */
.dsw-foot {
  padding: 15px 22px 20px;
  border-top: 1px solid var(--dsw-line);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(11, 52, 70, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dsw-foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}
.dsw-foot-top span:first-child {
  color: var(--dsw-muted);
  font-weight: 600;
}
.dsw-total {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--dsw-deep);
}
.dsw-btn-wa {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--dsw-wa) 0%, var(--dsw-wa-dk) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.28);
  transition: transform 0.2s var(--dsw-ease), box-shadow 0.2s ease;
}
.dsw-btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.36);
}
.dsw-foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dsw-btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--dsw-deep);
  background: transparent;
  color: var(--dsw-deep);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.dsw-btn-sec:hover {
  background: var(--dsw-deep);
  color: #fff;
}
.dsw-btn-all {
  background: var(--dsw-deep);
  color: #fff;
}
.dsw-btn-all:hover {
  background: var(--dsw-teal);
  border-color: var(--dsw-teal);
}
.dsw-clear-link {
  background: none;
  border: 0;
  color: var(--dsw-muted);
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  align-self: center;
  margin-top: 2px;
}
.dsw-clear-link:hover { color: var(--dsw-heart); }

/* ==========================================================================
   תיקונים לאתר (deadseashoping.com)
   ========================================================================== */
/* הלב בכרטיס — בפינה התחתונה של התמונה, כדי לא לשבת על תגית המבצע / המלאי שלמעלה */
.dsw-card-btn { top: auto !important; bottom: 10px; inset-inline-end: 10px; }
/* כפתור בדף המוצר — שורה משלו מתחת לכפתורי הקנייה */
.dsw-pd-btn { margin-top: 10px; }
/* מוצר שאזל ברשימה */
.dsw-item.is-out { opacity: .6; }
.dsw-out { color: #94a3b8; font-weight: 700; font-size: .85rem; }
/* אזור בטוח באייפון */
.dsw-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)) !important; }
/* פריט "המועדפים שלי" בתפריט — במובייל בלבד; במחשב יש כפתור לב ליד העגלה */
.dsw-nav-link { display: none !important; }
.dsw-nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-inline-start: 6px;
  border-radius: 999px; background: #e11d48; color: #fff; font-size: .72rem; font-weight: 800; vertical-align: middle; }
@media (max-width: 640px) {
  .dsw-header-btn { display: none !important; }      /* ראש העמוד במובייל צפוף — המועדפים נגישים מהתפריט */
  #main-nav .dsw-nav-link { display: block !important; }
}
