/**
 * Briin Wishlist — Estilos
 *
 * Override --bw-* CSS vars no tema para customizar cores.
 */
:root {
  --bw-primary:        #1E3AE8;
  --bw-primary-dark:   #1530C0;
  --bw-primary-light:  #EEF1FD;
  --bw-text:           #0F172A;
  --bw-text-muted:     #475569;
  --bw-text-subtle:    #94A3B8;
  --bw-border:         #E2E8F0;
  --bw-bg:             #F8FAFC;
  --bw-success:        #15803D;
  --bw-success-bg:     #DCFCE7;
  --bw-error:          #DC2626;
  --bw-error-bg:       #FEE2E2;
  --bw-card-bg:        #FFFFFF;
  --bw-radius:         12px;
  --bw-radius-sm:      8px;
  --bw-shadow:         0 1px 3px rgba(0,0,0,.06);
  --bw-shadow-hover:   0 8px 32px rgba(30,58,232,.1),0 2px 8px rgba(0,0,0,.06);
}

/* ── Heart Button (loop + pdp) ───────────────────────── */
.bw-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255,255,255,.92);
  color: var(--bw-text-muted);
  border: 1px solid var(--bw-border);
  border-radius: 99px;
  cursor: pointer;
  padding: 0;
  transition: all .15s;
  font-family: inherit;
}
.bw-toggle-loop {
  width: 36px; height: 36px;
  position: absolute; top: 12px; right: 12px;
  z-index: 5;
}
.bw-toggle-pdp {
  padding: 8px 14px;
  background: #fff;
  color: var(--bw-text-muted);
  border-color: var(--bw-border);
  border-radius: var(--bw-radius-sm);
  font-size: 13px; font-weight: 600;
  width: 100%; margin-top: 8px;
}
.bw-toggle:hover {
  border-color: var(--bw-primary);
  color: var(--bw-primary);
  background: var(--bw-primary-light);
}
.bw-toggle.is-wishlisted,
.bw-toggle[aria-pressed="true"] {
  background: var(--bw-primary);
  color: #fff;
  border-color: var(--bw-primary);
}
.bw-toggle.is-wishlisted svg,
.bw-toggle[aria-pressed="true"] svg {
  fill: #fff;
}
.bw-toggle:disabled {
  opacity: .6; cursor: not-allowed;
}

/* ── Empty state ─────────────────────────────────────── */
.bw-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--bw-text-muted);
}
.bw-empty svg { opacity: .3; color: var(--bw-primary); display: block; margin: 0 auto 16px; }
.bw-empty h3 {
  font-size: 18px; font-weight: 700; color: var(--bw-text);
  margin: 0 0 8px;
}
.bw-empty p { font-size: 14px; margin-bottom: 24px; }

/* ── Toolbar ─────────────────────────────────────────── */
.bw-wrap { font-family: inherit; }
.bw-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.bw-title {
  font-size: 17px; font-weight: 800; color: var(--bw-text);
  margin: 0; letter-spacing: -.3px;
}
.bw-title .bw-count {
  font-weight: 400; color: var(--bw-text-subtle); margin-left: 4px;
}
.bw-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 16px;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  border-radius: var(--bw-radius-sm);
  cursor: pointer; transition: all .15s;
  text-decoration: none; border: none;
  font-family: inherit; white-space: nowrap;
}
.bw-btn-primary {
  background: var(--bw-primary); color: #fff;
}
.bw-btn-primary:hover {
  background: var(--bw-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,58,232,.25);
}
.bw-btn-secondary {
  background: #fff; color: var(--bw-text-muted);
  border: 1.5px solid var(--bw-border);
}
.bw-btn-secondary:hover {
  border-color: var(--bw-primary); color: var(--bw-primary);
  background: var(--bw-primary-light);
}

/* ── Tabela ──────────────────────────────────────────── */
.bw-table {
  width: 100%;
  background: var(--bw-card-bg);
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  border-collapse: separate; border-spacing: 0;
  overflow: hidden;
}
.bw-table thead th {
  background: var(--bw-bg);
  color: var(--bw-text); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--bw-border);
  white-space: nowrap;
}
.bw-table tbody td {
  padding: 18px 16px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 14px; color: #334155; vertical-align: middle;
}
.bw-table tbody tr:last-child td { border-bottom: none; }

