/* ═══════════════════════════════════════════════════════════════════════
   ROSBOTANIC — Топ-правки карточки товара (2026-07-17)
   По консенсусу 6 агентов + Правило №0.0
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. Галерея: aspect-ratio 4:5 + object-fit cover для правильной композиции ── */
.product .image .main-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
  background: #FFFFFF;
  max-width: 100%;
}
.product .image .main-image .easyzoom,
.product .image .main-image .thumbnail {
  display: block;
  width: 100%;
  height: 100%;
}
.product .image .main-image img.img-responsive {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%; /* букет тяготеет к верху → показать больше сверху */
  transition: transform .4s ease;
}
.product .image .main-image:hover img.img-responsive {
  transform: scale(1.03);
}

/* Миниатюры под hero — тоже квадраты */
.thumbnails .swiper-wrapper .image-additional a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.thumbnails .swiper-wrapper .image-additional a:hover {
  border-color: #c85a5a;
}
.thumbnails .swiper-wrapper .image-additional img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 2. Табы под товаром: превращаем строку ссылок в полноценные вкладки ── */
.nav-tabs.title {
  border-bottom: 2px solid #EAE0CC;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.nav-tabs.title > li {
  margin-bottom: -2px;
}
.nav-tabs.title > li > a {
  padding: 14px 20px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6a6a6a;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .2px;
  border-radius: 8px 8px 0 0;
  transition: all .2s ease;
  text-decoration: none;
}
.nav-tabs.title > li > a:hover {
  background: #FFFFFF;
  color: #3a3a3a;
}
.nav-tabs.title > li.active > a,
.nav-tabs.title > li.active > a:hover,
.nav-tabs.title > li.active > a:focus {
  color: #c85a5a;
  background: #fff;
  border-bottom: 2px solid #c85a5a;
  font-weight: 700;
}

/* ── 3. Заменяем зелёные галочки/иконки OpenCart на приглушённые бежевые ── */
.stock.instock i.fa-check,
.stock.instock:before {
  color: #a99686 !important;
}
.text-success,
.stock.instock {
  color: #7a9a7a !important; /* приглушённый пастельный зелёный вместо ядовитого #5cb85c */
}

/* ── 4. Бейдж «Хит» перекрасить в тёплый бежевый (был ядовито-зелёный) ── */
.product-thumb .thumb-inner .special,
.product-thumb .thumb-inner .new,
.product .image .badges > .badge,
.badge-hit,
.badge-new,
.badge-sale {
  background: #a99686 !important;
  color: #fff !important;
  padding: 5px 12px !important;
  border-radius: 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .5px !important;
  text-transform: uppercase !important;
}

/* ── 5. Три функциональных блока (tier / калькулятор / пресеты) — разные фоны ── */
.tiered-pricing-block {
  background: #fff !important;
  border: 1px solid #EAF4EA;
  border-left: 4px solid #7a9a7a;
  padding: 16px !important;
  border-radius: 10px;
  margin: 12px 0;
}
.discounts {
  background: #FFFFFF;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 13px;
}
.discounts ul {
  margin: 0;
  columns: 2;
  column-gap: 20px;
}
.discounts li {
  padding: 3px 0;
  color: #6a6a6a;
}

/* Пресет-чипы — белый фон + бежевая рамка */
.tulip-preset-chips .preset-chip {
  background: #fff !important;
  transition: all .15s ease;
}
.tulip-preset-chips .preset-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.06);
}
.tulip-preset-chips .preset-chip.active-preset {
  background: #c85a5a !important;
  color: #fff !important;
  border-color: #c85a5a !important;
}

/* ── 6. Убираем/приглушаем мобильный sticky-bar «Позвонить в теплицу» ── */
/* По консенсусу: он конфликтует с основной кнопкой Купить.
   Оставляем его показ на mobile, но делаем прозрачным и меньше — как safety net */
