/* ============================================
   Блок табов страницы товара
   Цвета / радиусы взяты из style.css:
     #2F2F35 — основной текст
     #777E90 / #9fa4bc — вторичный текст
     #3B71FE — акцент (синий)
     #E6E8EC — граница
     #f5f5f5 — фон карточек (= .answer)
     border-radius: 0.625rem = 10px
   ============================================ */

/* ── Обёртка ────────────────────────────────── */
.product-tabs-wrapper {
  width: 1170px;
  margin: 0 auto;
  padding: 40px 0 20px;
}

/* ── Навигация ──────────────────────────────── */
.product-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 2px solid #E6E8EC;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.product-tabs-nav::-webkit-scrollbar { display: none; }

.product-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: #777E90;
  font-size: 15px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-radius: 0;
  outline: none;
}
.product-tab-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.product-tab-btn:hover {
  color: #2F2F35;
}
.product-tab-btn.active {
  color: #3B71FE;
  border-bottom-color: #3B71FE;
}

/* ── Панели контента ────────────────────────── */
.product-tabs-content {
  position: relative;
}
.product-tab-pane {
  display: none;
}
.product-tab-pane.active {
  display: block;
  animation: pt-fadein 0.25s ease;
}
@keyframes pt-fadein {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Сетка карточек характеристик ──────────── */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.spec-card {
  background: #f5f5f5;
  border-radius: 0.625rem;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.spec-card:hover {
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(59,113,254,0.10);
}

.spec-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  line-height: 1;
}

.spec-content {
  flex: 1;
  min-width: 0;
}
.spec-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9fa4bc;
  margin-bottom: 3px;
  font-family: "Inter", sans-serif;
}
.spec-value {
  font-size: 15px;
  font-weight: 600;
  color: #2F2F35;
  font-family: "Inter", sans-serif;
  line-height: 1.3;
  word-break: break-word;
}

/* ── Обратная совместимость: старый dl/dt/dd ── */
.specs-legacy dl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f5f5;
  border-radius: 0.625rem;
  padding: 14px 20px;
  margin-bottom: 10px;
}
.specs-legacy dt {
  color: #777E90;
  font-weight: 500;
  font-size: 14px;
  font-family: "Inter", sans-serif;
}
.specs-legacy dd {
  text-align: right;
  color: #2F2F35;
  font-weight: 600;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  margin: 0;
}

/* ── Пустое состояние ───────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: #9fa4bc;
  background: #f5f5f5;
  border-radius: 0.625rem;
}
.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.6;
}
.empty-state p {
  font-size: 15px;
  margin: 0;
  font-family: "Inter", sans-serif;
}

/* ── Типографика внутри табов ───────────────── */
.product-tab-pane h2,
.product-tab-pane h3,
.product-tab-pane h4 {
  font-size: 1.375rem;
  font-weight: 600;
  color: #2F2F35;
  font-family: "Inter", sans-serif;
  line-height: 1.4;
  margin: 20px 0 12px;
}
.product-tab-pane h2:first-child,
.product-tab-pane h3:first-child,
.product-tab-pane h4:first-child { margin-top: 0; }

.product-tab-pane p {
  color: #2F2F35;
  font-size: 1rem;
  line-height: 1.6;
  font-family: "Inter", sans-serif;
  margin-bottom: 12px;
}
.product-tab-pane ul,
.product-tab-pane ol {
  margin: 0 0 14px 20px;
  color: #2F2F35;
  font-family: "Inter", sans-serif;
}
.product-tab-pane li { margin-bottom: 6px; line-height: 1.6; }

/* Нумерованные шаги (инструкция) */
.product-tab-pane ol { list-style: none; margin-left: 0; padding: 0; }
.product-tab-pane ol li {
  position: relative;
  padding-left: 38px;
  counter-increment: step;
  margin-bottom: 14px;
}
.product-tab-pane ol { counter-reset: step; }
.product-tab-pane ol li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 26px; height: 26px;
  background: #3B71FE;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Адаптив ────────────────────────────────── */