.bw-col-check { width: 30px; }
.bw-col-img { width: 100px; position: relative; padding-right: 0; }
.bw-col-img img {
  width: 78px; height: 78px;
  object-fit: cover; object-position: top center;
  border-radius: 10px; border: 1px solid var(--bw-border);
  display: block;
}
.bw-col-name { min-width: 240px; width: 38%; }
.bw-col-name a {
  color: var(--bw-text); font-weight: 600; font-size: 14.5px;
  text-decoration: none;
}
.bw-col-name a:hover { color: var(--bw-primary); }
.bw-col-price {
  font-weight: 700; color: var(--bw-primary);
  font-size: 15px; white-space: nowrap;
}
.bw-col-date {
  color: var(--bw-text-muted); font-size: 13px; white-space: nowrap;
}
.bw-col-stock {
  width: 60px; text-align: center; font-size: 0; line-height: 0;
}
.bw-col-stock::before {
  content: ''; display: inline-flex;
  align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 99px;
  font-size: 14px; line-height: 1; font-weight: 700;
}
.bw-col-stock.in-stock::before {
  background: var(--bw-success-bg); color: var(--bw-success);
  content: '\2714';
}
.bw-col-stock.out-of-stock::before {
  background: var(--bw-error-bg); color: var(--bw-error);
  content: '\2715';
}

.bw-col-action { width: 60px; text-align: center; }
.bw-btn-cart {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 99px;
  background: var(--bw-primary); color: transparent;
  border: none; cursor: pointer; overflow: hidden;
  font-size: 0; line-height: 0;
  transition: all .15s;
  display: inline-block; vertical-align: middle;
}
.bw-btn-cart svg {
  position: absolute; inset: 0; margin: auto;
  color: #fff; width: 18px; height: 18px;
}
.bw-btn-cart:hover {
  background: var(--bw-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,58,232,.25);
}

.bw-remove {
  position: absolute; top: 14px; left: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 99px;
  background: rgba(15,23,42,.85); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background .15s, transform .15s;
}
.bw-remove:hover { background: var(--bw-error); transform: scale(1.08); }

.bw-table tfoot td {
  padding: 16px;
  background: var(--bw-bg);
  border-top: 1px solid var(--bw-border);
}

.bw-table input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--bw-primary); cursor: pointer;
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .bw-toolbar { flex-direction: column; align-items: flex-start; }
  .bw-table thead { display: none; }
  .bw-table tbody tr {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 4px 14px;
    padding: 14px;
    border-bottom: 1px solid #F1F5F9;
  }
  .bw-table tbody td {
    border: none; padding: 2px 0;
  }
  .bw-col-img { grid-row: 1 / span 5; padding-right: 0; }
  .bw-col-action { grid-column: 1 / -1; margin-top: 10px; text-align: left; }
}

/* ── Wishlist public (shared) ────────────────────────── */
.bw-public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.bw-public-card {
  display: block;
  background: var(--bw-card-bg);
  border: 1px solid var(--bw-border);
  border-radius: var(--bw-radius);
  overflow: hidden;
  text-decoration: none; color: var(--bw-text);
  transition: all .2s;
}
.bw-public-card:hover {
  transform: translateY(-4px); box-shadow: var(--bw-shadow-hover);
}
.bw-public-card img {
  width: 100%; aspect-ratio: 3/4;
  object-fit: cover; object-position: top center;
}
.bw-public-body { padding: 14px; }
.bw-public-name { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.bw-public-price { font-size: 15px; font-weight: 800; color: var(--bw-primary); margin: 0; }

/* ── Toast ──────────────────────────────────────────── */
#bw-toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: calc(100vw - 48px);
}
.bw-toast {
  background: var(--bw-text); color: #fff;
  padding: 14px 18px; border-radius: 10px;
  display: flex; align-items: center; gap: 14px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  opacity: 0; transform: translateX(20px);
  transition: opacity .25s, transform .25s;
  pointer-events: auto; min-width: 280px; max-width: 400px;
}
.bw-toast.is-visible { opacity: 1; transform: translateX(0); }
.bw-toast--success { background: var(--bw-success); }
.bw-toast--info    { background: var(--bw-primary); }
.bw-toast--error   { background: var(--bw-error); }
.bw-toast-msg { flex: 1; line-height: 1.4; }
.bw-toast-action {
  color: #fff; background: rgba(255,255,255,.2);
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700; text-decoration: none;
  white-space: nowrap; transition: background .15s;
}
.bw-toast-action:hover { background: rgba(255,255,255,.3); color: #fff; }

@media (max-width: 540px) {
  #bw-toast-container { left: 16px; right: 16px; bottom: 16px; }
  .bw-toast { min-width: 0; width: 100%; }
}

/* ── Share dialog ────────────────────────────────────── */
.bw-share-modal {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(15,23,42,.55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.bw-share-modal.is-open { display: flex; }
.bw-share-box {
  background: #fff; border-radius: var(--bw-radius);
  padding: 28px; max-width: 460px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.bw-share-box h3 { font-size: 17px; font-weight: 800; margin: 0 0 14px; color: var(--bw-text); }
.bw-share-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--bw-border); border-radius: var(--bw-radius-sm);
  font-size: 13px; color: var(--bw-text);
  font-family: inherit; margin-bottom: 12px;
}
.bw-share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bw-share-actions .bw-btn { flex: 1; min-width: 120px; }

