/* ==========================================
   ДРОПДАУН ПОМОЛА — 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% !important;
  max-width: 100% !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;
  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__close-icon {
    color: #292929 !important;
}

/* Корзина t706 — иконка "Назад" (закрытие корзины): делаем чёрной */
.t706__cartpage-back,
.t706__cartpage-back .t706__cartpage-back-icon,
.t706__cartpage-back .t706__cartpage-back-icon * {
  color: #292929 !important;
  fill: #292929 !important;
  opacity: 1 !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;
}

/* --- Опции товара (вес, помол) в одну строку ---
   В каталоге при 4 колонках карточка ~290px шириной — раньше min-width: 140px
   приводил к 140*2 + 12px gap = 292px и второй select переносился на новую
   строку. Снижено до 110px, чтобы оба контрола помещались в ряд. На мобиле
   (≤480px) намеренно ставим в столбец — иначе текст внутри select обрезается.
   max-width нужен жёстко: иначе flex-item раздувается под intrinsic ширину
    (длинные опции) и пилюли визуально «наезжают» друг на друга,
   съедая gap. min-width: 0 на select разрешает ему сжиматься уже меньше
   собственного контента. */
.js-product-controls-wrapper {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
}

.js-product-controls-wrapper .t-product__option {
  flex: 1 1 calc(50% - 8px) !important;
  min-width: 110px !important;
  max-width: calc(50% - 8px) !important;
  width: auto !important;
}

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

/* Компактные селекты в карточках листингов (главная ST200/ST300, каталог t1291).
   На странице товара (.t-product, .js-product-single) НЕ применяется —
   там остаётся базовый размер.
   Важно: gap здесь не трогаем — он берётся из общего правила (12px) и должен
   совпадать с flex-basis: calc(50% - 6px). Если расхождение — селекты
   визуально «наезжают» друг на друга, т.к. их совокупная ширина превышает
   ширину контейнера. */
.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;
}

@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; }

