.swatches {
  --swatch-size: 3.2rem;
  --swatch-radius: 9999px;
  margin: calc(var(--swatch-spacing, .6rem) * -1);
}

.swatches li {
  padding: var(--swatch-spacing, .6rem);
  cursor: pointer;
}

@media (hover: hover) {
  .swatches li:hover .swatch-color:after,
  .swatches li:hover .swatch-color:before {
    opacity: 1;
  }
}

.swatches--product-card {
  --swatch-spacing: .4rem;
  --swatch-size: 2.4rem;
}

.swatches input:is([type=checkbox], [type=radio]):is(:disabled, .disabled) + .swatch-color:after {
  background: linear-gradient(to bottom right, transparent calc(50% - .5px), var(--color-foreground-lighten-19) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
  opacity: 1;
  box-shadow: none;
}

.swatch-color {
  background-color: var(--swatch-background);
  background-position: var(--swatch-focal-point, 50%);
  background-size: cover;
  width: var(--swatch-size);
  height: var(--swatch-size);
  border-radius: var(--swatch-radius);
  position: relative;
  border: .1rem solid rgb(var(--color-border));
}

.swatch-color:after,
.swatch-color:before {
  position: absolute;
  content: "";
  box-shadow: inset 0 0 0 var(--shadow-width) var(--shadow-color);
  border-radius: inherit;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transition: opacity var(--animation-default);
  opacity: 0;
}

.swatch-color:after {
  --shadow-color: rgb(var(--color-foreground));
  --shadow-width: .1rem;
}

.swatch-color:before {
  --shadow-color: rgb(var(--color-background));
  --shadow-width: .5rem;
}

:checked + .swatch-color:after,
:checked + .swatch-color:before {
  opacity: 1;
}

input[value="Beige" i] + label { --swatch-background: #CFC3B8; }
input[value="Black" i] + label { --swatch-background: #2A2C2F; }
input[value="Blue" i] + label { --swatch-background: #4A5E69; }
input[value="Brown" i] + label { --swatch-background: #75604C; }
input[value="Dark grey" i] + label { --swatch-background: #B7B5B1; }
input[value="Dark_grey" i] + label { --swatch-background: #B7B5B1; }
input[value="Gold" i] + label { --swatch-background: #D4B572; }
input[value="Green" i] + label { --swatch-background: #94978B; }
input[value="Light grey" i] + label { --swatch-background: #E4E4E0; }
input[value="Mustard" i] + label { --swatch-background: #81652F; }
input[value="Orange" i] + label { --swatch-background: #8E4D0B; }
input[value="Pink" i] + label { --swatch-background: #D0A1B1; }
input[value="Red wine" i] + label { --swatch-background: #5D2A1B; }
input[value="White" i] + label { --swatch-background: #F6F6F6; }
input[value="Wood" i] + label { --swatch-background: #C29E7F; }

.form-field ~ .form-field {
  margin-top: 1.6rem;
}

@media (min-width: 768px) {
  .form-field ~ .form-field {
    margin-top: 2.4rem;
  }
}

.form-footer {
  margin-top: 3.2rem;
}

@media (max-width: 767.98px) {
  .form-footer {
    margin-top: 2.4rem;
  }
}

.form-group {
  display: flex;
  align-items: center;
}

.form-group > * + * {
  margin-inline-start: 1.2rem;
}

.form-control {
  outline: none;
  box-shadow: none;
  color: rgb(var(--color-field-text));
  background-color: rgb(var(--color-field));
  border: 1px solid rgb(var(--color-border));
  border-radius: var(--inputs-radius);
  line-height: calc(var(--buttons-height) - var(--inputs-border-width) * 2);
  padding: 0 1.6rem;
  width: 100%;
  font-family: var(--font-body-family);
  font-weight: var(--font-body-weight);
  font-size: var(--font-body-size);
  transition: .3s border-color, .3s box-shadow;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  vertical-align: middle;
}

.form-control--textarea {
  resize: vertical;
  line-height: 2.4rem;
  padding: 1rem 1.6rem;
  border-radius: var(--textareas-radius);
  min-height: 8rem;
}

.form-control:focus,
.form-control:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .1rem rgb(var(--color-foreground));
}

.form-control::placeholder {
  color: rgba(var(--color-field-text), .5);
}

.form-control::selection {
  background-color: rgba(var(--color-field-text), .2);
}

.form-message {
  display: flex;
  font-size: var(--font-body-size);
}

.form-field .form-message {
  margin-top: .8rem;
}

.form-message--small {
  font-size: calc(var(--font-body-size) * .9);
  line-height: 2.2rem;
}

.form-message svg {
  margin-inline-end: .4rem;
  transform: translateY(.3rem);
  flex-shrink: 0;
}

.form-label {
  margin: 0 0 .8rem;
  display: block;
}

.form-control--select {
  padding-inline-end: 4.8rem;
  cursor: pointer;
}

.form-control--select ~ .icon {
  position: absolute;
  inset-block-start: calc(50% - var(--icon-size, 1rem));
  inset-inline-end: 1.6rem;
  pointer-events: none;
}

.select {
  display: flex;
  position: relative;
  width: 100%;
}

input:is([type=checkbox], [type=radio]) {
  --active: rgb(var(--color-foreground));
  --active-inner: rgb(var(--color-background));
  --focus: .3rem rgba(var(--ratio-color-44-rgb), 0.1);
  --border: rgba(var(--color-foreground), .4);
  --border-radius: .3rem;
  --border-hover: rgb(var(--color-foreground));
  --background: rgb(var(--color-background));
  -webkit-appearance: none;
  appearance: none;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--b, var(--background));
  border: 1px solid var(--bc, var(--border));
  cursor: pointer;
  display: inline-block;
  margin: 0;
  outline: none;
  position: relative;
  vertical-align: top;
  border-radius: var(--border-radius);
  flex: 0 0 auto;
}

@media (hover: hover) {
  input:is([type=checkbox], [type=radio]) {
    transition: background-color .3s, border-color .3s, box-shadow .2s;
  }
}

input:is([type=checkbox], [type=radio]):after {
  content: "";
  display: block;
  position: absolute;
  border: 1.5px solid var(--active-inner);
  border-inline-start: 0;
  border-block-start: 0;
  width: .4rem;
  height: .8rem;
  inset-inline-start: .6rem;
  inset-block-start: .3rem;
  transform: rotate(43deg);
}

input:is([type=checkbox], [type=radio]):checked {
  --b: var(--active);
  --bc: var(--active);
}

@media (hover: hover) {
  input:is([type=checkbox], [type=radio]):hover:not(:checked, :disabled, .disabled) {
    --bc: var(--border-hover);
  }
}

input:is([type=checkbox], [type=radio]):focus:not(:checked, :disabled, .disabled) {
  --bc: var(--border-hover);
}

input:is([type=checkbox], [type=radio]) + label {
  cursor: pointer;
}

input:is([type=checkbox], [type=radio]):is(:disabled, .disabled),
input:is([type=checkbox], [type=radio]):is(:disabled, .disabled) + label {
  cursor: not-allowed;
  opacity: .6;
}

input:is([type=checkbox], [type=radio]):focus-visible + label {
  outline: .2rem solid rgb(var(--color-keyboard-focus));
  outline-offset: .2rem;
}

input:is([type=checkbox], [type=radio]):focus {
  box-shadow: 0 0 0 3px #1717171a;
}

input:is([type=radio]) {
  --border-radius: 50%;
}

input:is([type=radio]):after {
  width: .6rem;
  height: .6rem;
  inset-inline-start: .5rem;
  inset-block-start: .5rem;
  border: none;
  background: var(--active-inner);
  border-radius: var(--border-radius);
}

.quantity {
  --quantity-border-width: 1px;
  color: rgba(var(--color-foreground));
  position: relative;
  width: 12.5rem;
  display: flex;
  border-radius: var(--inputs-radius);
  min-height: var(--buttons-height);
}

.quantity__input {
  color: currentColor;
  font-family: var(--font-body-family);
  font-style: var(--font-body-style);
  font-weight: var(--font-body-weight);
  box-shadow: 0 0 0 var(--quantity-border-width) rgb(var(--color-border));
  font-size: var(--font-body-size);
  text-align: center;
  background-color: transparent;
  border: 0;
  padding-inline: var(--quantity-button-width, 4.5rem);
  width: 100%;
  flex-grow: 1;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--inputs-radius);
}

.quantity__input:-webkit-autofill,
.quantity__input:-webkit-autofill:active {
  box-shadow: 0 0 0 10rem rgb(var(--color-background)) inset !important;
}

@media (hover: hover) {
  .quantity__input:-webkit-autofill:hover {
    box-shadow: 0 0 0 10rem rgb(var(--color-background)) inset !important;
  }
}

.quantity__input::-webkit-outer-spin-button,
.quantity__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity__input[type=number] {
  -moz-appearance: textfield;
}

.quantity__button {
  width: var(--quantity-button-width, 4.5rem);
  flex-shrink: 0;
  font-size: 1.8rem;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--color-foreground));
  padding: 0;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

.quantity__button[name=plus] {
  left: auto;
  right: 0;
}

.quantity__button svg {
  width: 1.4rem;
  pointer-events: none;
}

.quantity__button:focus-visible,
.quantity__input:focus-visible {
  outline: .1rem solid rgb(var(--color-foreground));
  outline-offset: 0;
}

@supports (-webkit-overflow-scrolling: touch) {
  .form-control {
    font-size: 1.6rem !important;
  }
}

.disclosure {
  position: relative;
  display: inline-block;
}

.disclosure__toggle {
  --buttons-padding: 0;
  --buttons-letter-spacing: 0;
  border: 1px solid var(--color-border);
  height: var(--btn-height);
  cursor: pointer;
  color: currentColor;
  background-color: transparent;
  white-space: nowrap;
  transition: .3s box-shadow;
  display: flex;
  column-gap: 8px;
}

@media (hover: hover) {
  .disclosure__toggle:hover {
    box-shadow: 0 0 0 calc(.1rem + 1px) rgba(var(--color-foreground), .3);
  }
}

.disclosure--plain .disclosure__toggle {
  padding: 0;
  border: none;
  background: none !important;
  color: currentColor !important;
  height: auto;
}

@media (hover: hover) {
  .disclosure--plain .disclosure__toggle:hover {
    text-decoration: underline;
    box-shadow: none;
  }
}

.disclosure__toggle svg {
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}

.disclosure-list {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 170px;
  background-color: rgb(var(--color-background));
  padding: 1rem;
  margin: 5px 0 0;
  visibility: hidden;
  opacity: 0;
  border: 1px solid rgb(var(--color-border));
  z-index: 99;
  border-radius: var(--card-corner-radius);
  transition: .2s ease-in-out;
  transform: translate3d(0, 12px, 0);
  max-height: 60vh;
  overflow-y: auto;
  max-width: var(--f-max-width, 100%);
  display: block;
}

.disclosure--up .disclosure-list {
  bottom: 100%;
  top: auto;
  margin: 0 0 5px;
  transform: translate3d(0, -12px, 0);
}

.disclosure-list__item {
  list-style: none;
  color: rgb(var(--color-foreground));
  line-height: 44px !important;
  white-space: nowrap;
}

@media (hover: hover) {
  .disclosure-list__item:hover {
    color: var(--color-link-hover);
  }
}

.disclosure-list__item--current a {
  text-decoration: underline;
}

.disclosure-list__item a {
  display: flex;
  align-items: center;
  column-gap: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: currentColor;
}

@media (hover: hover) {
  .disclosure-list__item a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 639.98px) {
  .disclosure-list {
    max-height: 300px;
  }
}

.disclosure-list__right {
  left: auto;
  right: 0;
}

.disclosure[open] .disclosure-list {
  visibility: visible;
  opacity: 1;
  transform: translateZ(0);
  z-index: 9999;
}

.f-country-flags {
  display: inline-block;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  object-fit: cover;
  background-image: var(--background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  position: relative;
}

.f-country-flags::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-shadow: inset 0 0 0.2rem rgba(var(--color-foreground), 0.3);
  border-radius: 50%;
}

.f-country-flags--VN, .f-country-flags--vn { --background-image: url('/shared-assets/flags/vn.svg'); }
.f-country-flags--US, .f-country-flags--us { --background-image: url('/shared-assets/flags/us.svg'); }
.f-country-flags--DE, .f-country-flags--de { --background-image: url('/shared-assets/flags/de.svg'); }
.f-country-flags--GB, .f-country-flags--gb { --background-image: url('/shared-assets/flags/gb.svg'); }
.f-country-flags--FR, .f-country-flags--fr { --background-image: url('/shared-assets/flags/fr.svg'); }
.f-country-flags--IT, .f-country-flags--it { --background-image: url('/shared-assets/flags/it.svg'); }
.f-country-flags--JP, .f-country-flags--jp { --background-image: url('/shared-assets/flags/jp.svg'); }
.f-country-flags--KR, .f-country-flags--kr { --background-image: url('/shared-assets/flags/kr.svg'); }
.f-country-flags--CN, .f-country-flags--cn { --background-image: url('/shared-assets/flags/cn.svg'); }
.f-country-flags--TH, .f-country-flags--th { --background-image: url('/shared-assets/flags/th.svg'); }
.f-country-flags--SG, .f-country-flags--sg { --background-image: url('/shared-assets/flags/sg.svg'); }
.f-country-flags--MY, .f-country-flags--my { --background-image: url('/shared-assets/flags/my.svg'); }
.f-country-flags--AU, .f-country-flags--au { --background-image: url('/shared-assets/flags/au.svg'); }
.f-country-flags--CA, .f-country-flags--ca { --background-image: url('/shared-assets/flags/ca.svg'); }
