/* Al Arwa variation swatches: visible Color / Size options (v2.1.2). */
form.variations_form.arwa-swatches-ready table.variations .arwa-swatch-select-hidden,
form.variations_form.arwa-swatches-ready .variations .arwa-swatch-select-hidden{
  display:none !important;
}

form.variations_form.arwa-swatches-ready table.variations td.value,
form.variations_form.arwa-swatches-ready .variations .value{
  position:relative;
}

.arwa-swatches{
  --arwa-swatch-green:var(--arwa-green,#1F3D2F);
  --arwa-swatch-cream:var(--arwa-cream,#F5EFE4);
  --arwa-swatch-ivory:var(--arwa-ivory,#FBF8F2);
  --arwa-swatch-sand:var(--arwa-sand,#E9DDCA);
  --arwa-swatch-line:var(--arwa-line,#E4D8C4);
  --arwa-swatch-muted:var(--arwa-muted,#6B665C);
  --arwa-swatch-text:var(--arwa-text,#2B2B28);
  --arwa-swatch-sans:var(--arwa-sans,"Inter",Arial,sans-serif);
  display:flex;
  flex-wrap:wrap;
  gap:10px 10px;
  align-items:flex-start;
  margin:4px 0 8px;
  max-width:100%;
}

.arwa-swatch{
  appearance:none;
  -webkit-appearance:none;
  margin:0;
  font:500 12px/1.2 var(--arwa-swatch-sans);
  color:var(--arwa-swatch-green);
  background:transparent;
  border:0;
  padding:0;
  cursor:pointer;
  position:relative;
}

.arwa-swatch.is-disabled,
.arwa-swatch:disabled{
  cursor:not-allowed;
  opacity:.42;
  filter:grayscale(.55);
}

/* ---- Color image swatches ---- */
.arwa-swatch--image{
  width:44px;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  background:transparent;
}
.arwa-swatch--image .arwa-swatch__face{
  display:block;
  width:44px;
  height:44px;
  border-radius:50%;
  overflow:hidden;
  border:2px solid var(--arwa-swatch-sand);
  background:var(--arwa-swatch-cream);
  box-sizing:border-box;
  box-shadow:0 0 0 2px var(--arwa-swatch-ivory);
  transition:border-color .15s ease, box-shadow .15s ease;
}
.arwa-swatch--image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}
.arwa-swatch--image.is-selected .arwa-swatch__face{
  border-color:var(--arwa-swatch-green);
  box-shadow:0 0 0 2px var(--arwa-swatch-ivory),0 0 0 4px var(--arwa-swatch-green);
}
.arwa-swatch--image:hover:not(.is-disabled):not(:disabled) .arwa-swatch__face,
.arwa-swatch--image:focus-visible .arwa-swatch__face{
  border-color:var(--arwa-swatch-green);
}

/* Name: tooltip on desktop, always below on small screens. */
.arwa-swatch__name{
  position:absolute;
  left:50%;
  top:calc(100% + 8px);
  transform:translateX(-50%);
  z-index:5;
  min-width:max-content;
  max-width:180px;
  padding:5px 8px;
  border-radius:4px;
  background:var(--arwa-swatch-green);
  color:#fff;
  font:500 11px/1.3 var(--arwa-swatch-sans);
  text-align:center;
  white-space:normal;
  opacity:0;
  pointer-events:none;
  box-shadow:0 4px 12px rgba(20,42,32,.18);
}
.arwa-swatch__name::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:100%;
  margin-left:-5px;
  border:5px solid transparent;
  border-bottom-color:var(--arwa-swatch-green);
}
.arwa-swatch--image:hover:not(.is-disabled) .arwa-swatch__name,
.arwa-swatch--image:focus-visible .arwa-swatch__name{
  opacity:1;
}

/* ---- Text pills (Size, Pack, etc.) ---- */
.arwa-swatch--pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  min-width:44px;
  padding:0 14px;
  border:1px solid var(--arwa-swatch-line);
  border-radius:4px;
  background:#fff;
  color:var(--arwa-swatch-green);
  letter-spacing:.02em;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.arwa-swatch--pill.is-selected{
  border-color:var(--arwa-swatch-green);
  background:var(--arwa-swatch-green);
  color:#fff;
}
.arwa-swatch--pill:hover:not(.is-disabled):not(:disabled):not(.is-selected),
.arwa-swatch--pill:focus-visible:not(.is-selected){
  border-color:var(--arwa-swatch-green);
  background:var(--arwa-swatch-cream);
}

/* Selected name beside the attribute label: "Color: Black" */
.arwa-chosen{
  font-weight:500;
  color:var(--arwa-swatch-text);
}
.arwa-chosen:not(.is-set),
.arwa-chosen-sep:not(.is-set){
  display:none;
}
.arwa-chosen.is-set,
.arwa-chosen-sep.is-set{
  display:inline;
}


/* Stack the attribute label above the options on small screens so
   colour swatches can wrap across the full product column. */
@media (max-width:768px){
  form.variations_form.arwa-swatches-ready table.variations,
  form.variations_form.arwa-swatches-ready table.variations tbody,
  form.variations_form.arwa-swatches-ready table.variations tr,
  form.variations_form.arwa-swatches-ready table.variations th.label,
  form.variations_form.arwa-swatches-ready table.variations td.value{
    display:block;
    width:100%;
  }
  form.variations_form.arwa-swatches-ready table.variations th.label{
    padding:12px 0 4px;
    white-space:normal;
  }
  form.variations_form.arwa-swatches-ready table.variations td.value{
    padding:4px 0 12px;
  }
}

@media (max-width:768px){
  .arwa-swatches--color{
    gap:12px 8px;
  }
  .arwa-swatch--image{
    width:64px;
  }
  .arwa-swatch__name{
    position:static;
    transform:none;
    left:auto;
    top:auto;
    opacity:1;
    max-width:64px;
    min-width:0;
    margin-top:6px;
    padding:0;
    background:none;
    color:var(--arwa-swatch-muted);
    box-shadow:none;
    font-size:10px;
    line-height:1.25;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .arwa-swatch__name::before{ display:none; }
  .arwa-swatch--image.is-selected .arwa-swatch__name{
    color:var(--arwa-swatch-green);
    font-weight:600;
  }
}

@media (prefers-reduced-motion:reduce){
  .arwa-swatch--image .arwa-swatch__face,
  .arwa-swatch--pill{
    transition:none;
  }
}
