/* Wishlist + compare (apps/lists). Uses the tokens from site.css. */

/* ---- buttons (product page, card, wishlist) ---- */
.lst-acts{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0}
.lst-acts form{margin:0}
.lst-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 14px;border:0;border-radius:10px;background:#fff;box-shadow:inset 0 0 0 1px var(--line);color:var(--ink2);font-size:14px;font-weight:600;cursor:pointer;transition:background .15s,color .15s,box-shadow .15s}
.lst-btn:hover{background:var(--paper);color:var(--ink)}
.lst-btn[aria-busy=true]{opacity:.6;pointer-events:none}
.lst-btn--wish[aria-pressed=true]{color:var(--red);box-shadow:inset 0 0 0 1px #F3C7C2;background:var(--red-s)}
.lst-btn--wish[aria-pressed=true] .i{fill:currentColor}
.lst-btn--cmp[aria-pressed=true]{color:var(--accent);background:var(--accent-s);box-shadow:inset 0 0 0 1px #C9D8E5}
.lst-btn--del{color:var(--muted)}.lst-btn--del:hover{color:var(--red);background:var(--red-s)}
/* icon-only on a product card: floats over the image corner */
.card{position:relative}
.lst-acts--ic{position:absolute;top:12px;inset-inline-end:12px;flex-direction:column;gap:6px;margin:0;z-index:2}
.lst-acts--ic .lst-btn{width:34px;min-height:34px;padding:0;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:0 1px 3px rgba(26,28,31,.16)}
.lst-acts--ic .lst-btn[aria-pressed=true]{box-shadow:0 1px 3px rgba(26,28,31,.16)}
/* header counters (same look as the cart badge) */
.lst-count{background:var(--accent);color:#fff;border-radius:999px;font-size:12px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px}

/* ---- page head + empty state ---- */
.lst-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.lst-head .pagetitle{margin-inline-end:auto}
.lst-head__n{margin:0;font-weight:600}
.lst-head form{margin:0}
.lst-empty{text-align:center;padding:40px 20px;max-width:560px;margin:8px auto 24px}
.lst-empty__ic{width:76px;height:76px;padding:16px;margin:0 auto 14px;border-radius:999px;background:var(--accent-s);color:var(--accent)}
.lst-empty h2{font-size:18px}
.lst-empty .btn{margin-top:4px}

/* ---- wishlist grid ---- */
.wl{list-style:none;margin:0;padding:0}
.wl__item{display:flex;flex-direction:column;min-width:0}
.wl__item>.card{flex:1}
.wl__acts{display:flex;gap:6px;margin-top:8px}
.wl__acts form{flex:1;margin:0}
.wl__acts .lst-btn{width:100%;min-height:38px;padding:0 8px;font-size:13px}
@media (max-width:479px){.wl__acts form[data-wish-remove]{flex:0 0 40px}.wl__acts .lst-btn--del span{display:none}}

/* ---- compare ---- */
.cmp-bar{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:4px 0 12px}
.cmp-hint{display:flex;align-items:center;gap:6px;margin:0;font-size:14px}
.seg{display:inline-flex;padding:3px;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.seg a{padding:6px 14px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted)}
.seg a[aria-current]{background:var(--accent);color:#fff}
.cmp-legend{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;color:var(--muted)}
.cmp-legend i{width:14px;height:14px;border-radius:4px;background:var(--amber-s);box-shadow:inset 0 0 0 1px #EBD9A6}

.cmp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;background:var(--card);border-radius:var(--r);box-shadow:var(--sh);margin-bottom:28px;overscroll-behavior-x:contain}
.cmp-scroll:focus-visible{outline-offset:4px}
.cmp{--first:112px;--col:158px;width:100%;min-width:calc(var(--first) + var(--n,2) * var(--col));border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px}
.cmp th,.cmp td{padding:10px 12px;border-bottom:1px solid var(--line2);text-align:start;vertical-align:top}
.cmp--n1{--n:1}.cmp--n2{--n:2}.cmp--n3{--n:3}.cmp--n4{--n:4}
.cmp tbody tr:last-child>*{border-bottom:0}
/* sticky attribute column (the first column is on the right in RTL) */
.cmp tbody th,.cmp__corner{position:sticky;inset-inline-start:0;z-index:1;width:var(--first);background:var(--paper);box-shadow:inset 1px 0 0 var(--line2)}
.cmp tbody th{color:var(--muted);font-weight:600;font-size:13px;line-height:1.6}
.cmp td{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.cmp tr.is-diff td{background:#FDF8EA}
.cmp tr.is-diff th{background:var(--amber-s);color:var(--amber)}
.cmp__corner{vertical-align:bottom!important;font-size:12px}
/* product heads */
.cmp__p{position:relative;font-weight:400;padding-top:14px!important}
.cmp__media{display:block;aspect-ratio:1;max-width:150px;margin:0 auto 10px;border-radius:10px;overflow:hidden;background:#F1EFEB}
.cmp__media img{width:100%;height:100%;object-fit:cover}
.cmp__name{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;font-weight:700;line-height:1.7;min-height:5.1em;margin-bottom:6px}
.cmp__p .price{font-size:15px}
.cmp__p .stock{margin-bottom:10px}
.cmp__rm{position:absolute;top:6px;inset-inline-end:6px;margin:0;z-index:1}
.cmp__rm .btn-ic{width:30px;height:30px;border-radius:999px;background:rgba(255,255,255,.94);box-shadow:0 1px 3px rgba(26,28,31,.18);color:var(--muted)}
.cmp__rm .btn-ic:hover{color:var(--red)}
.cmp__buy{margin:0;display:flex;flex-direction:column;gap:6px}
.cmp__buy select{min-height:38px;font-size:13px;padding:4px 8px}
.cmp__cart{width:100%;min-height:40px;padding:0 10px;font-size:13px;gap:6px}

/* ---- toast (lists.js) ---- */
.lst-toast{position:fixed;bottom:18px;inset-inline:16px;margin:0 auto;max-width:420px;z-index:70;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-radius:12px;background:var(--ink);color:#fff;font-size:14px;font-weight:600;box-shadow:0 16px 40px -16px rgba(0,0,0,.45)}
.lst-toast a{color:#fff;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
@media (max-width:760px){.lst-toast{bottom:84px}}

@media (min-width:640px){
  .cmp{--first:150px;--col:200px}
  .cmp th,.cmp td{padding:12px 16px}
  .wl__acts .lst-btn{font-size:14px}
}
@media (min-width:960px){
  .cmp{--first:190px;--col:230px;font-size:15px}
  .cmp tbody th{font-size:14px}
  .cmp__media{max-width:170px}
}
@media (prefers-reduced-motion:reduce){.lst-btn{transition:none}}
