/* ======================================================
   Header Wishlist Dropdown (Premium)
   Path: assets/css/header-wishlist.css
   Purpose:
   - Wishlist dropdown UI
   - ✅ Mobile/Tablet: dropdown ALWAYS center open (fixed)
   - ✅ "Open Wishlist" button brand orange + white, hover dark
====================================================== */

.stm-wish{ position:relative; }

/* Toggle button */
.stm-wish__toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 36px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}
.stm-wish__toggle:hover{ border-color: rgba(0,0,0,.14); }
.stm-wish__toggle:active{ transform: translateY(1px); }

.stm-wish__icon{
  width: 18px;
  height: 18px;
  display: block;
  background: #111;
  -webkit-mask: var(--stm-wish-ico) no-repeat center / 18px 18px;
  mask: var(--stm-wish-ico) no-repeat center / 18px 18px;
  opacity: .9;
}

/* Count badge (default = black) */
.stm-wish__count{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* ✅ Active badge (has items) = green bg + white text */
.stm-wish.is-active .stm-wish__count{
  background: #19a33a;
  color: #fff;
}

/* Dropdown shell (NO blur/shade) */
.stm-wish__dropdown{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;

  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;

  /* ✅ hard-kill blur/shadow */
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;

  overflow: hidden;

  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 99999; /* ✅ ensure above header items */
}
.stm-wish.is-open .stm-wish__dropdown{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ✅ Mobile/Tablet center open (fixed, no drift, size SAME) */
@media (max-width: 1023px){
  .stm-wish__dropdown{
    position: fixed;
    left: 50%;
    right: auto;
    top: 86px;                 /* header ke niche safe */
    transform: translateX(-50%) translateY(8px);
  }
  .stm-wish.is-open .stm-wish__dropdown{
    transform: translateX(-50%) translateY(0);
  }
}

/* Head */
.stm-wish__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.stm-wish__title{ font-size:15px; font-weight:800; color:#111; }
.stm-wish__view{
  font-size:12px;
  font-weight:700;
  color:#111;
  opacity:.75;
  text-decoration:none;
}
.stm-wish__view:hover{ opacity:1; text-decoration:underline; }

/* Body */
.stm-wish__body{
  padding: 10px 12px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
}
.stm-wish__loading{
  padding: 12px 6px;
  font-size: 13px;
  opacity: .7;
}

/* List */
.stm-wish-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap: 10px;
}

/* Item row */
.stm-wish-item{
  display:grid;
  grid-template-columns: 56px 1fr 32px;
  gap: 10px;
  align-items:center;

  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}
.stm-wish-item:hover{ background: rgba(0,0,0,.04); }

/* Thumb */
.stm-wish-item__thumb{
  width:56px;
  height:56px;
  border-radius:10px;
  overflow:hidden;
  display:block;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
}
.stm-wish-item__thumb img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block;
}

/* Meta column must allow shrink */
.stm-wish-item__meta{ min-width:0; }

/* ✅ Title clamp FIX (force override global link/text rules) */
.stm-wish__dropdown .stm-wish-item__title{
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 3 !important;

  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;

  overflow-wrap: anywhere;
  word-break: break-word;

  max-width: 100%;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  opacity: .92;
}
.stm-wish__dropdown .stm-wish-item__title:hover{
  opacity: 1;
  text-decoration: underline;
}

/* Remove button */
.stm-wish-item__remove{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: border-color .18s ease, transform .18s ease;
}
.stm-wish-item__remove:hover{ border-color: rgba(0,0,0,.16); }
.stm-wish-item__remove:active{ transform: translateY(1px); }
.stm-wish-item__remove svg{
  width: 14px;
  height: 14px;
  display:block;
  opacity:.8;
}

/* Empty */
.stm-wish-empty{ padding: 18px 6px 10px; }
.stm-wish-empty__title{ margin:0 0 6px; font-size:14px; font-weight:800; }
.stm-wish-empty__text{ margin:0; font-size:13px; opacity:.75; }

/* Footer */
.stm-wish__foot{
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* ✅ Open Wishlist button: brand orange + white, hover dark */
.stm-wish__btn{
  display:block;
  width:100%;
  text-align:center;
  padding: 12px 14px;
  border-radius: 12px;

  background:#ff7a00;      /* brand orange */
  color:#fff;

  text-decoration:none;
  font-size:13px;
  font-weight:800;

  border: 1px solid rgba(255,122,0,.85);
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.stm-wish__btn:hover{
  background:#e86f00;      /* slightly darker */
  border-color:#e86f00;
  opacity: 1;
}

/* Keep your same smart size rules */
@media (max-width: 420px){
  .stm-wish__dropdown{ width: 330px; }
}

/* Extra small: safe top */
@media (max-width: 480px){
  .stm-wish__dropdown{ top: 78px; }
}
