/* ===================================================================
   style_blum.css — карточка clicpick.ru (шкура Blum) v7
   24.06.2026 — новый макет: правая компактная всё-в-одном,
                центр = описание + характеристики,
                характеристики растягиваются с обрезкой по высоте.

   Структура:
     ЛЕВО  (c-gallery, без рамки):  c-top + фото + миниатюры (4 шт)
     ЦЕНТР (c-center):              c-desc (рамка) + c-specs (рамка с обрезкой)
     ПРАВО (c-purchase / pbox):     лого + артикул + рейтинг + бренд/страна/code
                                    + цена + наличие + количество + 2 кнопки

   Высоты: pbox по контенту. c-specs растягивается до низа pbox,
   лишние характеристики обрезаются через overflow:hidden.
   Низы всех трёх колонок выравниваются автоматически.
=================================================================== */

.product-card-wrapper { background: #fff; }

/* Общая рамка блоков */
.product-card-grid .cbox {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  padding: 16px 18px;
}

/* =====================================================
   СЕТКА ДЕСКТОП (≥1200px)
   Пропорции: левая 1.5fr | центр 1.2fr | правая 280px
   Левая самая широкая (для фото), центр чуть уже,
   правая компактная (чтобы кнопки не выглядели бельмом).
===================================================== */
.product-card-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 280px;
  gap: 15px;
  align-items: stretch;
  margin: 0 0 30px;
}

/* Левая (галерея) — без рамки */
.product-card-grid .c-gallery {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  padding: 0;
}

/* Центр — две плашки: описание + характеристики.
   Высота через грид-стретч. Растягиваемый блок внутри = c-specs (flex:1). */
.product-card-grid .c-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

/* Правая колонка.

   ПРОБЛЕМА 1: тема Mango ставит #product { margin-top: 10px }
   глобально. У нас pbox имеет id="product" (стандарт OpenCart),
   поэтому правая колонка сдвигается вниз на 10px относительно центра.
   Сбрасываем этот отступ для нашей карточки.

   ПРОБЛЕМА 2: align-items:stretch грида не применяется к pbox
   через промежуточный слой c-purchase. Решение — делаем c-purchase
   "прозрачной" через display:contents, и pbox становится прямым
   грид-чайлдом. Стретч грида растягивает pbox напрямую.

   margin-top:auto на pc-price-row прижимает покупку к низу,
   между таблицей "Бренд/Страна/Code" и ценой появляется воздух. */
.product-card-grid .c-purchase {
  display: contents;
}
.product-card-grid .c-purchase .pbox {
  grid-column: 3;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  margin-top: 0 !important;
}
.product-card-grid .pbox .pc-price-row {
  margin-top: auto;
}

/* =====================================================
   ГАЛЕРЕЯ — внутренности (c-top, фото, миниатюры)
===================================================== */

/* c-top теперь сверху галереи, прижат к верху, занимает свою естественную высоту */
.product-card-grid .c-gallery .c-top {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  margin-bottom: 12px;
}

/* Фото: фиксированная высота, прямоугольное (не квадрат).
   380px — золотая середина: больше воздуха для крупных петель,
   но не как раньше квадрат на пол-карточки. */
.product-card-grid .c-gallery .photo-wrap {
  flex: 0 0 auto;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  padding: 8px 0;
  overflow: hidden;
}
.product-card-grid .c-gallery .photo-wrap .product-image,
.product-card-grid .c-gallery .photo-wrap .easyzoom,
.product-card-grid .c-gallery .photo-wrap .thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  text-align: center;
  margin: 0;
}
.product-card-grid .c-gallery .photo-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.product-card-grid .c-gallery .expand {
  position: absolute;
  top: 8px; right: 8px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0e0e0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #666;
  padding: 0;
  z-index: 3;
}

.product-card-grid .c-gallery .photo-wrap .stickers {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
  pointer-events: none;
}
.product-card-grid .c-gallery .photo-wrap .stickers .product-label { pointer-events: auto; }