@media (max-width: 1200px) {
  .product-tabs-wrapper { width: 100%; padding: 30px 20px 16px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Заголовок панели: аккордеон на телефоне ── */
.product-tab-head { display: none; }

@media (max-width: 768px) {
  /*
    До 768px вкладки превращаются в аккордеон.

    Было: пять кнопок в ряду с overflow-x:auto и скрытым скроллбаром. На экране
    360px помещались две с половиной, о трёх оставшихся догадаться было нельзя,
    а шрифт 13px и высота 40px делали попадание пальцем лотереей.
  */
  .product-tabs-nav { display: none; }

  .product-tabs-content {
    border-top: 1px solid #E6E8EC;
  }

  .product-tab-pane {
    display: block;
    border-bottom: 1px solid #E6E8EC;
  }

  /*
    Содержимое скрыто, пока секция не раскрыта; заголовок виден всегда.
    Прячем именно у неактивной панели, а не показываем через display:revert у
    активной: revert откатывает к стилю браузера и снёс бы flex у сводки
    отзывов и у карточек характеристик.
  */
  .product-tab-pane:not(.active) > *:not(.product-tab-head) { display: none; }

  .product-tab-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 14px 2px;
    background: transparent;
    border: none;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2F2F35;
    text-align: left;
    cursor: pointer;
  }
  .product-tab-head svg { flex-shrink: 0; }
  .product-tab-head__label { flex: 1; }
  .product-tab-head__chevron {
    color: #777E90;
    transition: transform 0.2s ease;
  }
  .product-tab-pane.active .product-tab-head { color: #3B71FE; }
  .product-tab-pane.active .product-tab-head__chevron { transform: rotate(180deg); }

  .specs-grid { grid-template-columns: 1fr; gap: 8px; }
  .spec-card { padding: 14px 16px; }
}

/* ============================================
   Отзывы и рейтинг
   Палитра та же, что выше. Звёзды — #FFB71D (цвет уже был
   заведён в style.css как .icon-star, держим единым).
   ============================================ */

/* ── Счётчик на кнопке таба ─────────────────── */
.product-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #E6E8EC;
  color: #777E90;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.product-tab-btn.active .product-tab-count {
  background: #3B71FE;
  color: #fff;
}

/* ── Рейтинг (у h1 и в карточках каталога) ── */
.product-rating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 6px 0 12px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  text-decoration: none;
  color: inherit;
}

/*
  Крупный вариант — под заголовком товара. H1 там 2.5rem, и ряд 16-пиксельных
  звёзд рядом с ним выглядел примечанием, хотя рейтинг с числом отзывов — один
  из главных доводов на странице.
*/
.product-rating--lg {
  gap: 10px;
  margin: 10px 0 16px;
  font-size: 17px;
}
.product-rating--lg .product-rating__star { width: 23px; height: 23px; }
.product-rating--lg .product-rating__stars { gap: 2px; }
.product-rating--lg .product-rating__value { font-size: 19px; }
.product-rating--link { cursor: pointer; }
.product-rating--link:hover .product-rating__count {
  color: #3B71FE;
  text-decoration: underline;
}

.product-rating__stars {
  display: inline-flex;
  gap: 1px;
  line-height: 0;
}
.product-rating__star { color: #E6E8EC; }
.product-rating__star.is-filled { color: #FFB71D; }

.product-rating__value {
  font-weight: 700;
  color: #2F2F35;
}
.product-rating__count {
  color: #777E90;
  transition: color 0.2s ease;
}

/* В карточке каталога рейтинг мельче и без отступа сверху */
.pricing ~ .product-rating,
.row-product-name + .product-rating {
  margin: 2px 0 0;
  font-size: 13px;
}

/* ── Сводка ─────────────────────────────────── */
.reviews-summary {
  display: flex;
  gap: 40px;
  align-items: center;
  padding: 22px 26px;
  background: #f5f5f5;
  border-radius: 0.625rem;
  margin-bottom: 22px;
}

.reviews-summary__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  min-width: 130px;
}
.reviews-summary__value {
  font-family: "Inter", sans-serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: #2F2F35;
}
.reviews-summary__score .product-rating { margin: 0; }
.reviews-summary__total {
  font-size: 13px;
  color: #777E90;
}

.reviews-summary__bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.reviews-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #777E90;
}
.reviews-bar__label {
  width: 10px;
  text-align: right;
  font-weight: 600;
  color: #2F2F35;
}
.reviews-bar__star {
  color: #FFB71D;
  flex-shrink: 0;
}
.reviews-bar__track {
  flex: 1;
  height: 7px;
  background: #E6E8EC;
  border-radius: 4px;
  overflow: hidden;
}
.reviews-bar__fill {
  display: block;
  height: 100%;
  background: #FFB71D;
  border-radius: 4px;
}
.reviews-bar__num {
  width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reviews-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: #777E90;
}

/* ── Список ─────────────────────────────────── */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #E6E8EC;
  border-radius: 0.625rem;
}

.review__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.review__author {
  font-weight: 600;
  color: #2F2F35;
  font-size: 15px;
}
.review__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.review__date {
  margin-left: auto;
  font-size: 13px;
  color: #9fa4bc;
}

