/**
 * Tilda Product Tweaks - Styles
 * Версия: 1.0.0
 */

/* ====== ФОНОВЫЙ ЦВЕТ ДЛЯ БЛОКА T744 ====== */
div[data-record-type="744"] {
  background-color: #f5f7f9 !important;
}

/* ====== PADDING ДЛЯ T744 НА МОБИЛЕ ====== */
@media (max-width: 767px) {
  div[data-record-type="744"] {
    padding-bottom: 30px !important;
    padding-top: 15px !important;
  }
}

/* ====== ФОНОВЫЙ ЦВЕТ ДЛЯ БЛОКА T758 ====== */
div[data-record-type="758"] {
  background-color: #f5f7f9 !important;
}

/* ====== СКРЫТИЕ BREADCRUMBS НА МОБИЛЕ ====== */
@media (max-width: 767px) {
  div[data-record-type="758"] {
    display: none !important;
  }
}

/* Старые классы удалены - используем штатные radio Tilda */

@media (max-width: 767px) {
  .t744__price-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .t744__sku-mobile {
    font-size: 12px;
    color: #bcbcbc;
    margin-left: auto;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .t744__title-mobile {
    margin-bottom: 20px;
    padding: 0 15px;
  }

  .t744__title-mobile .t744__title {
    font-size: 22px !important;
    line-height: 1.3;
  }

  .t744__title-mobile .t744__title_small {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
  }
}

@media (max-width: 767px) {
  .t744__breadcrumb-label {
    display: inline-block;
    background: #00c851;
    color: #FFF !important ;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 500;
    margin-left: auto;
    white-space: nowrap;
    align-self: center;
    font-family: 'Onest'
  }

  .t744__title-mobile-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0 15px;
    flex-wrap: wrap;
  }

  .t744__title-mobile-wrapper .t744__title {
    font-size: 22px !important;
    line-height: 1.3;
    margin: 0;
  }
}


  /* ====== МИНИАТЮРЫ СЛЕВА ====== */
  .t744 .t-slds__thumbsbullet-wrapper {
    position: absolute;
    left: -72px;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .t744 .t-slds__thumbsbullet {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: border 0.3s ease;
  }
  .t744 .t-slds__thumbsbullet-border {
    display: none;
  }
  .t744 .t-slds__thumbsbullet-active,
  .t744 .t-slds__thumbsbullet.t-slds__bullet_active {
    outline: 2px solid #00c851;
  }
  @media (max-width: 991px) {
    .t744 .t-slds__thumbsbullet-wrapper {
      left: auto;
      bottom: -74px;
      flex-direction: row;
    }
  }

  /* ====== ГАЛЕРЕЯ ====== */
  .t744 .t-slds__main {
    border-radius: 24px;
    overflow: hidden;
  }
  .t744 .t-slds__arrow-withbg {
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }



  /* ====== КНОПКА + ИЗБРАННОЕ ====== */
  .t744 .t744__btn-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 20px 0 0px;
  }
   .t744 .t744__btn {
    flex-grow: 1 !important;
    text-align: center !important;
    background: #00c851 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: background 0.2s ease;
    height: 45px !important;
    padding: 0 !important;
    width: auto !important;
  }
  .t744 .t744__btn:hover {
    background: #00b046 !important;
  }

  .t744 .t744__btn.t-btn.t-btn_sm {
    width: auto !important;
    padding: 0 !important;
  }

  /* Кнопка "Избранное" */
  .t744 .t1002__addBtn {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e5e5e5;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
  }
  .t744 .t1002__addBtn:hover {
    border-color: #00c851;
  }

  /* ====== БЛОК ОПИСАНИЯ ====== */
  .t744 .t744__descr {
    background: #fff;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 32px;
    max-width: 500px;
    font-size: 14px !important;
    line-height: 1.7 !important;
  }
  .t744 .t744__descr + .t744__descr {
    display: none;
  }

  /* Стили для span внутри описания */
  .t744__descr span {
    color: rgb(128, 128, 128) !important;
    font-family: 'Onest' !important;
  }

  @media (max-width: 991px) {
    .t744 .t744__descr {
      max-width: 100%;
    }
  }

  /* ====== ПЕРЕМЕЩЕНИЕ АРТИКУЛА НАД ЗАГОЛОВКОМ ====== */
  .t744 .t744__title-wrapper {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
  }

  /* ====== СТИЛИ АРТИКУЛА ====== */
  .t744__title_small {
    font-size: 12px;
    color: #b5b5b5;
    font-family: 'Onest';
    font-weight: 400;
  }

  /* ====== ЦЕНА НА МОБИЛЕ ====== */
  @media (max-width: 767px) {
    .t744__price.t744__price-item.t-name.t-name_md.js-store-prod-price {
      font-size: 26px !important;
      font-weight: 700 !important;
    }
  }

  /* ====== BADGE ДОСТАВКИ ====== */
  .t744 .custom-badge {
    display: inline-block;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 100px;
    margin-top: 12px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  /* ====== СТИЛИЗАЦИЯ ШТАТНЫХ RADIO TILDA ====== */

  /* Родительский контейнер опции */
  .t-product__option {
    margin-bottom: 16px;
  }

  /* Убираем margin-left у контейнеров вариантов */
  .t-product__option-variants,
  .t-product__option-variants_custom,
  .t-product__option-variants_radio,
  .t-product__option-variants_simple {
    margin-left: 0 !important;
  }

  /* Скрываем select внутри form */
  .t-product__option-variants select,
  .t-product__option-variants_custom select,
  .t-product__option-variants_radio select,
  form.t-product__option-variants select {
    display: none !important;
  }

  /* Контейнер с вариантами - горизонтальное расположение (только для radio) */
  .t-product__option-variants_radio,
  .t-product__option-variants_custom {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 8px !important;
    flex-direction: row !important;
  }

  /* Сброс дефолтных стилей Tilda для radio */
  .t-product__option-variants_radio .t-product__option-item,
  .t-product__option-variants_custom .t-product__option-item {
    margin-bottom: 0 !important;
    min-height: auto !important;
    width: auto !important;
  }

  /* Label (обертка radio) */
  .t-product__option-item_radio {
    display: inline-block;
    background: #fff;
    padding: 10px 18px !important;
    border-radius: 12px;
    border: 2px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin: 0 !important;
    width: auto !important;
  }

  /* Активный radio */
  .t-product__option-item_radio.t-product__option-item_active {
    border-color: #00c851;
    background: #fff;
  }

  /* Disabled radio */
  .t-product__option-item_radio.t-product__option-item_disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #ddd;
    pointer-events: none;
  }

  /* Hover эффект */
  .t-product__option-item_radio:hover:not(.t-product__option-item_disabled) {
    border-color: #00c851;
  }

  /* Скрываем стандартный checkmark Tilda */
  .t-product__option-checkmark_radio {
    display: none !important;
  }

  /* Скрываем стандартный input */
  .t-product__option-input_radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  /* Текст внутри radio */
  .t-product__option-title_radio {
    font-size: 14px;
    font-weight: 400;
    color: #222;
  }

  /* Заголовок опции (название свойства) */
  .js-product-edition-option-name.t-product__option-title.t-typography__options.t-descr.t-descr_xxs {
    font-size: 14px;
    color: #b5b5b5;
    font-family: 'Onest';
  }

  /* Шрифт для текста custom вариантов */
  .js-product .t-product__option-variants_custom .t-product__option-title {
    font-family: 'Onest';
  }

  /* ====== СТИЛИЗАЦИЯ RADIO ДЛЯ БЛОКА T778 (КАТАЛОГ) ====== */

  /* Применяем те же стили для T778 */
  .t778 .t-product__option-variants,
  .t778 .t-product__option-variants_custom,
  .t778 .t-product__option-variants_radio,
  .t778 .t-product__option-variants_simple {
    margin-left: 0 !important;
  }

  .t778 .t-product__option-variants select,
  .t778 .t-product__option-variants_custom select,
  .t778 .t-product__option-variants_radio select,
  .t778 form.t-product__option-variants select {
    display: none !important;
  }

  .t778 .t-product__option-variants_radio,
  .t778 .t-product__option-variants_custom {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-top: 8px !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .t778 .t-product__option-variants_radio .t-product__option-item,
  .t778 .t-product__option-variants_custom .t-product__option-item {
    margin-bottom: 0 !important;
    min-height: auto !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .t778 .t-product__option-item_radio {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff;
    padding: 8px 14px !important;
    border-radius: 16px;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .t778 .t-product__option-item_radio.t-product__option-item_active {
    border-color: #00c851;
    background: #fff;
  }

  .t778 .t-product__option-item_radio.t-product__option-item_disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #ddd;
    pointer-events: none;
  }

  .t778 .t-product__option-item_radio:hover:not(.t-product__option-item_disabled) {
    border-color: #00c851;
  }

  .t778 .t-product__option-checkmark_radio {
    display: none !important;
  }

  .t778 .t-product__option-input_radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .t778 .t-product__option-title_radio {
    font-size: 13px;
    font-weight: 400;
    color: #222;
  }

  .t778 .t-product__option {
    margin-bottom: 12px;
  }

  .t778 .js-product-edition-option-name.t-product__option-title {
    font-size: 13px;
    color: #b5b5b5;
    font-family: 'Onest';
    margin-bottom: 6px;
  }

  /* ====== СКРЫТИЕ МИНИАТЮР НА МОБИЛЕ ====== */
  @media screen and (max-width: 767px) {
    .t744__col_first .t-slds__thumbsbullet-wrapper {
      display: none !important;
    }
  }
  
    label {
  font-family: 'Onest', sans-serif !important;
}
