/* ==========================================
   ДРОПДАУН ПОМОЛА — Fauno Coffee

   Покрывает два типа блоков:
   .t-store  — карточки ST200/ST300 (главная)
   .t-catalog — каталог t1291 (/catalog)
   ========================================== */

/* --- Контейнер: растянуть на всю ширину карточки --- */
.t-store__card__option,
.t-store__prod-popup__option,
.t-catalog__card__option,
.t-catalog__prod-popup__option,
.js-product-option,
.js-store-prod-option,
.t-product__option,
.t-cards__option {
  /* Компактная пилюля «ВЕС»: контейнер опции ужат по ширине (не на всю карточку),
     но может сжаться на узких карточках/мобиле (width:100% + max-width). */
  width: 100% !important;
  max-width: 130px !important;
  margin-bottom: 12px !important;
  box-sizing: border-box !important;
}

/* Любой div/span-обёртка внутри контейнера тоже на 100% */
.t-store__card__option > div,
.t-store__card__option > span,
.t-catalog__card__option > div,
.t-catalog__card__option > span,
.t-product__option > div,
.t-product__option > span,
.js-product-option > div,
.js-product-option > span {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* --- Select --- */
.t-store select,
.t-store__card select,
.t-store__card__option select,
.t-store__prod-popup select,
.t-store__prod-popup__option select,
.t-catalog select,
.t-catalog__card select,
.t-catalog__card__option select,
.t-catalog__prod-popup__option select,
.js-catalog select,
.js-store-prod-option select,
.js-product select,
.js-product-option select,
.t-product__option select,
.t-product select,
.t-cards select,
.t-cards__option select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: block !important;
  /* Селект = 100% контейнера опции. Компактность делаем на уровне контейнера
     (.t-product__option / *__card__option — max-width ниже ~130px), чтобы
     стрелка Tilda (на обёртке опции) осталась у правого края пилюли. */
  width: 100% !important;
  max-width: 100% !important;
  padding: 8px 30px 8px 12px !important;
  /* Шрифт берём из Настроек сайта Tilda (fix: раньше был system-fallback,
     перебивал фирменный шрифт сайта на селектах) */
  font-family: inherit !important;
  font-size: 13px !important;
  color: #3c5f3b !important;
  border: 1px solid #3c5f3b !important;
  border-radius: 20px !important;
  background-color: #fff !important;
  background-image: none !important;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s !important;
  cursor: pointer !important;
  outline: none !important;
  height: auto !important;
  line-height: 1.3 !important;
  box-shadow: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

/* Hover */
.t-store select:hover,
.t-store__card select:hover,
.t-store__card__option select:hover,
.t-catalog select:hover,
.t-catalog__card select:hover,
.t-catalog__card__option select:hover,
.js-product select:hover,
.t-product select:hover,
.t-cards select:hover {
  border-color: #2e4a2d !important;
  background-color: #f5f9f4 !important;
}

/* Focus */
.t-store select:focus,
.t-store__card select:focus,
.t-store__card__option select:focus,
.t-catalog select:focus,
.t-catalog__card select:focus,
.t-catalog__card__option select:focus,
.js-product select:focus,
.t-product select:focus,
.t-cards select:focus {
  border-color: #2e4a2d !important;
  box-shadow: 0 0 0 3px rgba(60, 95, 59, 0.15) !important;
  background-color: #f5f9f4 !important;
}

/* --- Лейбл «Помол» --- */
.t-store__card__option-title,
.t-store__prod-popup__option-title,
.t-catalog__card__option-title,
.t-catalog__prod-popup__option-title,
.js-product-option-title,
.t-product__option-title,
.t-store .t-product__option-title,
.t-catalog .t-product__option-title,
.t-cards__option-title {
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #3c5f3b !important;
  margin-bottom: 4px !important;
  font-weight: 500 !important;
}

/* --- IE/Edge --- */
.t-store select::-ms-expand,
.t-catalog select::-ms-expand,
.t-product select::-ms-expand {
  display: none !important;
}


/* Страница корзины */
.t706__cartpage {
    background-color: #f5f5f5 !important;
}
.t706__cartpage-totals {
    background-color: #f5f5f5 !important;
}
.t706__cartpage-heading {
    color: #292929 !important;
}
.t-input-description,
.t706__cartpage-form-wrapper .t-checkbox__control {
    font-weight: 400 !important;
}

/* Окно корзины */
.t706__cartwin-content {
    background-color: #f5f5f5 !important;
    border-radius: 8px;
}
.t706__cartwin-heading {
    color: #292929 !important;
}
.t706__cartwin-top {
    border-bottom: 1px solid #3C5F3B;
}
.t706__cartwin-bottom {
    border-top: 1px solid #3C5F3B;
}

/* Сайдбар */
.t706__sidebar-content {
    background-color: #f5f5f5 !important;
}
.t706__sidebar-heading {
    color: #302E2C !important;
}

/* Карточка товара */
.t706__product-title {
    color: #302E2C !important;
}
.t706__product-title__option {
    color: #302E2C !important;
    opacity: 1 !important;
}
.t706__product-quantity,
.t706__product-quantity-inp {
    color: #302E2C !important;
}
.t706__product-quantity:hover,
.t706__product-quantity_editing:hover {
    border: 1px solid #302E2C !important;
}
.t706__product-amount {
    color: #3C5F3B !important;
}

/* Сумма заказа */
.t706__cartwin-prodamount-wrap {
    color: #3C5F3B !important;
}
.t706__cartwin-prodamount-price,
.t706__cartwin-prodamount-currency {
    font-family: 'Din PRO' !important;
    font-weight: 600;
    color: #3C5F3B;
}

/* Поиск / доставка */
.searchbox-list *,
.delivery-minimum-time,
.delivery-minimum-price {
    font-family: 'Din PRO' !important;
    font-weight: 400;
}

/* --- Опция «Вес» — компактная пилюля ---
   Раньше здесь была двухколоночная раскладка (вес + помол в ряд, по 50%).
   Вывод «Помола» на сайте отключён — остался один селект «Вес». Делаем его
   компактным (ширина ≤130px, не на всю карточку), как просили. flex-basis 130px
   + max-width, min-width:0 — пилюля сжимается на узких карточках/мобиле без
   переносов. На мобиле (≤480px) — на всю ширину (media query ниже). */
.js-product-controls-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  /* Воздух между ценой и селектом «ВЕС». !important перебивает инлайновый
     margin-top:4px, который проставлял скрипт (теперь эта строка из JS убрана). */
  margin-top: 16px !important;
}