/* Миниатюры — 4 равные в ряд на всю ширину галереи */
.product-card-grid .c-gallery .thumbs-row {
  flex: 0 0 auto;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 90px;
}
.product-card-grid .c-gallery .arr {
  width: 28px; height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #888;
  padding: 0;
  position: static !important;
  margin: 0 !important;
}
.product-card-grid .c-gallery .thumbs {
  flex: 1;
  height: 100%;
  overflow: hidden;
}
.product-card-grid .c-gallery .swiper-container,
.product-card-grid .c-gallery .swiper-wrapper {
  height: 100%;
}
.product-card-grid .c-gallery .swiper-wrapper {
  display: flex;
  gap: 8px;
}
/* 4 миниатюры на всю ширину контейнера, остальные скрыты грид-стилем swiper'а */
.product-card-grid .c-gallery .thumb {
  height: 100% !important;
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: calc((100% - 24px) / 4) !important;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  padding: 0;
}
/* Подсветка активной миниатюры — только по нашему классу .act,
   которым управляет JS-обработчик клика. Класс .swiper-slide-active
   ставит сам swiper и не снимает при наших переключениях — поэтому
   его в селектор не включаем (иначе подсвечивались бы две сразу). */
.product-card-grid .c-gallery .thumb.act {
  border: 2px solid #D85A30;
}
.product-card-grid .c-gallery .thumb img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.product-card-grid .c-gallery .thumb a {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}

/* =====================================================
   ОБЩИЕ ИКОНКИ
===================================================== */
.product-card-grid svg.i,
.product-card-grid svg.i18,
.product-card-grid svg.i20 {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.product-card-grid svg.i   { width: 16px; height: 16px; }
.product-card-grid svg.i18 { width: 18px; height: 18px; }
.product-card-grid svg.i20 { width: 20px; height: 20px; }

/* =====================================================
   БЛОК 1: c-top (H1 + иконки + лого) — без рамки
===================================================== */
.product-card-grid .c-top {
  padding: 0;
  border: none;
  background: transparent;
}
.product-card-grid .c-top .h1.pc-product-name {
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #1a1a1a !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
}
.product-card-grid .c-top .actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.product-card-grid .c-top .abtn {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #666;
  padding: 0;
  transition: border-color .15s, color .15s;
}
.product-card-grid .c-top .abtn:hover {
  border-color: #D85A30;
  color: #D85A30;
}
.product-card-grid .c-top .abtn.abtn--active {
  border-color: #87c301;
  color: #87c301;
  background: #f5ffdf;
}
/* Тултип «Ссылка скопирована» у кнопки поделиться */
.product-card-grid .c-top .abtn {
  position: relative;
}
.product-card-grid .c-top .pc-share-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}

.product-card-grid .c-top .brand-row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}
.product-card-grid .c-top .brand-text {
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: #D85A30;
  line-height: 1;
  letter-spacing: -0.5px;
}
.product-card-grid .c-top .brand-text sup {
  font-size: 11px;
  font-style: normal;
  vertical-align: super;
}