@media (max-width: 767px) {
  .rb-sticky-cta {
    background: rgba(200, 90, 90, .92) !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    bottom: max(12px, calc(env(safe-area-inset-bottom, 0px) + 8px)) !important;
    right: 12px !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    border-radius: 24px !important;
    box-shadow: 0 4px 14px rgba(200, 90, 90, .3) !important;
    transition: opacity .3s ease, transform .3s ease;
  }
  /* Скрываем sticky-bar, когда основная кнопка Купить в viewport (JS ставит .cta-visible на body) */
  body.cta-visible .rb-sticky-cta {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
  }
}

/* ── P0-1: Убираем горизонтальный скролл на 320px ── */
/* Виновники: mobile drawer, таблицы в описании, оверлей поиска */
html, body { overflow-x: hidden; }
.rb-mobile-drawer, .rb-search-panel {
  max-width: 100vw;
}
/* Таблицы в описании товара — оборачиваем в скролл-контейнер */
#tab-description table,
.description table,
.tab-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 14px;
}
#tab-description table th,
#tab-description table td,
.description table th,
.description table td {
  padding: 8px 10px;
  white-space: nowrap;
}
/* Индикатор скролла у таблиц */
#tab-description .table-wrapper,
.description table {
  background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)), linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0, radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.15), rgba(0,0,0,0)), radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.15), rgba(0,0,0,0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

/* ── P1-3: Пресет-чипы 48px min для tap-friendly ── */
.tulip-preset-chips .preset-chip {
  min-height: 48px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
@media (max-width: 375px) {
  .tulip-preset-chips {
    gap: 6px !important;
  }
  .tulip-preset-chips .preset-chip {
    padding: 12px 10px !important;
    font-size: 13px !important;
  }
}

/* ── P1-4: Кнопка «Написать/позвонить» — увеличить кликабельную область до 48px ── */
#btn-contact-open {
  min-height: 48px !important;
  padding: 14px 20px !important;
}

/* ── 7. Блок Гарантия — обвести мятной рамкой (доверие) ── */
#tab-warranty,
#tab-content-warranty {
  padding: 20px;
  background: #EAF4EA;
  border-radius: 12px;
  border-left: 4px solid #7a9a7a;
}

/* ═══════════════════════════════════════════════════════════════════════
   ROSBOTANIC — Единый стиль карточки товара (2026-07-17)
   Группа C: .rb-card — единый визуальный контейнер для всех блоков
   Группа D: активный чип + sticky-highlight в tier-таблице
   ═══════════════════════════════════════════════════════════════════════ */