.js-product-controls-wrapper .t-product__option {
  flex: 0 1 130px !important;
  min-width: 0 !important;
  max-width: 130px !important;
}

.js-product-controls-wrapper .t-product__option select {
  min-width: 0 !important;
}

/* Компактные селекты в карточках листингов (главная ST200/ST300, каталог t1291):
   меньше кегль/паддинги, чем на странице товара (.t-product / .js-product-single
   базовый размер здесь не трогаем). Ширину задаёт контейнер опции (max-width
   ~130px выше). */
.t-store__card .js-product-controls-wrapper select,
.t-catalog__card .js-product-controls-wrapper select,
.t-store__card .t-product__option select,
.t-catalog__card .t-product__option select {
  padding: 6px 26px 6px 10px !important;
  font-size: 12px !important;
}
.t-store__card .t-product__option-title,
.t-catalog__card .t-product__option-title,
.t-store__card .t-store__card__option-title,
.t-catalog__card .t-catalog__card__option-title {
  font-size: 9px !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.6px !important;
}
.t-store__card .t-product__option,
.t-catalog__card .t-product__option,
.t-store__card .t-store__card__option,
.t-catalog__card .t-catalog__card__option {
  margin-bottom: 8px !important;
}
/* В каталоге цена и «ВЕС» стоят вплотную (перебивает общий margin-top:16px). */
.t-store__card .js-product-controls-wrapper,
.t-catalog__card .js-product-controls-wrapper {
  margin-top: 2px !important;
}
/* Основной отступ под ценой в карточке даёт сам Tilda — подрезаем его,
   чтобы «ВЕС» стоял ближе к цене. Только карточки листингов (не страница товара). */