.review__stars {
  display: flex;
  gap: 1px;
  margin-bottom: 10px;
  line-height: 0;
}
.review__star { color: #E6E8EC; }
.review__star.is-filled { color: #FFB71D; }

.review__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: #2F2F35;
}

.review__pros,
.review__cons {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #777E90;
}
.review__pros strong { color: #2e7d32; }
.review__cons strong { color: #b3261e; }

.review__reply {
  margin-top: 14px;
  padding: 12px 16px;
  background: #f5f5f5;
  border-left: 3px solid #3B71FE;
  border-radius: 0 0.625rem 0.625rem 0;
}
.review__reply-title {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #3B71FE;
}
.review__reply p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #2F2F35;
}

.reviews-more {
  margin: 18px 0 0;
  font-size: 13px;
  color: #9fa4bc;
  text-align: center;
}

/* ── Адаптив ────────────────────────────────── */
@media (max-width: 768px) {
  .reviews-summary {
    flex-direction: column;
    gap: 18px;
    padding: 18px;
  }
  .reviews-summary__score { min-width: 0; }
  .reviews-summary__bars { width: 100%; }
  .review { padding: 14px 16px; }
  .review__date { margin-left: 0; width: 100%; }
}

/* ============================================
   Форма отзыва (страница /review/{order})
   Живёт здесь, а не отдельным файлом: этот CSS уже подключён
   в layouts/app.blade.php на всех страницах, отдельный файл
   стоил бы лишнего запроса ради одной формы.
   ============================================ */

.review-form-section {
  padding: 50px 20px 80px;
}

.review-form {
  max-width: 640px;
  margin: 0 auto;
  font-family: "Inter", sans-serif;
}

.review-form__title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  color: #2F2F35;
}
.review-form__product {
  margin: 0 0 28px;
  font-size: 15px;
  color: #777E90;
}

.review-form__field { margin-bottom: 20px; }

.review-form__row {
  display: flex;
  gap: 16px;
}
.review-form__row .review-form__field { flex: 1; min-width: 0; }

.review-form__label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #2F2F35;
}

.review-form__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #E6E8EC;
  border-radius: 0.625rem;
  font-family: inherit;
  font-size: 15px;
  color: #2F2F35;
  background: #fff;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.review-form__input:focus {
  outline: none;
  border-color: #3B71FE;
}
.review-form__input::placeholder { color: #9fa4bc; }

.review-form__stars {
  display: flex;
  gap: 4px;
}
.review-form__star {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #E6E8EC;
  line-height: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}
.review-form__star:hover { transform: scale(1.12); }
.review-form__star.is-filled { color: #FFB71D; }

.review-form__error {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #b3261e;
}

/* Ловушка для ботов: убрана из потока и от скринридеров */
.review-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.review-form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: #3B71FE;
  color: #fff;
  border: none;
  border-radius: 0.625rem;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.review-form__btn:hover { background: #2a5ce0; color: #fff; }
.review-form__btn[disabled] { opacity: 0.6; cursor: default; }

.review-form__note {
  margin: 14px 0 0;
  font-size: 13px;
  color: #9fa4bc;
}

.review-form__done {
  text-align: center;
  padding: 40px 0;
}
.review-form__done h1 {
  margin: 18px 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: #2F2F35;
}
.review-form__done p {
  margin: 0 0 20px;
  font-size: 15px;
  color: #777E90;
}
.review-form__quote {
  padding: 14px 18px;
  background: #f5f5f5;
  border-radius: 0.625rem;
  font-style: italic;
  text-align: left;
}

@media (max-width: 640px) {
  .review-form__row { flex-direction: column; gap: 0; }
  .review-form__title { font-size: 24px; }
}

/* Пометка «необязательно» у полей формы отзыва */
.review-form__optional {
  margin-left: 6px;
  font-weight: 400;
  font-size: 13px;
  color: #9fa4bc;
}
.review-form__hint {
  margin: -18px 0 26px;
  font-size: 14px;
  color: #777E90;
}

/* ============================================
   Блок «Выберите страну аккаунта»

   Раньше страны переключались кнопками wire:click — для краулера их не
   существовало, и 15 из 18 разделов не имели ни одной входящей ссылки.
   ============================================ */
.country-links {
  margin: 24px 0 8px;
  font-family: "Inter", sans-serif;
}
.country-links__title {
  font-size: 20px;
  font-weight: 600;
  color: #2F2F35;
  margin: 0 0 12px;
}
.country-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.country-links__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #E6E8EC;
  border-radius: 0.625rem;
  background: #fff;
  color: #2F2F35;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.country-links__link:hover {
  border-color: #3B71FE;
  color: #3B71FE;
}
.country-links__link.is-current {
  background: #f5f5f5;
  border-color: #d8dade;
  color: #777E90;
  pointer-events: none;
}

@media (max-width: 768px) {
  .country-links__title { font-size: 18px; }
  .country-links__link { min-height: 44px; font-size: 15px; }
}

/*
  Выпадашка Apple в шапке: 18 стран вместо трёх больше не помещаются в один
  столбец, поэтому раскладываем в колонки. Ширина колонки под самое длинное
  название — «Саудовская Аравия».
*/
.list-reset--countries {
  column-count: 2;
  column-gap: 24px;
  min-width: 340px;
}
@media (max-width: 1200px) {
  .list-reset--countries { column-count: 1; min-width: 0; }
}
