.rex-swatch.selected {
  background-color: #233A77 !important;
  border: 1px solid #233A77;
  box-shadow: 0 0 0 2px rgba(35, 58, 119, 0.25);
}

.rex-option-button-item.selected {
  background-color: #233A77 !important;
  border: 1px solid #233A77;
  color: white !important;
}

.rex-option-list,
.rex-swatch-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
/* Color/image swatches: bigger gap, left-aligned to line up with the
   plate-size buttons above. */
.rex-swatch-options {
  gap: 10px;
  justify-content: flex-start;
}
/* Mobile: force a tidy grid so 9 swatches land as a balanced 5 + 4 block
   instead of a sparse wrapped row or a lonely centred pair. */
@media (max-width: 480px) {
  .rex-swatch-options {
    display: grid;
    grid-template-columns: repeat(5, max-content);
    justify-content: start;
  }
}
.rex-option-button-item {
  flex-basis: auto !important;
  background-color: white !important;
  border: none;
  font-size: 14px !important;
  padding: 4px 8px !important;
  border-radius: 3px;
  border: 1px solid rgb(221, 221, 221);
  color: #333333 !important;
  position: relative;
}

.rex-swatch {
  flex-basis: auto !important;

  height: 40px;
  width: 40px;
  background-color: white !important;
  border: none;
  padding: 3px !important;
  border-radius: 3px;
  border: 1px solid rgb(221, 221, 221);
  position: relative;
}

.rex-swatch:hover,
.rex-option-button-item:hover {
  transform: scale(1) !important;
}

.rex-swatch-color-fill,
.rex-swatch-image-item img {
  height: 100%;
  width: 100%;
  border-radius: 2px !important;
}

.rex-swatch:hover .rex-swatch-tooltip {
  opacity: 1;
  transform: translate(-50%, -120%);
}

.rex-swatch-tooltip {
  pointer-events: none;
  transition: all 0.2s;
  opacity: 0;
  position: absolute;
  background-color: #333333;
  z-index: 100;
  transform: translate(-50%, -80%);
  top: 0px;
  left: 50%;
  font-size: 14px;
  line-height: 1em;
  text-transform: capitalize;
  border-radius: 4px;
  padding: 4px 8px !important;
}

/* --- Product-page swatches (scoped so the side-cart picker #rexPickColor keeps
   its own style). Shared sizing + selected state below; shape per swatch type. --- */
.rex-swatch-options .rex-swatch {
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border-radius: 11px !important;
  border: 1px solid #D5DAE3 !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.rex-swatch-options .rex-swatch:hover {
  border-color: #A9B2C2 !important;
  transform: translateY(-1px) !important;
}
/* selected: navy ring via border recolour + outer glow — 1px border kept so the
   tile doesn't shift size on select */
.rex-swatch-options .rex-swatch.selected {
  background: #fff !important;
  border-color: #233A77 !important;
  /* white gap + solid navy ring — clearly visible on every colour incl. black */
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #233A77 !important;
}

/* Image (texture) tiles — rounded squares, texture fills edge-to-edge.
   The img rounds itself (no overflow:hidden on the button, so the hover
   tooltip isn't clipped). */
/* No name popup on hover/tap — the swatch texture speaks for itself
   (aria-label kept on the button for screen readers). */
.rex-swatch-options .rex-swatch-tooltip { display: none !important; }

.rex-swatch-options .rex-swatch-image-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block;
}

/* Colour dots — kept for any colour-type attribute: circular with a padding gap
   and a faint inner ring so light colours (white) don't merge with the page. */
.rex-swatch-options .rex-swatch-color-item {
  padding: 3px !important;
  border-radius: 50% !important;
}
.rex-swatch-options .rex-swatch-color-item .rex-swatch-color-fill {
  border-radius: 50% !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}

.rex-attributes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rex-attribute-label,
.rex-variation-label {
  padding-bottom: 4px;
  text-transform: uppercase;
  font-weight: bold;
  color: rgb(115, 115, 115);
  font-size: 14px;
}
/* 
rex-attribute-label
rex-attribute-options */