/* Родитель правой колонки — прозрачный (наследует белый body). Карточки видны по бордеру. */
.product-data .product-info {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* ── Единая карточка .rb-card ── */
.rb-card {
  background: #fff;
  border: 1px solid rgba(46, 42, 36, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(46, 42, 36, 0.04);
  display: block;
  clear: both;
  float: none;
  width: 100%;
  box-sizing: border-box;
}
/* Обёртка правой колонки — все блоки идут вертикально + полная ширина */
.product-data .product-info,
.product-data #product {
  width: 100%;
  box-sizing: border-box;
}
.product-data .product-info > *,
.product-data #product > * {
  clear: both;
  float: none;
  max-width: 100%;
}
.product-data #product .form-group,
.product-data #product .form-group.clearfix {
  width: 100%;
  clear: both;
}
/* Гарантируем что после кнопок tier-таблица идёт следующим блоком + кнопки на всю ширину */
.order-group.order-group-simplified {
  margin: 12px 0 16px;
  clear: both;
  width: 100%;
  display: flex !important;
  flex-direction: column;
  gap: 10px;
}
.order-group.order-group-simplified > * {
  width: 100% !important;
  flex: none !important;
  box-sizing: border-box;
}
.order-group.order-group-simplified + .rb-card,
.form-group.clearfix + .rb-card {
  margin-top: 12px;
}
/* Пресет-чипы + количество на полной ширине */
.tulip-preset-chips,
.quantity {
  width: 100%;
  clear: both;
}
.rb-card__header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #3a3a3a;
  border-bottom: 1px solid rgba(46, 42, 36, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rb-card__footer {
  padding: 10px 16px;
  font-size: 12px;
  color: #4a4a4a;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(46, 42, 36, 0.06);
}
.rb-card__footer--positive {
  background: #EAF4EA;
  color: #3a3a3a;
  border-top: 1px solid #d5e5d5;
}

/* ── Tier-таблица .rb-discount-table ── */
.rb-discount-table__body {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}
.rb-discount-table__body tr {
  transition: background 0.3s ease, border-left-color 0.3s ease;
  border-left: 3px solid transparent;
}
.rb-discount-table__body tr[data-tier-row]:not(:first-child) td {
  border-top: 1px solid #F5EDE0;
}
.rb-discount-table__body td {
  padding: 10px 14px;
}
.rb-discount-table__qty {
  color: #4a4a4a;
}
.rb-discount-table__price {
  text-align: right;
}
.rb-discount-table__price strong {
  color: #c85a5a;
  font-size: 15px;
}
.rb-discount-table__price span {
  color: #6a6a6a;
  font-size: 12px;
}

/* Sticky-highlight текущей tier-строки (Группа D) */
.rb-discount-table__body tr.tier-active {
  background: rgba(200, 90, 90, 0.06);
  border-left-color: #c85a5a;
}
.rb-discount-table__body tr.tier-active .rb-discount-table__qty {
  color: #3a3a3a;
  font-weight: 500;
}

/* ── Компактный калькулятор .rb-calc ── */
.rb-calc {
  padding: 16px;
  background: #fff;
}
.rb-calc__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}
.rb-calc__row--total {
  border-top: 1px dashed rgba(46, 42, 36, 0.12);
  padding-top: 12px;
  margin-top: 4px;
}
.rb-calc__label {
  color: #6a6a6a;
}
.rb-calc__price {
  font-weight: 600;
  font-size: 16px;
  color: #3a3a3a;
}
.rb-calc__total {
  font-weight: 700;
  font-size: 20px;
  color: #3a2f28;
}
.rb-calc__badge {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 12px;
  background: #EAF4EA;
  color: #2f5a2f;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(122, 154, 122, 0.3);
}
.rb-calc__badge .tier-badge-current {
  transition: color 0.25s, transform 0.25s;
  display: inline-block;
}
.rb-calc__badge .tier-badge-current.tier-changed {
  animation: tierPulse 0.5s ease;
}
@keyframes tierPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* ── Пресет-чипы — новый стиль без ярлыков (Группа A) + активный (Группа D) ── */
.tulip-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.tulip-preset-chips .preset-chip {
  padding: 12px 16px !important;
  min-height: 48px !important;
  min-width: 56px;
  border: 1.5px solid rgba(46, 42, 36, 0.15) !important;
  background: #fff !important;
  color: #3a3a3a !important;
  border-radius: 22px;
  cursor: pointer;
  font-size: 15px !important;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.tulip-preset-chips .preset-chip:hover {
  border-color: #c85a5a !important;
  color: #c85a5a !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(200, 90, 90, 0.12);
}
.tulip-preset-chips .preset-chip.active-preset {
  background: #c85a5a !important;
  color: #fff !important;
  border-color: #c85a5a !important;
  box-shadow: 0 4px 12px rgba(200, 90, 90, 0.28);
}

/* Небольшая корректировка на 320px */
@media (max-width: 375px) {
  .tulip-preset-chips {
    gap: 6px !important;
  }
  .tulip-preset-chips .preset-chip {
    padding: 12px 12px !important;
    font-size: 14px !important;
    min-width: 48px;
  }
}

/* ── Скрываем «Вы экономите» и nudge (Группа A) ── */
.tiered-saved,
.tiered-to-next {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   ROSBOTANIC — Минимализм правой колонки (2026-07-17)
   Консенсус 4 агентов: creative_director + ux_marketer + color_psychologist + wow_effects
   Референсы: Aesop, Muji, Everlane, Notion
   Идея: минимализм через воздух и один акцентный цвет, без бордеров и теней
   ═══════════════════════════════════════════════════════════════════════ */

/* ── rb-stock-info: убираем плашку EAF4EA, оставляем текст + маленькая точка ── */
.rb-stock-info {
  background: transparent !important;
  padding: 8px 0 !important;
  border-radius: 0 !important;
  color: #6a6a6a !important;
  font-size: 13px !important;
  margin: 8px 0 12px !important;
}
.rb-stock-info > span:first-child {
  width: 6px !important;
  height: 6px !important;
  box-shadow: 0 0 0 2px rgba(90, 154, 90, .18) !important;
}
.rb-stock-info strong {
  color: #3a3a3a;
  font-weight: 600;
}

/* ── rb-card: убираем border и тень с больших блоков ── */
.rb-card {
  border: 0 !important;
  box-shadow: none !important;
}

/* ── Калькулятор .rb-calc — светло-бежевый #FAFAF7 фон, без бордера ── */
.tiered-pricing-block.rb-card.rb-calc,
.rb-calc {
  background: #FAFAF7 !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 12px !important;
}
/* Убираем пунктирный разделитель перед «Итого» */
.rb-calc__row--total {
  border-top: 0 !important;
  padding-top: 12px !important;
  margin-top: 4px !important;
}

/* Убираем яркий бейдж «Розница/-10%/…» — визуальный шум */
.tiered-badge.rb-calc__badge {
  display: none !important;
}

/* ── Пресет-чипы — сетка 4К, единая ширина, олива на активном (Aesop/Muji) ── */
.tulip-preset-chips {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  margin: 8px 0 16px !important;
}
.tulip-preset-chips .preset-chip {
  background: transparent !important;
  border: 1px solid rgba(46, 42, 36, 0.08) !important;
  color: #4a4a4a !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  min-height: 48px !important;
  min-width: 0 !important;
  padding: 12px 8px !important;
  width: 100% !important;
}
.tulip-preset-chips .preset-chip:hover {
  border-color: rgba(46, 42, 36, 0.20) !important;
  color: #2E2A24 !important;
  background: rgba(46, 42, 36, 0.02) !important;
  transform: none !important;
  box-shadow: none !important;
}
.tulip-preset-chips .preset-chip.active-preset {
  background: #5C7F5A !important;
  color: #fff !important;
  border-color: #5C7F5A !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}
.tulip-preset-chips .preset-chip.active-preset:hover {
  background: #4d6d4b !important;
  border-color: #4d6d4b !important;
  color: #fff !important;
}
/* Mobile ≤ 375px: 3 колонки, последний чип на всю строку */
@media (max-width: 375px) {
  .tulip-preset-chips {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .tulip-preset-chips .preset-chip {
    padding: 12px 6px !important;
    font-size: 13px !important;
  }
  .tulip-preset-chips .preset-chip:last-child {
    grid-column: 1 / -1;
  }
}

/* ── Кнопка «Купить»: минимализм — обычный регистр, 15px 600, без тени и hover-lift ── */
.order-group-simplified #button-cart {
  padding: 14px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-shadow: none !important;
  transition: background .15s ease !important;
  transform: none !important;
}
.order-group-simplified #button-cart:hover,
.order-group-simplified #button-cart:focus {
  transform: none !important;
  box-shadow: none !important;
  background: #b04d4d !important;
}
.order-group-simplified #button-cart img {
  width: 18px !important;
  height: 18px !important;
  opacity: .95;
}

/* ── Tier-таблица — активная строка спокойная, без красной полоски ── */
.rb-discount-table__body tr.tier-active {
  background: rgba(46, 42, 36, 0.035) !important;
  border-left-color: transparent !important;
}
.rb-discount-table__body tr.tier-active .rb-discount-table__qty strong,
.rb-discount-table__body tr.tier-active .rb-discount-table__price strong {
  color: #2E2A24 !important;
}

/* ── rb-card__header и rb-card__footer — без border и uppercase ── */
.rb-card__header {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #6a6a6a !important;
  border-bottom: 0 !important;
  padding: 14px 16px 8px !important;
}
.rb-card__footer {
  border-top: 0 !important;
  color: #6a6a6a !important;
  font-size: 12px !important;
  padding: 4px 16px 14px !important;
}
.rb-card__footer--positive {
  background: transparent !important;
  color: #6a6a6a !important;
}

/* ── Кнопка «Написать/позвонить» — тонкий линк, приглушённый ── */
#btn-contact-open {
  color: #6a6a6a !important;
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  text-decoration-thickness: 1px !important;
  text-decoration-color: rgba(46, 42, 36, 0.2) !important;
  padding: 12px 20px !important;
  font-weight: 400 !important;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#btn-contact-open:hover,
#btn-contact-open:focus {
  color: #2E2A24 !important;
  text-decoration-color: #2E2A24 !important;
  background: transparent !important;
}
#btn-contact-open img {
  opacity: .7;
}

