/* variant-picker.css : sob rule .vp- prefix. Brand colour = #7b1d35 */
.vp{margin:18px 0 8px;display:grid;gap:16px}
.vp-group{border:0;margin:0;padding:0;min-width:0}
.vp-legend{padding:0;margin-bottom:8px;font-size:14px;font-weight:600;color:#231a1c}
.vp-chosen{font-weight:400;color:#7a6d70}
.vp-values{display:flex;flex-wrap:wrap;gap:8px}

.vp-val{position:relative;min-width:46px;height:42px;padding:0 14px;border:1.5px solid #ddd3d0;
  border-radius:10px;background:#fff;color:#231a1c;font:inherit;font-size:14px;cursor:pointer;
  overflow:hidden;-webkit-tap-highlight-color:transparent;transition:border-color .15s,background .15s}
.vp-val:hover{border-color:#b9a9ad}
.vp-val:focus-visible{outline:3px solid rgba(123,29,53,.3);outline-offset:2px}
.vp-val.is-on{border-color:#7b1d35;background:#f8ecea;color:#7b1d35;font-weight:600}

/* Stock-out combination: dashed + cross line */
.vp-val.is-out{color:#b5a9ac;border-style:dashed;cursor:not-allowed;background:#fafafa}
.vp-val.is-out::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to top right,transparent calc(50% - 1px),#c9bcc0 50%,transparent calc(50% + 1px))}

/* Color swatch: dot + name */
.vp-val--color{display:inline-flex;align-items:center;gap:8px;padding:0 14px 0 8px}
.vp-dot{width:22px;height:22px;flex:none;border-radius:50%;border:1px solid rgba(0,0,0,.18)}

.vp-stock{margin:0;font-size:13px;color:#7a6d70}
.vp-stock:empty{display:none}
.vp-stock.is-low{color:#b45309}
.vp-stock.is-none{color:#c62f3e}
.vp-error{display:none;margin:0;font-size:13px;color:#c62f3e}
.vp.has-error .vp-error{display:block}
.vp.has-error .vp-val:not(.is-on):not(.is-out){border-color:#e7a3aa}

.vp.shake{animation:vp-shake .35s}
@keyframes vp-shake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
@media (prefers-reduced-motion:reduce){.vp.shake{animation:none}}

/* ===== List mode v2 (compact) ===== */
/* পুরনো picker group, error আর মূল qty stepper লুকাও */
[data-vp-mode="list"] #variant-picker .vp-group,
[data-vp-mode="list"] #variant-picker .vp-error,
[data-vp-mode="list"] #variant-picker .vp-stock,
[data-vp-mode="list"] [data-vp-qty-wrap] { display: none !important; }

.vl { margin: 12px 0; }
.vl__label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.vl__label small { font-weight: 400; color: #8a8a8a; margin-left: 8px; font-size: 11px; }

/* Chip / circle row */
.vl__chips { display: flex; flex-wrap: wrap; gap: 12px; }
.vl__chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border: 1.5px solid #ddd5d3; border-radius: 999px;
  background: #fff; font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.vl__chip.is-swatch { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
.vl__chip.is-on { border-color: #7b1d35; box-shadow: 0 0 0 3px #f8ecea; }

/* রঙের গোল (সাদা রঙ যেন দেখা যায়, তাই inset border) */
.vl__dot { width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--c, #ccc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.is-swatch .vl__dot { width: 28px; height: 28px; }

/* qty badge */
.vl__badge { position: absolute; top: -7px; right: -7px; display: none;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #7b1d35; color: #fff; font: 600 11px/18px inherit; text-align: center; font-style: normal; }
.vl__chip.is-on .vl__badge { display: block; }

/* Sold out: কাটা দাগ */
.vl__chip.is-out { opacity: .45; cursor: not-allowed; overflow: hidden; }
.vl__chip.is-out::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), #888 50%, transparent calc(50% + 1px)); }

/* Selected line (পাতলা) */
.vl__sel { display: grid; gap: 6px; margin-top: 10px; }
.vl__sel:empty { display: none; }
.vl__line { display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 10px;
  background: #f8ecea; border-radius: 10px; }
.vl__line .vl__dot { width: 16px; height: 16px; }
.vl__name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl__name span { font-weight: 400; color: #6b6b6b; margin-left: 8px; font-size: 12px; }
.vl__step { display: inline-flex; align-items: center; background: #fff; border-radius: 8px;
  box-shadow: inset 0 0 0 1px #e0d6d4; }
.vl__step button { width: 32px; height: 32px; border: 0; background: none; font-size: 17px; cursor: pointer; }
.vl__step output { min-width: 24px; text-align: center; font-weight: 600; font-size: 13px; }
.vl__rm { width: 28px; height: 28px; border: 0; background: none; color: #8a6b72; font-size: 13px; cursor: pointer; }

.vl__total { margin-top: 8px; font-weight: 600; color: #7b1d35; font-size: 14px; }
.vl__total:empty { display: none; }
.vl__err { margin-top: 6px; color: #b3261e; font-size: 13px; }
.vl--shake { animation: vl-shake .35s; }
@keyframes vl-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

@media (max-width: 480px) {
  .vl__label small { display: block; margin: 2px 0 0; }
  .vl__step button { width: 36px; height: 36px; }   /* thumb-friendly */
}
