/*
 * Wishlist / compare UI, matched to the reference store:
 *  - card hover row: heart in a pink circle ("Remove wishlist" once added) | divider | square checkbox "Add to compare"
 *  - floating black "COMPARE (n)" button, bottom right
 *  - compare popup: grey title bar, "Remove All", black close square, table with product cards
 */

/* ---------- card hover row ---------- */
.sc-hover-actions .sc-wc-row { display: flex; align-items: stretch; justify-content: center; gap: 0; padding: 12px 0 0; font-size: 13px; color: #222; width: 100%; box-sizing: border-box; }
.sc-hover-actions .sc-wc-row > * { flex: 1 1 50%; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 6px; text-align: left; line-height: 1.3; }
.sc-hover-actions .sc-wc-row > .sc-cmp { border-left: 1px solid #e3e3e3; }
.sc-wc-row span { white-space: normal; }

.sc-wish { cursor: pointer; background: none; border: 0; font: inherit; color: inherit; }
.sc-wish .sc-heart { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; transition: background .15s; }
.sc-wish .sc-heart svg { width: 16px; height: 16px; stroke: #222; fill: none; stroke-width: 2; }
.sc-wish.on .sc-heart { background: #fde4e8; }
.sc-wc-row .sc-wish.on svg { fill: none; stroke: #222; }          /* beat the old "filled red heart" rule: reference keeps the outline */
.sc-wish:hover .sc-heart { background: #fde4e8; }

.sc-cmp { cursor: pointer; }
.sc-cmp input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid #222; border-radius: 0; background: #fff; display: inline-block; position: relative; cursor: pointer; }
.sc-cmp input[type=checkbox]:checked { background: #222; }
.sc-cmp input[type=checkbox]:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Narrow cards (phones): stack icon over text, like the reference's mobile cards */
@media (max-width: 1100px) {
  .sc-hover-actions .sc-wc-row > .sc-wish { flex-direction: column; gap: 4px; text-align: center; }
  .sc-hover-actions .sc-wc-row > .sc-cmp { flex-direction: row; }
}
@media (max-width: 600px) {
  .sc-hover-actions .sc-wc-row { font-size: 11px; }
  .sc-hover-actions .sc-wc-row > * { padding: 2px 3px; gap: 4px; }
  .sc-wish .sc-heart { width: 24px; height: 24px; }
  .sc-wish .sc-heart svg { width: 12px; height: 12px; }
  .sc-cmp input[type=checkbox] { width: 14px; height: 14px; }
  .sc-cmp input[type=checkbox]:checked::after { left: 3px; top: 0; width: 4px; height: 8px; }
}

/* ---------- floating compare button ---------- */
.sc-cmp-fab { position: fixed; right: 20px; bottom: 100px; z-index: 900; display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 22px; background: #111; color: #fff; border: 0; border-radius: 4px; font: 600 16px 'Spartan', Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.sc-cmp-fab[hidden] { display: none; }
.sc-cmp-fab:hover { background: var(--purple, #5f3b97); }
.sc-cmp-fab .sc-cmp-n { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #111; font-size: 14px; font-weight: 700; letter-spacing: 0; }

/* ---------- compare popup ---------- */
body.sc-cmp-open { overflow: hidden; }
.sc-cmpm { position: fixed; inset: 0; z-index: 2500; background: rgba(0, 0, 0, .6); overflow: auto; padding: 50px 20px; box-sizing: border-box; }
.sc-cmpm-box { position: relative; background: #fff; width: min(1500px, 100%); margin: 0 auto; max-height: calc(100vh - 100px); display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.sc-cmpm-head { flex: none; background: #f3f3f3; text-align: center; padding: 18px 24px; position: relative; }
.sc-cmpm-head > span { font-size: 22px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #111; }
.sc-cmpm-all { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #555; text-decoration: underline; }
.sc-cmpm-all:hover { color: #111; }
.sc-cmpm-x { position: absolute; top: 14px; right: calc(50% - min(750px, 50% - 20px) - 36px); width: 36px; height: 36px; background: #000; color: #fff; border: 0; font-size: 26px; line-height: 1; cursor: pointer; z-index: 2; }
.sc-cmpm-body { overflow: auto; padding: 36px; }

/* the comparison table */
.sc-cmpt { border: 1px solid #ececec; }
.sc-cmpt-row { display: grid; grid-template-columns: 210px repeat(var(--n), minmax(230px, 1fr)); border-top: 1px solid #ececec; }
.sc-cmpt-row:first-child { border-top: 0; }
.sc-cmpt-label { padding: 34px 28px; font-size: 15px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: #111; border-right: 1px solid #ececec; }
.sc-cmpt-cell { padding: 34px 28px; font-size: 15px; line-height: 1.55; color: #444; border-right: 1px solid #ececec; text-align: center; }
.sc-cmpt-cell:last-child { border-right: 0; }
.sc-dim { color: #999; }
.sc-cmpt-prod { position: relative; display: flex; flex-direction: column; align-items: center; }
.sc-cmpt-prod .sc-sale { position: absolute; top: 28px; left: 24px; font-size: 13px; padding: 5px 10px; line-height: 1.2; background: #ed4649; color: #fff; font-weight: 600; z-index: 1; }
.sc-cmpt-img img { width: 100%; max-width: 260px; aspect-ratio: 1 / 1; object-fit: contain; display: block; margin: 0 auto 18px; }
.sc-cmpt-vendor { font-size: 17px; color: #222; margin-bottom: 6px; }
.sc-cmpt-title { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #555; font-size: 15px; line-height: 1.5; margin-bottom: 10px; max-width: 280px; }
.sc-cmpt-price { margin-bottom: 18px; font-size: 20px; font-weight: 600; color: #d81e41; }
.sc-cmpt-price del { font-size: 16px; font-weight: 400; color: #555; margin-right: 8px; opacity: 1; }
.sc-cmpt-price ins { background: none; text-decoration: none; }
.sc-cmpt-prod a.button { display: block; width: 100%; max-width: 280px; box-sizing: border-box; text-align: center; background: #fff !important; color: #222 !important; border: 1px solid #222; border-radius: 0; padding: 16px 10px !important; font-size: 17px !important; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.sc-cmpt-prod a.button:hover { background: #222 !important; color: #fff !important; }
.sc-cmpt-prod a.added_to_cart { display: none; }
.sc-cmpt-remove { margin-top: 20px; color: #555; text-decoration: underline; font-size: 16px; }
.sc-cmpt-remove:hover { color: #111; }

@media (max-width: 900px) {
  .sc-cmpm { padding: 56px 10px 20px; }
  .sc-cmpm-x { right: 10px; top: 10px; }
  .sc-cmpm-body { padding: 14px; }
  .sc-cmpt-row { grid-template-columns: 110px repeat(var(--n), minmax(170px, 1fr)); }
  .sc-cmpt-label, .sc-cmpt-cell { padding: 16px 10px; font-size: 13px; }
  .sc-cmpt-prod a.button { font-size: 13px !important; padding: 10px 6px !important; }
  .sc-cmpm-head > span { font-size: 17px; }
  .sc-cmpm-all { right: 14px; font-size: 13px; }
  .sc-cmp-fab { bottom: 84px; height: 42px; padding: 0 16px; font-size: 14px; }
}

/* ---------- toast ---------- */
.sc-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: #222; color: #fff; padding: 12px 22px; font-size: 14px; z-index: 3000; transition: opacity .4s; }
.sc-toast.out { opacity: 0; }

/* ---------- empty mini cart (reference wording) ---------- */
.sc-mc-empty { text-align: center; padding: 4px 0 6px; }
.sc-mc-empty .woocommerce-mini-cart__empty-message { margin: 6px 0 14px; font-size: 15px; }
.sc-mc-empty .sc-btn-line { display: block; padding: 12px 6px; border: 1px solid #222; color: #222; text-transform: uppercase; font-size: 14px; letter-spacing: .03em; }
.sc-mc-empty .sc-btn-line:hover { background: #222; color: #fff; }
.sc-nav .sc-mc-empty .sc-btn-line { color: #222; }
.sc-nav .sc-mc-empty .sc-btn-line:hover { color: #fff; }
