/* Product page option blocks (shared with PC configurator styling).
   Extracted from pc_configurator.css so it applies to ALL products. */
.options {
  --up-bg-wd: #ffffff;
  --up-bg-main: #f7f8fb;
  --up-border-color: #eaedf7;
  --up-text-wd-color: #000000;
  --up-text-gray-color: #8e98a3;
  --up-text-link: #00a5d4;
  --up-color-success: #55b747;
  --up-color-danger: #ff5757;
  --up-color-warning: #f0ad4e;
  --up-border-radius-small: 8px;
  --up-border-radius-medium: 12px;
  --up-border-radius-large: 20px;
  --font-size-sm: clamp(1.16rem, 2.32vw, 1.31rem);
  --font-size-base: clamp(1.31rem, 2.68vw, 1.46rem);
}

/* ======================================================================
   Product page native option blocks (unified with configurator styling)
   Scope: only within product page that hosts the configurator
   ====================================================================== */
.options {
  background-color: var(--up-bg-wd) !important;
  border: 1px solid var(--up-border-color) !important;
  border-radius: var(--up-border-radius-medium, 12px) !important;
  padding: 15px !important;
  margin-top: 15px !important;
}

.options .form-group {
  background-color: #f7f8fb !important;
  border: 1px solid #eaedf7 !important;
  border-radius: 12px !important;
  padding: 12px 15px !important;
  margin-bottom: 10px !important;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.options .form-group:last-child {
  margin-bottom: 0 !important;
}

.options .control-label {
  display: block !important;
  margin: 0 0 8px 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #000 !important;
}

.options .form-control {
  background-color: #fff !important;
  color: #000 !important;
  border: 1px solid #eaedf7 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  outline: none !important;
  height: 44px !important;
  line-height: 44px !important;
  padding: 0 12px !important;
  font-size: var(--font-size-base) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.options .form-control:focus {
  border-color: #00a5d4 !important;
  box-shadow: 0 0 0 2px rgba(0, 165, 212, 0.15) !important;
}

.options .form-control[disabled],
.options .form-control:disabled {
  background-color: #f7f8fb !important;
  color: #9aa3ad !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Select enhancements */
.options select.form-control {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3e%3cpath fill='%238e98a3' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 18px 18px !important;
}

.options select.form-control:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3e%3cpath fill='%2300a5d4' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
}

/* Remove legacy Edge/IE default arrow */
.options select.form-control::-ms-expand {
  display: none !important;
}

/* Better text rendering in Firefox when focused */
.options select.form-control:-moz-focusring {
  color: transparent !important;
  text-shadow: 0 0 0 var(--up-text-wd-color) !important;
}

/* Active tweak */
.options select.form-control:active {
  border-color: var(--up-text-link) !important;
}

/* Placeholder-like state: when empty option is selected */
.options select.form-control:has(option[value=""]:checked) {
  color: var(--up-text-gray-color) !important;
}

/* Option list appearance (browser support varies) */
.options select.form-control option {
  background-color: #fff !important;
  color: #000 !important;
}
.options select.form-control option:disabled {
  color: #9aa3ad !important;
}
.options select.form-control optgroup {
  color: #9aa3ad !important;
  font-weight: 600 !important;
  background-color: #f7f8fb !important;
}

/* Multiple select support */
.options select.form-control[multiple],
.options select.form-control[size] {
  height: auto !important;
  min-height: 100px !important;
  line-height: 1.4 !important;
  padding: 8px 10px !important;
  background-image: none !important;
  overflow-y: auto !important;
}
.options select.form-control[multiple] option:checked,
.options select.form-control[size] option:checked {
  background-color: var(--up-text-link) !important;
  color: #fff !important;
}

/* Validation states if theme uses .has-* utility classes */
.options .form-group.has-error .form-control {
  border-color: var(--up-color-danger, #f44336) !important;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.1) !important;
}
.options .form-group.has-warning .form-control {
  border-color: var(--up-color-warning, #f0ad4e) !important;
  box-shadow: 0 0 0 2px rgba(240, 173, 78, 0.12) !important;
}
.options .form-group.has-success .form-control {
  border-color: var(--up-color-success, #4caf50) !important;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.12) !important;
}

/* Helper texts & validation */
.options .help-block,
.options .text-muted {
  margin-top: 6px !important;
  font-size: var(--font-size-sm) !important;
  color: var(--up-text-gray-color) !important;
}

.options .text-danger {
  margin-top: 6px !important;
  font-size: 13px !important;
  color: #e72121 !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  position: static !important;
  border-radius: 0 !important;
}

/* Compact spacing on small screens */
@media (max-width: 768px) {
  .options {
    padding: 12px !important;
    margin-top: 12px !important;
  }
  .options .form-group {
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
  }
  .options .form-control {
    height: 42px !important;
    line-height: 42px !important;
    font-size: var(--font-size-sm) !important;
  }
}

/* ======================================================================
   Customizable native <select> for all option blocks (Chrome 135+)
   Synced with global chameleon option select styling.
   ====================================================================== */
@media (hover: hover) and (pointer: fine) {
  @supports (appearance: base-select) {
    .options select.form-control,
    .options select.form-control::picker(select) {
      appearance: base-select !important;
    }

    .options select.form-control {
      background-image: none !important;
      padding-right: 40px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 10px !important;
      background-color: #fcfcfc !important;
      border: 1px solid #e4e9ef !important;
      border-radius: 6px !important;
      color: #000 !important;
    }

    .options select.form-control::picker-icon {
      color: #8e98a3;
      transition: transform 0.2s ease, color 0.2s ease;
    }
    .options select.form-control:focus::picker-icon {
      color: #00a5d4;
    }
    .options select.form-control:open::picker-icon {
      transform: rotate(180deg);
    }

    .options select.form-control::picker(select) {
      background: #fff;
      color: #000;
      border: 1px solid #e4e9ef;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(25, 35, 45, 0.12);
      padding: 6px;
      margin-top: 6px;
      min-width: anchor-size(width);
      max-height: 320px;
      overflow-y: auto;
      font-size: 14px;

      opacity: 1;
      translate: 0 0;
      transition: opacity 0.18s ease, translate 0.18s ease,
        display 0.18s allow-discrete;
    }
    @starting-style {
      .options select.form-control:open::picker(select) {
        opacity: 0;
        translate: 0 -4px;
      }
    }

    .options select.form-control option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 8px;
      cursor: pointer;
      line-height: 1.3;
      color: #000 !important;
      background: transparent !important;
      transition: background-color 0.15s ease, color 0.15s ease;
    }
    .options select.form-control option:hover,
    .options select.form-control option:focus {
      background: #f4f7fb !important;
      outline: none;
    }
    .options select.form-control option:checked {
      background: rgba(0, 165, 212, 0.10) !important;
      color: #00a5d4 !important;
      font-weight: 600;
    }
    .options select.form-control option:disabled {
      color: #9aa3ad !important;
      cursor: not-allowed;
    }

    .options select.form-control option::checkmark {
      content: "\2713";
      color: #00a5d4;
      width: 16px;
      font-weight: 700;
      flex-shrink: 0;
    }

    .options select.form-control option .opt-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .options select.form-control option .opt-price {
      margin-left: auto;
      padding: 2px 8px;
      border-radius: 999px;
      background: rgba(0, 165, 212, 0.10);
      color: #00a5d4;
      font-size: 0.85em;
      font-weight: 600;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .options select.form-control option:checked .opt-price {
      background: #00a5d4;
      color: #fff;
    }

    .options select.form-control[multiple],
    .options select.form-control[size] {
      appearance: auto !important;
      display: block !important;
      padding-right: 12px !important;
      background-image: none !important;
    }
  }
}

/* === UX polish: focus accent and subtle background highlight === */
.options .form-group {
  position: relative !important;
  overflow: hidden !important;
}
.options .form-group::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  background: var(--up-text-link) !important;
  transition: width 0.22s ease !important;
}
.options .form-group:focus-within::before {
  width: 3px !important;
}
.options .form-group:focus-within {
  background-color: rgba(0, 165, 212, 0.04) !important;
}

/* === Caret micro-interaction: tint and nudge on focus === */
.options select.form-control:focus {
  background-position: right 8px center !important;
}

/* === Optional label icon example for "Радіатори" === */
.options label.control-label[for="input-option979"] {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}
.options label.control-label[for="input-option979"]::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background: center/contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v18'/%3E%3Cpath d='M10 3v18'/%3E%3Cpath d='M14 3v18'/%3E%3Cpath d='M18 3v18'/%3E%3C/svg%3E") !important;
}

/* === Complex Option-Quantity Tables Styling === */
.options .option-quantity {
  background-color: var(--up-bg-main) !important;
  border: none !important;
  border-radius: var(--up-border-radius-medium, 12px) !important;
  padding: 0 !important;
  margin-bottom: 0px !important;
  position: relative !important;
  overflow: hidden !important;
}

.options .option-quantity .table {
  margin-bottom: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.options .option-quantity .table-bordered {
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background-color: transparent !important;
}

.options .option-quantity .table-bordered thead {
  background-color: transparent !important;
}

.options .option-quantity .table-bordered thead th,
.options .option-quantity .table-bordered thead td {
  border-bottom: 1px solid var(--up-border-color) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  font-weight: 600 !important;
  color: var(--up-text-wd-color) !important;
  padding: 10px 12px !important;
  font-size: var(--font-size-sm) !important;
  background-color: transparent !important;
}

.options .option-quantity .table-bordered thead td {
  padding-left: 0 !important;
}

.options .option-quantity .table-bordered tbody td {
  border-bottom: 1px solid var(--up-border-color) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 10px 12px !important;
  padding-left: 0 !important;
  vertical-align: middle !important;
  background-color: transparent !important;
}

.options .option-quantity .table-bordered tbody tr:last-child td {
  border-bottom: none !important;
}

.options .option-quantity .col-quantity {
  min-width: 120px !important;
  text-align: center !important;
  font-weight: 600 !important;
}

.options .option-quantity .text-center {
  text-align: center !important;
}

.options .option-quantity .text-center-flex {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Select within table cells */
.options .option-quantity select.form-control {
  background-color: var(--up-bg-wd) !important;
  color: var(--up-text-wd-color) !important;
  border: 1px solid var(--up-border-color) !important;
  border-radius: var(--up-border-radius-large, 20px);
  box-shadow: none !important;
  outline: none !important;
  height: 40px !important;
  line-height: 40px !important;
  padding: 0 12px !important;
  font-size: var(--font-size-sm) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  width: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.options .option-quantity select.form-control:focus {
  border-color: var(--up-text-link) !important;
  box-shadow: 0 0 0 2px rgba(0, 165, 212, 0.15) !important;
}

/* Custom arrow for table selects */
.options .option-quantity select.form-control {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 32px !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3e%3cpath fill='%23999999' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px 16px !important;
}

.options .option-quantity select.form-control:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3e%3cpath fill='%2300a5d4' d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
}

/* Customizable select for option-quantity tables (Chrome 135+).
   This block must stay below legacy appearance:none rules above. */
@media (hover: hover) and (pointer: fine) {
  @supports (appearance: base-select) {
    .options .option-quantity select.form-control,
    .options .option-quantity select.form-control::picker(select) {
      appearance: base-select !important;
    }

    .options .option-quantity select.form-control {
      background-image: none !important;
      padding-right: 40px !important;
      display: inline-flex !important;
      width: 100% !important;
      min-width: 0 !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 10px !important;
      overflow: hidden !important;
      white-space: nowrap !important;
      text-overflow: ellipsis !important;
    }

    .options .option-quantity select.form-control::picker-icon {
      color: #8e98a3;
      transition: transform 0.2s ease, color 0.2s ease;
    }
    .options .option-quantity select.form-control:focus::picker-icon {
      color: #00a5d4;
    }
    .options .option-quantity select.form-control:open::picker-icon {
      transform: rotate(180deg);
    }

    .options .option-quantity select.form-control::picker(select) {
      background: #fff;
      color: #000;
      border: 1px solid #e4e9ef;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(25, 35, 45, 0.12);
      padding: 6px;
      margin-top: 6px;
      min-width: anchor-size(width);
      max-height: 320px;
      overflow-y: auto;
      font-size: 14px;
    }

    .options .option-quantity select.form-control option {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 8px;
    }
    .options .option-quantity select.form-control option .opt-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .options .option-quantity select.form-control option .opt-price {
      flex: 0 0 auto;
      margin-left: auto;
      white-space: nowrap;
      padding-left: 8px;
    }
  }
}

/* Quantity controls styling */
.options .owq-quantity {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 4px 8px !important;
  background-color: var(--up-bg-wd) !important;
  border: 1px solid var(--up-border-color) !important;
  border-radius: var(--up-border-radius-small, 8px) !important;
}

.options .owq-sub,
.options .owq-add {
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: var(--up-bg-main) !important;
  border: 1px solid var(--up-border-color) !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  color: var(--up-text-wd-color) !important;
  transition: all 0.2s ease !important;
  font-size: var(--font-size-base) !important;
}

.options .owq-sub:hover,
.options .owq-add:hover {
  background-color: var(--up-text-link) !important;
  color: #fff !important;
  transform: scale(1.1) !important;
}

.options .owq-input {
  width: 50px !important;
  text-align: center !important;
  height: 28px !important;
  font-size: var(--font-size-sm) !important;
  padding: 2px 4px !important;
  border: 1px solid var(--up-border-color) !important;
  border-radius: var(--up-border-radius-small, 8px) !important;
  background-color: var(--up-bg-wd) !important;
  color: var(--up-text-wd-color) !important;
  outline: none !important;
}

.options .owq-input:focus {
  border-color: var(--up-text-link) !important;
  box-shadow: 0 0 0 2px rgba(0, 165, 212, 0.15) !important;
}

/* Disabled quantity input styling */
.options .owq-input[disabled],
.options .owq-input:disabled {
  background-color: var(--up-bg-gray) !important;
  color: var(--up-text-gray-color) !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

/* Remove spin buttons for quantity inputs */
.options .owq-input::-webkit-outer-spin-button,
.options .owq-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
.options .owq-input[type="number"] {
  -moz-appearance: textfield !important;
  -webkit-appearance: none !important;
  appearance: textfield !important;
}

/* Mobile responsive for option-quantity tables */
@media (max-width: 768px) {
  .options .option-quantity .table-responsive {
    border-radius: var(--up-border-radius-medium, 12px) !important;
    overflow: hidden !important;
  }

  .options .option-quantity .table-bordered thead {
    display: none !important;
  }

  .options .option-quantity .table-bordered tbody tr {
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid var(--up-border-color) !important;
    border-radius: var(--up-border-radius-medium, 12px) !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
  }

  .options .option-quantity .table-bordered tbody td {
    border: none !important;
    padding: 8px 0 !important;
    position: relative !important;
    gap: 5px !important;
  }

  .options .option-quantity .table-bordered tbody td:first-child::before {
    content: "Компонент:" !important;
    font-weight: 600 !important;
    color: var(--up-text-wd-color) !important;
    display: block !important;
    margin-bottom: 5px !important;
  }

  .options .option-quantity .table-bordered tbody td:last-child::before {
    content: "Кількість:" !important;
    font-weight: 600 !important;
    color: var(--up-text-wd-color) !important;
    display: block !important;
    margin-bottom: 5px !important;
  }

  .options .option-quantity select.form-control {
    height: 42px !important;
    line-height: 42px !important;
    font-size: var(--font-size-sm) !important;
  }

  .options .owq-quantity {
    width: 100% !important;
    justify-content: center !important;
  }

  .options .owq-input {
    width: 60px !important;
  }
}


/* ==========================================================================
   PCC SKIN для опций (как в конфигураторе): слот «название — выбор»
   Перенесено из pc_configurator.css, чтобы работало на всех товарах.
   ========================================================================== */
#product {
  --pcc-brand: #1060c1;
  --pcc-brand-hover: #0c4f9f;
  --pcc-brand-soft: #e9f1fb;
  --pcc-ink: #1b2333;
  --pcc-muted: #667085;
  --pcc-line: #e3e8f2;
  --pcc-surface: #ffffff;
  --pcc-ok: #2f9e57;
  --pcc-radius: 10px;
  --font-size-sm: clamp(1.16rem, 2.32vw, 1.31rem);
  --font-size-base: clamp(1.31rem, 2.68vw, 1.46rem);
}

/* --- Опции товара (select / radio / checkbox): строка-слот «название — выбор» --- */
#product .form-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  background: var(--pcc-surface) !important;
  border: 1px solid var(--pcc-line);
  border-radius: var(--pcc-radius);
  box-shadow: none;
  padding: 10px 14px !important;
  margin: 0 0 8px !important;
}
#product .form-group > * {
  grid-column: 1 / -1; /* всё, что не название и не select (блок мощности, ошибки, radio), на всю ширину */
  min-width: 0;
}
#product .form-group > .control-label,
#product .form-group > label.control-label {
  grid-column: 1;
  display: block;
  margin: 0 !important;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--pcc-ink);
}
#product .form-group.required > .control-label::after,
#product .form-group.required > label.control-label::after {
  color: var(--pcc-brand);
}
/* select: общий вид для обычных опций и опций с количеством */
#product .form-group select.form-control {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 14px !important;
  border: 1px solid var(--pcc-brand) !important;
  border-radius: 8px !important;
  background-color: var(--pcc-surface) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231060c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 12px 8px !important;
  color: var(--pcc-brand) !important;
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: none;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
#product .form-group select.form-control:hover {
  background-color: var(--pcc-brand-soft) !important;
}
#product .form-group select.form-control:focus,
#product .form-group select.form-control:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--pcc-brand-soft);
}
#product .form-group select.form-control option {
  color: var(--pcc-ink);
  font-weight: 500;
}
/* обычная опция: select встаёт в правую колонку строки */
#product .form-group > select.form-control {
  grid-column: 1;
}
/* текстовые поля, файлы, даты — под ту же сетку */
#product .form-group > input.form-control,
#product .form-group > textarea.form-control,
#product .form-group > .input-group {
  border: 1px solid var(--pcc-line);
  border-radius: 8px;
  box-shadow: none;
}
#product .form-group > input.form-control:focus,
#product .form-group > textarea.form-control:focus {
  border-color: var(--pcc-brand);
  box-shadow: 0 0 0 3px var(--pcc-brand-soft);
}
/* radio / checkbox: строки-варианты внутри слота */
#product .form-group .radio label,
#product .form-group .checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 12px;
  border: 1px solid var(--pcc-line);
  border-radius: 8px;
  font-size: var(--font-size-base);
  color: var(--pcc-ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
#product .form-group .radio label:hover,
#product .form-group .checkbox label:hover {
  border-color: #c9d1e0;
}
#product .form-group .radio label:has(input:checked),
#product .form-group .checkbox label:has(input:checked) {
  border-color: #c5d8f2;
  background: var(--pcc-brand-soft);
}
#product .form-group .radio input[type="radio"],
#product .form-group .checkbox input[type="checkbox"] {
  position: static;
  margin: 0;
  accent-color: var(--pcc-brand);
}
#product .form-group .opt-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pcc-muted);
}
@media (prefers-reduced-motion: reduce) {
  #product .form-group > select.form-control,
  #product .form-group .radio label,
  #product .form-group .checkbox label {
    transition: none;
  }
}

