/* ===================================================================
   WT Moodboard — FULL CSS (re-written)
   =================================================================== */

/* ===== Base ===== */
.wtmb .wtmb-chip {
  border: 1px solid #ddd;
  border-radius: 9999px;
  padding: .2rem .55rem;
  font-size: .75rem;
  background: #fff;
}

.wtmb .wtmb-bar {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin: 12px 0;
}

.wtmb .wtmb-bar input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: .5rem .75rem;
}

.wtmb .wtmb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* ===== Cards ===== */
.wtmb .wtmb-card {
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.wtmb .wtmb-card__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f6f6f6;
}

.wtmb .wtmb-card__body {
  padding: .6rem .75rem;
}

.wtmb .wtmb-card__title {
  font-weight: 700;
  margin: 0 0 .25rem;
}

.wtmb .wtmb-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .4rem;
}

/* ===== Collage (board cover) ===== */
.wtmb .wtmb-collage {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), 1fr);
  grid-template-rows: repeat(var(--rows, 1), 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
}

.wtmb .wtmb-collage__cell {
  overflow: hidden;
}

.wtmb .wtmb-collage__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wtmb .wtmb-collage__more {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-weight: 700;
  border-radius: 9999px;
  padding: .2rem .5rem;
  font-size: .8rem;
}

/* ===== Single board ===== */
.wtmb .wtmb-board {
  margin-top: 18px;
}

.wtmb .wtmb-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.wtmb .wtmb-prod {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.wtmb .wtmb-prod a.thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f7f7f7;
}

.wtmb .wtmb-prod .body {
  padding: .55rem .6rem;
}

.wtmb .wtmb-prod .title {
  font-weight: 600;
  margin-bottom: .25rem;
}

/* ------------------------------------------------------------------
   QUICK-SAVE HEART — Pill in the top-right (archive + PDP), desktop only
   ------------------------------------------------------------------ */

/* 0) Make sure product cards/galleries are positioning contexts */
ul.products li.product,
ul.products li.product .box-image,
.product-small .box-image,
.products .box-image,
.single-product .woocommerce-product-gallery,
.single-product .product-gallery,
.single-product .woo-variation-product-gallery {
  position: relative;
}

/* 1) Base pill look for the quick-save button (works anywhere) */
.wtmb-save-to-board.wtmb-quick-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 28px;
  padding: 0;
  border: 1px solid #d7dce2;
  background: #fff;
  border-radius: 9999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  cursor: pointer;
  line-height: 1;
  text-rendering: optimizeLegibility;
  opacity: .50;
  transition: opacity .15s ease, border-color .15s ease, transform .05s ease;
  z-index: 999; /* stay above swatches/overlays */
  font-size: 0; /* hide any text inside */
}

/* 2) Pin to top-right on ARCHIVE/CATEGORY cards */
ul.products li.product .wtmb-save-to-board.wtmb-quick-save {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* 3) Pin to top-right on PDP gallery */
.single-product .wtmb-save-to-board.wtmb-quick-save {
  position: absolute;
  top: 12px;
  right: 12px;
}

/* 4) Draw the heart purely with CSS so markup can stay "♡" or text */
.wtmb-save-to-board.wtmb-quick-save::before {
  content: "♡";
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #111;
  transform: translateY(-.5px);
}

/* 5) Hover clarification (desktop pointers only) */
@media (hover: hover) {
  .wtmb-save-to-board.wtmb-quick-save:hover {
    opacity: .85;
    border-color: #b8bec7;
  }
}

/* 6) Saved states — filled heart + full opacity. */
.wtmb-save-to-board.wtmb-quick-save.is-saved,
.wtmb-save-to-board.wtmb-quick-save[aria-pressed="true"],
.wtmb-save-to-board.wtmb-quick-save.active {
  opacity: 1;
  border-color: #111;
}

.wtmb-save-to-board.wtmb-quick-save.is-saved::before,
.wtmb-save-to-board.wtmb-quick-save[aria-pressed="true"]::before,
.wtmb-save-to-board.wtmb-quick-save.active::before {
  content: "♥";
}

/* 7) Desktop-only behavior (and respect your wtmb-only-desktop helper class) */
@media (max-width: 1023px) {
  .wtmb-save-to-board.wtmb-quick-save,
  .wtmb-only-desktop {
    display: none !important;
  }
}

/* 8) Guard against accidental nested buttons (bad HTML from some builders) */
.wtmb-save-to-board .wtmb-save-to-board {
  display: none !important;
}

/* PDP "Save to Board" pill (not the small quick-save heart) */
.single-product .wtmb-save-to-board.button.bh-save-btn:not(.wtmb-quick-save){
  background-color:#f54e4e !important;            /* neutral gray pill to complement coral/blue */
  border:none !important;
  color:#fff !important;
  font-size:.9em; font-weight:700; text-transform:uppercase; letter-spacing:.02em;
  padding:.6em 1.4em !important; border-radius:9999px !important; line-height:1.2;
  display:inline-block; cursor:pointer; box-shadow:none;
  transition:background-color .2s, transform .1s;
}
.single-product .wtmb-save-to-board.button.bh-save-btn:not(.wtmb-quick-save):hover{
  background-color:#d63f3f !important;
  transform:translateY(-1px);
}

/* (optional) If you want it BLUE like "Request Price Match", swap colors:
.single-product .wtmb-save-to-board.button.bh-save-btn:not(.wtmb-quick-save){ background-color:#2f6ecb !important; }
.single-product .wtmb-save-to-board.button.bh-save-btn:not(.wtmb-quick-save):hover{ background-color:#255aab !important; }
*/


/* ===== Modal ===== */
.wtmb-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.wtmb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
}

.wtmb-modal__dialog {
  position: relative;
  max-width: 460px;
  margin: 8vh auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
  padding: 18px;
}

.wtmb-modal__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.wtmb-modal__close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.wtmb-modal__section {
  margin: 10px 0;
}

.wtmb-label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.wtmb-input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: .5rem .6rem;
}

.wtmb-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.wtmb-modal__sep {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
}

.wtmb-modal__sep span {
  font-size: .8rem;
  color: #999;
}

.wtmb-note {
  color: #d33;
  font-size: .85rem;
  margin-top: 6px;
}



/* ===== Toast (share link created) ===== */
.wtmb-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 999999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

.wtmb-toast__inner {
  padding: 12px;
  width: min(480px, 90vw);
}

/* ===== Print styles ===== */
@media print {
  .wtmb .wtmb-actions,
  .wtmb .wtmb-chip,
  .wtmb-modal,
  .wtmb-toast {
    display: none !important;
  }

  .wtmb .wtmb-grid,
  .wtmb .wtmb-list {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  a[href]:after {
    content: "";
  }

  body {
    background: #fff;
  }
}
