/* assets/css/mx-static-swatches.css */
/* ===== MX Static Swatches (clean + theme-proof) ===== */

.mx-static-swatches,
.mx-static-swatches *{
  box-sizing:border-box !important;
}

/* Header */
.mx-static-swatches{ margin:12px 0 !important; }
.mx-static-swatches__head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  margin-bottom:10px !important;
}
.mx-static-swatches__label{
  font-size:14px !important;
  font-weight:600 !important;
  line-height:1.2 !important;
}
.mx-static-swatches__selected{
  font-size:13px !important;
  line-height:1.2 !important;
  opacity:.9 !important;
}

/* Error */
.mx-static-swatches__error{
  margin:8px 0 !important;
  padding:8px 10px !important;
  border:1px solid rgba(220,0,0,.25) !important;
  background:rgba(220,0,0,.06) !important;
  border-radius:10px !important;
  font-size:13px !important;
}

/* Tabs */
.mx-static-swatches__tabs {
    display: flex !important;
    flex-wrap: wrap !important;   /* allows items to move to next line */
    overflow-x: hidden !important; 
    gap: 8px; /* spacing between tabs */
}


.mx-static-swatches__tab{
  appearance:none !important;
  -webkit-appearance:none !important;
   flex: 0 0 auto !important; 
 border:1px solid rgba(0,0,0,.14) !important;
  background:#fff !important;
  color:#000 !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  font-size:11px !important;
  line-height:1 !important;
  cursor:pointer !important;
  white-space:nowrap !important;
  margin:0 !important;
  font:inherit !important;
}
.mx-static-swatches__tab.is-active{
  background:#D3C2AF !important;
  border-color:#D3C2AF !important;
  color:#000 !important;
}
.mx-static-swatches__tab:focus-visible{
  outline:2px solid rgba(0,0,0,.55) !important;
  outline-offset:2px !important;
}

/* Panels */
.mx-static-swatches__panels{ margin-top:12px !important; }
.mx-static-swatches__panel[hidden]{ display:none !important; }

/* Grid — equal-height rows via align-items:stretch */
.mx-static-swatches__grid{
  display:grid !important;
  grid-template-columns:repeat(6, 1fr) !important;
  gap:5px !important;
  align-items:stretch !important;   /* all cards in a row same height */
}

/* ─── Swatch card ─────────────────────────────────────────── */
.mx-static-swatches .mx-static-swatch{
  appearance:none !important;
  -webkit-appearance:none !important;
  border:1px solid rgba(0,0,0,.12) !important;
  background:#fff !important;
  border-radius:12px !important;
  cursor:pointer !important;
  position:relative !important;

  /* Flex column so image + name stack cleanly */
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:6px !important;

  width:100% !important;
  height:100% !important;          /* stretch to grid row height */
  padding:4px !important;

  /* CRITICAL: never clip the name */
  overflow:visible !important;
  line-height:normal !important;
  aspect-ratio:auto !important;    /* no square constraint on card */

  font:inherit !important;
}
.mx-static-swatches .mx-static-swatch:hover{
  border-color:rgba(0,0,0,.25) !important;
}
.mx-static-swatches .mx-static-swatch:focus-visible{
  outline:2px solid rgba(0,0,0,.55) !important;
  outline-offset:2px !important;
}

form.cart button{
	font-size: 11px !important;
}

/* ─── Image box — always square ──────────────────────────── */
.mx-static-swatches .mx-static-swatch__box,
.mx-static-swatches .mx-static-swatch__fallback{
  display:block !important;
  width:100% !important;
  aspect-ratio:1 / 1 !important;
  height:auto !important;
  flex:0 0 auto !important;
  border-radius:10px !important;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  overflow:hidden !important;
}

/* ─── Name label — wraps, never clips ────────────────────── */
.mx-static-swatches .mx-static-swatch__name{
  /* Reset any box-style hiding */
  display:block !important;
  -webkit-line-clamp:unset !important;
  -webkit-box-orient:unset !important;

  flex:1 1 auto !important;        /* fills remaining card space */
  width:100% !important;

  font-size:10px !important;
  line-height:1.35 !important;
  text-align:center !important;
  color:#222 !important;
  text-transform:capitalize !important;

  /* Wrap long words, no overflow */
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:break-word !important;
  overflow:visible !important;

  /* Remove any fixed heights that cause clipping */
  min-height:unset !important;
  max-height:unset !important;

  padding:2px 0 4px !important;
  visibility:visible !important;
  opacity:1 !important;
}

/* ─── Selected state ─────────────────────────────────────── */
.mx-static-swatches .mx-static-swatch.is-active{
  border-color:rgba(0,0,0,.75) !important;
  box-shadow:0 0 0 2px rgba(0,0,0,.08) !important;
}
.mx-static-swatches .mx-static-swatch.is-active::before{
  content:"" !important;
  position:absolute !important;
  top:8px !important;
  right:10px !important;
  width:22px !important;
  height:22px !important;
  border-radius:999px !important;
  background:rgba(0,0,0,.80) !important;
  box-shadow:0 2px 6px rgba(0,0,0,.18) !important;
  z-index:3 !important;
  pointer-events:none !important;
}
.mx-static-swatches .mx-static-swatch.is-active::after{
  content:"" !important;
  position:absolute !important;
  top:16px !important;
  right:16px !important;
  width:8px !important;
  height:4px !important;
  border-left:2px solid #fff !important;
  border-bottom:2px solid #fff !important;
  transform:rotate(-45deg) !important;
  z-index:4 !important;
  pointer-events:none !important;
}

/* Note */
.mx-static-swatches-note{
  margin:12px 0 0 !important;
  font-size:13px !important;
  line-height:1.3 !important;
  opacity:.85 !important;
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 767px){
  .mx-static-swatches__grid{
    grid-template-columns:repeat(5, 1fr) !important;
  }
}
