:root {
  --vy-label-accent: rgb(96, 11, 24);
  --vy-label-card: #f9f6f1;
}

/* Product page: the choice sits on its own row above quantity and button. */
form.cart:has(> .vy-label) {
  flex-wrap: wrap;
}
.vy-label {
  flex: 0 0 100%;
  order: -1;
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  font-family: "Sofia Sans", "Segoe UI", sans-serif;
}
/* Scoped to form.cart: the theme styles every label in the form, and loses only to this. */
form.cart fieldset.vy-label .vy-label__title {
  margin-bottom: 10px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vy-label__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
form.cart fieldset.vy-label label.vy-label__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 128px;
  padding: 10px 8px 12px;
  background: var(--vy-label-card);
  border: 1px solid rgba(96, 11, 24, 0.16);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* The radio covers the card: native keyboard and screen-reader behaviour, no custom widget. */
.vy-label__card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.vy-label__card:focus-within {
  outline: 2px solid rgba(96, 11, 24, 0.4);
  outline-offset: 2px;
}
form.cart fieldset.vy-label label.vy-label__card.is-on,
form.cart fieldset.vy-label label.vy-label__card:has(input:checked) {
  border-color: var(--vy-label-accent);
  box-shadow: inset 0 0 0 1px var(--vy-label-accent);
}
/*
 * The label face is cut from the 600x1524 bottle image by background position: the label
 * area (x 120-480, y 860-1340) scaled into the 90x118 box.
 */
form.cart fieldset.vy-label .vy-label__face {
  display: block;
  width: 90px;
  height: 118px;
  background-repeat: no-repeat;
  background-size: 167% auto;
  background-position: 50% 82%;
}
form.cart fieldset.vy-label .vy-label__face--thumb {
  background-size: contain;
  background-position: center;
}
form.cart fieldset.vy-label .vy-label__name {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
}
.vy-label__price {
  font-size: 12px;
  color: var(--vy-label-accent);
}
.vy-label__note {
  min-height: 32px;
  margin: 10px 0 0;
  font-family: "Miama Nueva", cursive;
  font-size: 22px;
  color: var(--vy-label-accent);
}

.vy-label-overlay {
  position: absolute;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
img.vy-label-classic {
  transition: opacity 0.45s ease;
}
html.vy-label-is-message .vy-label-overlay {
  opacity: 1;
}
html.vy-label-is-message img.vy-label-classic {
  opacity: 0;
}

/* Shop cards: a badge mirroring the theme's "Нова реколта", and the bottle with the message on hover. */
.vy_custom-label.vy-label-badge {
  left: 0 !important;
  right: auto !important;
  background: var(--vy-label-accent) !important;
  border-radius: 0 0 10px 0 !important;
}
img.vy-label-hover {
  display: none;
}
img.vy-label-hover.is-placed {
  position: absolute;
  display: block;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
img.vy-label-bottle {
  transition: opacity 0.35s ease;
}
@media (hover: hover) {
  .vy-label-card:hover img.vy-label-hover.is-placed {
    opacity: 1;
  }
  .vy-label-card:hover img.vy-label-bottle {
    opacity: 0;
  }
}