#product .form-group::before {
  display: none;
}

/* опция с количеством (select + счётчик): таблица Bootstrap превращается в строку-слот */
#product .option-quantity .table {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
}
#product .option-quantity .table > thead > tr > td,
#product .option-quantity .table > tbody > tr > td {
  border: 0;
  padding: 0 0 0 8px;
  vertical-align: middle;
  background: transparent;
}
#product .option-quantity .table > thead > tr > td:first-child,
#product .option-quantity .table > tbody > tr > td:first-child {
  padding-left: 0;
}
#product .option-quantity .table > thead,
#product .option-quantity .table > thead > tr {
  background: transparent !important;
}
#product .option-quantity .table > thead > tr > td {
  padding-bottom: 6px;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--pcc-ink);
}
#product .option-quantity .col-quantity {
  width: 1%;
  white-space: nowrap;
}
#product .owq-quantity {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--pcc-line);
  border-radius: 8px;
  background: var(--pcc-surface);
  overflow: hidden;
}
#product .owq-quantity .owq-sub,
#product .owq-quantity .owq-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pcc-brand);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
#product .owq-quantity .owq-sub:hover,
#product .owq-quantity .owq-add:hover {
  background: var(--pcc-brand-soft);
}
#product .owq-quantity input.owq-input {
  width: 36px;
  height: 100%;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pcc-ink);
}
#product .form-group > .option-quantity {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* --- Выпадающий список опций (Chrome 135+: appearance: base-select) ---
   Работает как улучшение: в остальных браузерах остаётся обычный список со стрелкой выше. */