/* =====================================================
   БЛОК 2: c-info
===================================================== */
.product-card-grid .skr {
  display: flex; align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.product-card-grid .sl { font-size: 13px; color: #888; }
.product-card-grid .sv {
  font-size: 14px; font-weight: 600; color: #1a1a1a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.product-card-grid .cbtn {
  width: 24px; height: 24px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #888;
  padding: 0;
}
.product-card-grid .cbtn.pc-copy-btn--ok { color: #2e7d32; border-color: #2e7d32; }

.product-card-grid .rrow {
  display: flex; align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.product-card-grid .stars { color: #D85A30; font-size: 14px; letter-spacing: 1px; }
.product-card-grid .stars .fa-star,
.product-card-grid .stars .far { font-size: 14px; }
.product-card-grid .rn { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.product-card-grid .rc { font-size: 13px; color: #888; text-decoration: none; }
.product-card-grid .rc:hover { color: #D85A30; }

.product-card-grid .idt {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.product-card-grid .idt tr { border-bottom: 1px solid #f0f0f0; }
.product-card-grid .idt tr:last-child { border-bottom: none; }
.product-card-grid .idt td {
  padding: 6px 0;
  font-size: 13px;
  vertical-align: top;
}
.product-card-grid .ik { color: #888; width: 45%; }
.product-card-grid .iv { font-weight: 500; color: #1a1a1a; text-align: right; }
.product-card-grid .iv.br a,
.product-card-grid .iv.br { color: #D85A30; text-decoration: none; }
.product-card-grid .iv.br a:hover { text-decoration: underline; }

.product-card-grid .dtxt {
  font-size: 13px; color: #444; line-height: 1.6;
  margin: 0 0 8px;
}
.product-card-grid .dtxt p { margin: 0 0 6px; }
.product-card-grid .dtxt p:last-child { margin-bottom: 0; }
.product-card-grid .dtxt ul,
.product-card-grid .dtxt ol { margin: 4px 0; padding-left: 18px; }

/* Заголовки внутри КОРОТКОГО описания (.dtxt, центральная колонка карточки):
   — плашка с оранжевой левой полосой
   — компактный шрифт (меньше H1 товара)
   — ширина "по содержимому", максимум 60% колонки (просьба:
     в карточке ужать вдвое, в табе оставить на всю ширину).
   Пишем в админке просто <h2>Текст</h2> — без div-обёртки и без style. */
.product-card-grid .dtxt h1,
.product-card-grid .dtxt h2,
.product-card-grid .dtxt h3,
.product-card-grid .dtxt h4 {
  display: inline-block;
  max-width: 60%;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #1a1a1a !important;
  margin: 0 0 10px !important;
  padding: 8px 12px !important;
  border: none !important;
  border-left: 4px solid #D85A30 !important;
  background: #fff !important;
  text-transform: none !important;
}
/* Глушим псевдоэлементы темы Mango (палочки/декор перед заголовками) */
.product-card-grid .dtxt h1::before,
.product-card-grid .dtxt h2::before,
.product-card-grid .dtxt h3::before,
.product-card-grid .dtxt h4::before,
.product-card-grid .dtxt h1::after,
.product-card-grid .dtxt h2::after,
.product-card-grid .dtxt h3::after,
.product-card-grid .dtxt h4::after {
  display: none !important;
  content: none !important;
}

/* Заголовки внутри ПОЛНОГО описания (таб #tab-description) —
   тот же стиль "плашка с оранжевой полосой", но крупнее и на всю ширину. */
#tab-description h1,
#tab-description h2,
#tab-description h3,
#tab-description h4 {
  display: block;
  max-width: none;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: #1a1a1a !important;
  margin: 18px 0 12px !important;
  padding: 12px 16px !important;
  border: none !important;
  border-left: 4px solid #D85A30 !important;
  background: #fff !important;
  text-transform: none !important;
}
#tab-description h1:first-child,
#tab-description h2:first-child,
#tab-description h3:first-child,
#tab-description h4:first-child { margin-top: 0 !important; }
#tab-description h1::before,
#tab-description h2::before,
#tab-description h3::before,
#tab-description h4::before,
#tab-description h1::after,
#tab-description h2::after,
#tab-description h3::after,
#tab-description h4::after {
  display: none !important;
  content: none !important;
}
.product-card-grid .dmore {
  font-size: 13px; color: #D85A30; font-weight: 500;
  text-decoration: none;
}
.product-card-grid .dmore:hover { text-decoration: underline; }

/* =====================================================
   c-specs — характеристики с обрезкой по высоте

   c-specs растягивается (flex:1) до низа правой колонки.
   Внутри .specs-list — overflow:hidden обрезает лишние
   строки, не помещающиеся в доступную высоту.
   "Смотреть все..." всегда видна внизу плашки.
===================================================== */
.product-card-grid .c-specs {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.product-card-grid .c-specs .specs-list {
  flex: 1 1 0;
  overflow: hidden;
  min-height: 0;
}
.product-card-grid .stit {
  font-size: 15px; font-weight: 600; color: #1a1a1a;
  margin-bottom: 12px;
  flex: 0 0 auto;
}
.product-card-grid .spec {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 13px;
}
.product-card-grid .spec:last-of-type { border-bottom: none; }
.product-card-grid .sk  { color: #777; flex: 0 0 auto; }
.product-card-grid .sv2 { font-weight: 500; color: #1a1a1a; text-align: right; }
.product-card-grid .smore {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px; color: #D85A30; font-weight: 500;
  text-decoration: none;
  flex: 0 0 auto;
}
.product-card-grid .smore:hover { text-decoration: underline; }

/* =====================================================
   БЛОК 3: pbox (покупка)
===================================================== */
.product-card-grid .pbox { padding: 16px; }

.product-card-grid .plogo {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.product-card-grid .pbadge {
  background: #D85A30;
  border-radius: 8px;
  padding: 5px 12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 26px;
}
.product-card-grid .pbadge-text {
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
}
.product-card-grid .pbadge-text sup {
  font-size: 9px;
  font-style: normal;
  vertical-align: super;
}

.product-card-grid .pc-price-row { margin-bottom: 6px; }
.product-card-grid .pr {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}
.product-card-grid .pru {
  font-size: 13px;
  color: #888;
  margin-left: 4px;
}
.product-card-grid .pc-price-old { text-decoration: line-through; }

.product-card-grid .pc-discounts {
  font-size: 12px; color: #666;
  margin: 4px 0 8px;
}
.product-card-grid .pc-discounts ul { margin: 0; padding: 0; }
.product-card-grid .pc-discounts li { padding: 2px 0; }

.product-card-grid .stk {
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.product-card-grid .stk--in  { color: #2e7d32; }
.product-card-grid .stk--in svg { color: #2e7d32; }
.product-card-grid .stk--out { color: #b00; }

.product-card-grid .pc-options { margin-bottom: 10px; }
.product-card-grid .pc-options .form-group { margin-bottom: 8px; }
.product-card-grid .pc-options .control-label {
  font-size: 12px; color: #888;
  margin-bottom: 4px;
  display: block;
}

.product-card-grid .ql {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}

.product-card-grid .quantity.step {
  display: flex !important;
  align-items: center !important;
  width: 160px !important;
  height: 44px !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  margin-bottom: 10px !important;
  padding: 0 !important;
  background: #fff !important;
}
.product-card-grid .quantity.step .qty-minus,
.product-card-grid .quantity.step .qty-plus {
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0 !important;
  background: #f5f5f3 !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 20px !important;
  color: #555 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.product-card-grid .quantity.step .qty-minus:hover,
.product-card-grid .quantity.step .qty-plus:hover {
  background: #eaeae6 !important;
}
.product-card-grid .quantity.step .ss {
  width: 1px; height: 24px;
  background: #e8e8e8;
  flex-shrink: 0;
}
.product-card-grid .quantity.step .input-quantity {
  flex: 1 !important;
  width: auto !important;
  height: 44px !important;
  text-align: center !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  color: #1a1a1a !important;
}

.product-card-grid .bb {
  width: 100%;
  height: 44px;
  background: #D85A30 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  margin-bottom: 8px;
  display: block;
  padding: 0;
  transition: background .15s;
}
.product-card-grid .bb:hover { background: #c24c25 !important; }

.product-card-grid .bc2,
.product-card-grid #button-cart {
  width: 100%;
  height: 44px;
  background: #fff !important;
  color: #D85A30 !important;
  border: 1.5px solid #D85A30 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  padding: 0 14px;
  transition: background .15s, color .15s;
}
.product-card-grid .bc2:hover,
.product-card-grid #button-cart:hover {
  background: #D85A30 !important;
  color: #fff !important;
}
.product-card-grid .bc2 svg,
.product-card-grid #button-cart svg { stroke: currentColor; }

.product-card-grid .pc-minimum-info {
  margin-top: 8px;
  font-size: 12px;
  color: #888;
  background: #fff8e1;
  border: 1px solid #ffe0a0;
  border-radius: 6px;
  padding: 6px 8px;
}

.product-card-grid .utpl {
  margin-top: 16px;
  display: flex; flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.product-card-grid .utp {
  display: flex; align-items: center;
  gap: 10px;
}
.product-card-grid .ui {
  width: 20px;
  flex-shrink: 0;
  color: #D85A30;
  display: flex; align-items: center;
}
.product-card-grid .ut {
  font-size: 13px; font-weight: 600; color: #1a1a1a;
  line-height: 1.2;
}
.product-card-grid .us {
  font-size: 11px; color: #888;
  margin-top: 1px;
}

.product-card-grid .docl {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.product-card-grid .doc {
  display: flex; align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}
.product-card-grid .doc:hover { opacity: .85; }
.product-card-grid .di {
  width: 32px; height: 38px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  color: #fff;
}
.product-card-grid .di.x { background: #1D6F42; }
.product-card-grid .di.p { background: #DC2626; }
.product-card-grid .dn  { font-size: 12px; color: #444; line-height: 1.4; }

/* =====================================================
   ТАБЫ
===================================================== */
.pc-tabs { margin-top: 30px; }
.pc-tab-content { padding-top: 14px; }

/* =====================================================
   АДАПТИВ
===================================================== */

/* 992–1199px: галерея слева | центр + покупка снизу справа.
   На планшете возвращаем c-purchase в дерево (отменяем display:contents),
   чтобы grid-column работал на ней, а не на pbox. */
@media (max-width: 1199px) and (min-width: 992px) {
  .product-card-grid {
    grid-template-columns: minmax(0, 1fr) 280px !important;
    grid-template-rows: auto auto !important;
    gap: 15px !important;
  }
  .product-card-grid .c-gallery  { grid-column: 1; grid-row: 1 / 3; }
  .product-card-grid .c-center   { grid-column: 2; grid-row: 1; }
  .product-card-grid .c-purchase { display: block; grid-column: 2; grid-row: 2; }
  .product-card-grid .c-purchase .pbox { grid-column: auto; align-self: auto; }
}

/* 768–991px: галерея слева | центр+покупка справа в колонку */
@media (max-width: 991px) and (min-width: 768px) {
  .product-card-grid {
    grid-template-columns: 45% 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 15px !important;
  }
  .product-card-grid .c-gallery  { grid-column: 1; grid-row: 1 / 3; }
  .product-card-grid .c-center   { grid-column: 2; grid-row: 1; }
  .product-card-grid .c-purchase { display: block; grid-column: 2; grid-row: 2; }
  .product-card-grid .c-purchase .pbox { grid-column: auto; align-self: auto; }
  .product-card-grid .c-top .h1.pc-product-name { font-size: 20px !important; }
}

/* <768px: одна колонка
   Порядок: H1+иконки (c-top, лежит в c-gallery) → фото → миниатюры
   → покупка → инфо/характеристики.
   Чтобы H1 был ПЕРВЫМ, а фото вторым, на мобиле вытаскиваем
   содержимое c-gallery наружу через display: contents.
*/
@media (max-width: 767px) {
  .product-card-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* Развалим галерею на отдельные элементы потока */
  .product-card-grid .c-gallery {
    display: contents;
  }
  /* Возвращаем c-purchase в дерево (на десктопе она display:contents),
     иначе order не работает и она "налипает" в случайное место. */
  .product-card-grid .c-purchase {
    display: block;
  }
  .product-card-grid .c-purchase .pbox {
    grid-column: auto;
    align-self: auto;
  }

  /* Порядок на мобиле: H1+иконки → фото → миниатюры → покупка → центр → табы */
  .product-card-grid .c-gallery .c-top      { order: 1; }
  .product-card-grid .c-gallery .stickers   { order: 2; }
  .product-card-grid .c-gallery .photo-wrap { order: 3; }
  .product-card-grid .c-gallery .thumbs-row { order: 4; }
  .product-card-grid .c-purchase            { order: 5; }
  .product-card-grid .c-center              { order: 6; }

  .product-card-grid .c-gallery .photo-wrap {
    min-height: 240px;
    height: auto;
    width: 100%;
  }
  .product-card-grid .c-gallery .photo-wrap img { width: 100%; max-width: 100%; }

  /* Миниатюры на мобиле — фиксированные 80px, прижаты слева.
     Если фото больше 4 — горизонтальный свайп. */
  .product-card-grid .c-gallery .thumbs-row {
    height: 90px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .product-card-grid .c-gallery .thumbs { overflow: visible; }
  .product-card-grid .c-gallery .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: max-content !important;
    height: 100% !important;
    justify-content: flex-start !important;
  }
  .product-card-grid .c-gallery .thumb {
    flex: 0 0 80px !important;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    height: 80px !important;
  }
  .product-card-grid .c-gallery .arr { display: none; }

  .product-card-grid .c-top .h1.pc-product-name { font-size: 18px !important; }
  .product-card-grid .pr { font-size: 22px; }
  .product-card-grid .cbox { padding: 14px; }

  /* На мобиле снимаем обрезку характеристик — показываем все.
     На десктопе обрезка нужна для выравнивания высоты с правой колонкой,
     на мобиле всё в одну колонку и обрезать нечего. */
  .product-card-grid .c-specs {
    flex: 0 0 auto;
  }
  .product-card-grid .c-specs .specs-list {
    flex: 0 0 auto;
    overflow: visible;
  }
}

/* <480px: характеристики в колонку */
@media (max-width: 479px) {
  .product-card-grid .spec {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
  }
  .product-card-grid .sv2 { text-align: left; font-weight: 600; }
  .product-card-grid .sk  { font-size: 12px; color: #aaa; }
  .product-card-grid .quantity.step { width: 100% !important; max-width: 100% !important; }
  .product-card-grid .c-top .h1.pc-product-name { font-size: 16px !important; }
}