/* File: templates/blocks/product-variations/style.css */
/* v2.7 — cleaner swatches, full text pills, instant selected states */

.pf-variations{
  --pf-var-accent:#f6d77f;
  --pf-var-accent-2:#ef4444;
  --pf-var-text:currentColor;
  --pf-var-muted:rgba(148,163,184,.95);
  --pf-var-border:rgba(148,163,184,.28);
  --pf-var-bg:rgba(255,255,255,.06);
  --pf-var-bg-hover:rgba(255,255,255,.11);
  display:block;
  max-width:100%;
}

.pf-var-row{margin:0 0 16px 0}
.pf-var-row:last-of-type{margin-bottom:0}

.pf-var-label{
  display:block;
  font-weight:700;
  margin:0 0 8px;
  line-height:1.25;
  color:var(--pf-var-text);
}

.pf-swatch-list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  max-width:100%;
  overflow:visible;
}

.pf-swatch{
  position:relative;
  width:auto;
  max-width:100%;
  min-width:fit-content;
  min-height:38px;
  padding:9px 14px;
  border:1px solid var(--pf-var-border);
  border-radius:12px;
  background:var(--pf-var-bg);
  color:inherit;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  line-height:1.15;
  font-size:14px;
  white-space:nowrap;
  overflow:visible;
  text-overflow:clip;
  font-weight:700;
  letter-spacing:.01em;
  box-sizing:border-box;
  transition:border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color:transparent;
}

.pf-swatch:hover:not(:disabled){
  background:var(--pf-var-bg-hover);
  border-color:rgba(246,215,127,.65);
  transform:translateY(-1px);
}

.pf-swatch:focus{outline:none}
.pf-swatch:focus-visible{outline:2px solid var(--pf-var-accent);outline-offset:2px}

.pf-swatch.is-selected{
  border-color:var(--pf-var-accent);
  background:rgba(246,215,127,.16);
  color:var(--pf-var-accent);
  box-shadow:0 0 0 3px rgba(246,215,127,.15), 0 12px 28px rgba(0,0,0,.18);
}

.pf-swatch.is-selected::after{
  content:"✓";
  position:absolute;
  top:-7px;
  right:-7px;
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:var(--pf-var-accent);
  color:#111;
  font-size:12px;
  font-weight:900;
  box-shadow:0 3px 10px rgba(0,0,0,.25);
}

.pf-swatch[disabled]{
  opacity:.36;
  cursor:not-allowed;
  filter:grayscale(100%);
  transform:none;
}

.pf-swatch.pf--color{
  width:42px;
  min-width:42px;
  height:42px;
  min-height:42px;
  padding:5px;
}
.pf-swatch-chip{
  display:block;
  width:26px;
  height:26px;
  border-radius:9px;
  border:2px solid rgba(255,255,255,.8);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);
}

.pf-swatch.pf--image{
  width:48px;
  min-width:48px;
  height:48px;
  min-height:48px;
  padding:4px;
  overflow:hidden;
}
.pf-swatch-img{
  display:block;
  width:100%;
  height:100%;
  border-radius:9px;
  object-fit:cover;
}

.pf-swatch-list.shape-circle .pf-swatch{border-radius:9999px}
.pf-swatch-list.shape-circle .pf-swatch-chip,
.pf-swatch-list.shape-circle .pf-swatch-img{border-radius:9999px}
.pf-swatch-list.shape-square .pf-swatch,
.pf-swatch-list.shape-square .pf-swatch-chip,
.pf-swatch-list.shape-square .pf-swatch-img{border-radius:6px}

.pf-variations.layout-buttons .pf-swatch.pf--text,
.pf-variations.layout-auto .pf-swatch.pf--text{
  width:auto;
  min-width:max-content;
  padding-left:14px;
  padding-right:14px;
}

.pf-var-msg{
  margin-top:10px;
  min-height:16px;
  font-size:13px;
  line-height:1.35;
  color:#ef4444;
}
.pf-variations.has-error .pf-var-msg{font-weight:700}

.pf-swatch-select{
  display:block;
  width:100%;
  max-width:360px;
  min-height:42px;
  padding:9px 42px 9px 14px;
  border:1px solid var(--pf-var-border);
  border-radius:12px;
  background:var(--pf-var-bg);
  color:inherit;
  font-size:14px;
  font-weight:650;
  box-sizing:border-box;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.pf-swatch-select:hover{background:var(--pf-var-bg-hover);border-color:rgba(246,215,127,.55)}
.pf-swatch-select:focus{border-color:var(--pf-var-accent);box-shadow:0 0 0 3px rgba(246,215,127,.15)}

@media (max-width:640px){
  .pf-swatch-list{gap:8px}
  .pf-swatch{min-height:36px;padding:8px 12px;font-size:13px}
}