@media (hover: hover) and (pointer: fine) {
  @supports (appearance: base-select) {
    #product .form-group select.form-control,
    #product .form-group select.form-control::picker(select) {
      appearance: base-select !important;
    }
    #product .form-group select.form-control {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 10px !important;
      height: auto !important;
      min-height: 44px;
      padding: 6px 12px 6px 14px !important;
      line-height: 1.3 !important;
      background-image: none !important;
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: clip !important;
    }
    #product .form-group select.form-control::picker-icon {
      flex: none;
      color: var(--pcc-brand);
      transition: transform 0.2s ease;
    }
    #product .form-group select.form-control:open::picker-icon {
      transform: rotate(180deg);
    }
    #product .form-group select.form-control::picker(select) {
      min-width: anchor-size(width);
      max-height: min(340px, 60vh);
      margin-block: 6px;
      padding: 6px;
      background: var(--pcc-surface);
      border: 1px solid var(--pcc-line);
      border-radius: 12px;
      box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
      overflow-y: auto;
      font-size: var(--font-size-sm);
    }
    #product .form-group select.form-control option {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 8px;
      color: var(--pcc-ink);
      font-weight: 500;
      cursor: pointer;
    }
    #product .form-group select.form-control option:hover,
    #product .form-group select.form-control option:focus-visible {
      background: var(--pcc-brand-soft) !important;
      color: var(--pcc-ink) !important;
    }
    #product .form-group select.form-control option:checked {
      background: var(--pcc-brand-soft) !important;
      color: var(--pcc-brand) !important;
      font-weight: 600;
    }
    #product .form-group select.form-control option::checkmark {
      order: 2;
      margin-left: auto;
      color: var(--pcc-brand);
    }
    #product .form-group select.form-control option .opt-name {
      flex: 1 1 auto;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    #product .form-group select.form-control option .opt-price,
    #product .form-group select.form-control option:hover .opt-price,
    #product .form-group select.form-control option:checked .opt-price {
      flex: 0 0 auto;
      margin-left: auto;
      padding: 0 !important;
      background: transparent !important;
      border: 0 !important;
      border-radius: 0 !important;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
      color: var(--pcc-muted) !important;
      font-weight: 600;
    }
    #product .form-group select.form-control option:checked .opt-price {
      color: var(--pcc-brand) !important;
    }
  }
}

/* Закрытие списка без «улёта» вниз: отключаем анимацию появления/скрытия picker */
@supports (appearance: base-select) {
  #product .form-group select.form-control::picker(select),
  #product .form-group select.form-control:open::picker(select) {
    transition: none !important;
    animation: none !important;
    translate: none !important;
    opacity: 1 !important;
  }
}