/* ── Единый ритм: 20px между смысловыми блоками ── */
.rb-card + .rb-card,
.form-group.clearfix + .rb-card,
.order-group-simplified + .rb-card {
  margin-top: 20px !important;
}
.tulip-preset-chips + .quantity {
  margin-top: 4px !important;
}

/* ── Заголовок таба «Оптовая скидка» — иконка чуть меньше и приглушённее ── */
.rb-discount-table .rb-card__header img,
.rb-discount-table .rb-card__footer img {
  width: 14px !important;
  height: 14px !important;
  opacity: .6;
}

/* ═══════════════════════════════════════════════════════════════════════
   ROSBOTANIC — Mobile Tabs → Accordion (2026-07-17)
   Консенсус 3 агентов: creative_director + ux_marketer + wow_effects
   Референсы: Aesop, Farfetch, Muji, Everlane
   Desktop (>767px): штатные Bootstrap-вкладки. Mobile (≤767px): аккордеон.
   ═══════════════════════════════════════════════════════════════════════ */

/* Desktop: аккордеон скрыт */
.rb-accordion { display: none; }

@media (max-width: 767px) {
  /* Когда JS построил аккордеон — скрываем оригинальные табы и контент */
  body.rb-acc-active .nav-tabs.title,
  body.rb-acc-active > .tab-content,
  body.rb-acc-active .tab-content {
    display: none !important;
  }

  .rb-accordion {
    display: block;
    margin: 24px 0 0;
  }

  .rb-acc__item {
    border-top: 1px solid rgba(46, 42, 36, 0.08);
  }
  .rb-acc__item:last-child {
    border-bottom: 1px solid rgba(46, 42, 36, 0.08);
  }

  .rb-acc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 16px 4px;
    background: transparent;
    border: 0;
    color: #2E2A24;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    min-height: 48px;
    line-height: 1.3;
    -webkit-tap-highlight-color: rgba(92, 127, 90, 0.06);
  }
  .rb-acc__header:focus {
    outline: none;
    color: #5C7F5A;
  }
  .rb-acc__header:hover {
    color: #5C7F5A;
  }
  .rb-acc__title { flex: 1; }
  .rb-acc__header svg {
    color: #a0a0a0;
    transition: transform 0.25s ease, color 0.15s ease;
    flex-shrink: 0;
  }
  .rb-acc-open > .rb-acc__header svg {
    transform: rotate(90deg);
    color: #5C7F5A;
  }

  /* Тело секции — по умолчанию скрыто */
  .rb-acc__body {
    display: none;
    padding: 0 4px 20px;
  }
  .rb-acc-open > .rb-acc__body {
    display: block;
  }

  /* Внутренние tab-pane больше не скрываются */
  .rb-acc__body .tab-pane {
    display: block !important;
    padding: 0;
  }

  /* Уборка большого верхнего отступа у первой секции — «Описание» */
  .rb-accordion > .rb-acc__item:first-child {
    border-top: 0;
  }

  /* Читаемая типографика внутри аккордеона */
  .rb-acc__body p,
  .rb-acc__body li {
    font-size: 15px;
    line-height: 1.55;
    color: #3a3a3a;
  }
  .rb-acc__body h2,
  .rb-acc__body h3 {
    font-size: 17px;
    font-weight: 600;
    color: #2E2A24;
    margin: 18px 0 8px;
  }

  /* Таблицы внутри — с горизонтальным скроллом */
  .rb-acc__body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Атрибуты (Характеристики) — вертикальные колонки на mobile */
  .rb-acc__body .attributes {
    display: block;
  }
  .rb-acc__body .attributes__column {
    display: block;
    width: 100%;
  }
}