.t-store__card__price-wrapper,
.t-catalog__card__price-wrapper,
.t-store__card__price,
.t-catalog__card__price {
  margin-bottom: 2px !important;
  padding-bottom: 0 !important;
}

@media (max-width: 480px) {
  .js-product-controls-wrapper .t-product__option {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* --- Цена ST744 на мобиле ---
   Tilda по умолчанию сильно сжимает цену на узких экранах.
   Только мобильный размер, шрифт/цвет не трогаем — наследуются от Tilda. */
@media (max-width: 640px) {
  .t744__price-value,
  .t744__price-currency {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }
}


/* ==========================================
   ШКАЛЫ ВКУСА — точечные стили
   Только классы .fauno-* — тильдовскую разметку не трогаем.
   ========================================== */

.fauno-data { display: none !important; }

/* Страница товара */
.fauno-taste-scales {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 22px 0 0 !important;
  max-width: 520px;
  padding: 10px 14px;
  background: #fafaf9;
  border-radius: 10px;
}
.fauno-taste-scale {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 14px;
  align-items: center;
}
.fauno-taste-scale__label {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 500;
  color: #6b6b6b;
}
.fauno-taste-scale__dots { display: inline-flex; gap: 5px; }
.fauno-taste-scale__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e2dd;
}
.fauno-taste-scale__dot.is-on { background: #3c5f3b; }
.fauno-taste-scale__value {
  font-family: 'Din PRO', 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: #6b6b6b;
  white-space: nowrap;
}

/* Компактный режим — каталог */
.fauno-taste-scales--compact {
  gap: 6px;
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fafaf9;
  border-radius: 8px;
  max-width: 100%;
}
.fauno-taste-scales--compact .fauno-taste-scale { grid-template-columns: 80px 1fr auto; gap: 8px; }
.fauno-taste-scales--compact .fauno-taste-scale__label { font-size: 9px; letter-spacing: 0.7px; }
.fauno-taste-scales--compact .fauno-taste-scale__dots { gap: 3px; }
.fauno-taste-scales--compact .fauno-taste-scale__dot { width: 7px; height: 7px; }
.fauno-taste-scales--compact .fauno-taste-scale__value { font-size: 10px; }


/* ==========================================
   ВЕС — статичная плашка для одновесовых товаров

   У товаров с одним весом в Tilda нет Редакции (Editions), поэтому нативный
   селектор «ВЕС» не рисуется. Скрипт site-head-scales.html читает data-weight
   из span.fauno-data и вставляет эту плашку — только если нативного «ВЕС» нет.

   Визуально повторяет нативный селект «ВЕС»: компактная пилюля по ширине
   содержимого, оливковая рамка #3c5f3b, лейбл «ВЕС:» сверху. Стрелки нет —
   выбирать нечего, это информационная надпись. Шрифт значения — как у селекта
   (шрифт сайта, не моно), чтобы плашка и нативный селект смотрелись одинаково.
   ========================================== */

.fauno-weight { margin: 16px 0 14px; }
.fauno-weight__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #3c5f3b;
  margin-bottom: 6px;
  font-weight: 500;
  font-family: var(--t-text-font, 'Source Sans Pro'), -apple-system, sans-serif;
}
.fauno-weight__label::after { content: ':'; }
.fauno-weight__badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #3c5f3b;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.3;
  color: #3c5f3b;
  background: #fff;
  font-family: var(--t-text-font, 'Source Sans Pro'), -apple-system, sans-serif;
}

/* Компактная плашка — карточки каталога (главная ST200/ST300, /catalog t1291) */
.fauno-weight--compact { margin: 2px 0 10px; }
.fauno-weight--compact .fauno-weight__label { font-size: 9px; letter-spacing: 0.6px; margin-bottom: 4px; }
.fauno-weight--compact .fauno-weight__badge { padding: 6px 14px; font-size: 12px; }

