/* ==== БЛОК АРТИКУЛА (копирование) ==== */
.card-detail.main .right .product-article {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.card-detail.main .right .product-article__label {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.3);
}
.card-detail.main .right .product-article__value {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.card-detail.main .right .product-article__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #6B7280;
  transition: color 0.15s ease;
  border-radius: 4px;
}
.card-detail.main .right .product-article__copy:hover {
  color: #3D6EEE;
}
.card-detail.main .right .product-article__copy:focus {
  outline: 2px solid #3D6EEE;
  outline-offset: 2px;
}
.card-detail.main .right .product-article__copy .product-article__copy-icon--check {
  display: none;
}
.card-detail.main .right .product-article__copy.copied .product-article__copy-icon:not(.product-article__copy-icon--check) {
  display: none;
}
.card-detail.main .right .product-article__copy.copied .product-article__copy-icon--check {
  display: block;
  color: #22c55e;
}

/* ==== ПРАВАЯ КОЛОНКА ПОД МАКЕТ ==== */

/* Контейнер правой колонки */
.card-detail.main .right{
  /* фиксируем сетку и ширину зоны контента как в макете */
  max-width: 620px;
  padding-top: 6px;
  display: grid;
  grid-template-columns: 1fr 260px;           /* текстовая колонка + колонка действий */
  grid-template-areas:
    "title  actions"
    "qty    actions"
    "rule   rule"
    "spec   spec";
  column-gap: 32px;
  row-gap: 16px;
  align-content: start;
}

/* Заголовок */
.card-detail.main .right h1.name.name-product{
  grid-area: title;
  margin: 0;
  border-top: none;
  padding-top: 0;
  font-size: 32px;                            /* макетная кегль */
  line-height: 1.25;
  font-weight: 700;
  text-transform: none;
}

/* Правая колонка действий: цена + кнопки на одной линии, выравниваем по правому краю */
.card-detail.main .right .actions-wrap,
.card-detail.main .right .btns,
.card-detail.main .right .basket-price{
  grid-area: actions;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 16px;
}

/* если в разметке нет общего .actions-wrap, просто применится к .btns/.basket-price как выше */

/* Цена слева от кнопки, крупная и жирная */
.card-detail.main .right .basket-price{
  order: 1;                                   /* цена первой */
  margin: 0;
}
.card-detail.main .right .basket-price .base-price{
  font-size: 36px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  white-space: nowrap;
}

/* Кнопки */
.card-detail.main .right .btns{ order: 2; }
.card-detail.main .right .btns .btn{
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
}

/* Количество — слева под заголовком */
.card-detail.main .right .count{
  grid-area: qty;
  align-self: start;
}
.card-detail.main .right .count .count-field,
.card-detail.main .right .count .input{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-detail.main .right .count input[type="text"],
.card-detail.main .right .count input[type="number"]{
  width: 64px;
  height: 44px;
  text-align: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-weight: 600;
}

/* Тонкая разделительная линия */
.card-detail.main .right::after{
  content: "";
  grid-area: rule;
  height: 1px;
  background: #ECEEF0;
  margin-top: 4px;
}

/* Характеристики — две колонки: лейбл серый, значение чёрное */
.card-detail.main .right .props{
  grid-area: spec;
  display: grid;
  grid-template-columns: 160px 1fr;           /* ширина колонки лейблов как в макете */
  column-gap: 24px;
  row-gap: 10px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.card-detail.main .right .props > div{ display: contents; }
.card-detail.main .right .props .name,
.card-detail.main .right .props .label{ color: #6B7280; }
.card-detail.main .right .props .value,
.card-detail.main .right .props b,
.card-detail.main .right .props strong{ color: #111; font-weight: 600; }

/* Адаптив: на узких экранах всё в столбик */
@media (max-width: 1100px){
  .card-detail.main .right{
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "actions"
      "qty"
      "rule"
      "spec";
    max-width: 100%;
  }
  .card-detail.main .right .btns,
  .card-detail.main .right .basket-price{
    justify-content: flex-start;
  }
}


/* 1) Правим типографику заголовка под фигму */
.card-detail.main .right h1.name.name-product{
  border-top: none;          /* убираем старую рамку */
  padding-top: 0;
  margin: 0 0 12px;

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;          /* Bold */
  font-size: 32px;           /* Size из фигмы */
  line-height: 1.15;         /* 115% */
  letter-spacing: 0;
  color: #000;
  text-transform: none;
}

/* 2) Делаем правую колонку одно-колоночной, чтобы ВСЁ было под заголовком */
.card-detail.main .right{
  display: grid;
  grid-template-columns: 1fr;   /* одна колонка */
  row-gap: 16px;                /* вертикальный шаг между блоками */
}

/* 3) Фиксируем порядок блоков (заголовок сверху, всё остальное ниже) */
.card-detail.main .right h1.name.name-product{ order: 1; }
.card-detail.main .right .props{        order: 2; }   /* характеристики */
.card-detail.main .right .basket-price{ order: 3; }   /* цена (если есть) */
.card-detail.main .right .btns{         order: 4; }   /* кнопки */
.card-detail.main .right .count{        order: 5; }   /* количество */


/* --- Заголовок во всю ширину --- */

/* убираем сетку у родителя, чтобы не резал ширину */
.card-detail.main .right{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* заголовок тянется на всю доступную ширину */
.card-detail.main .right h1.name.name-product{
  width: 100%;
  max-width: none;
  margin-bottom: 8px;
}

/* блок с ценой и кнопкой теперь отдельной строкой */
.card-detail.main .right .basket-price,
.card-detail.main .right .btns{
  align-self: flex-start;
}


/* ===== ХАРАКТЕРИСТИКИ: одна колонка строк, внутри — 2 колонки (лейбл/значение) ===== */

/* 0) гарантируем, что контейнер не пытается строить собственную сетку в 2 колонки */
.card-detail.main .right .props{
  display: block !important;          /* отключаем прежнюю grid-сетку контейнера */
  column-count: 1;                     /* на всякий случай, если где-то включали колонки */
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid #ECEEF0;
}

/* 1) каждая характеристика — отдельная строка-грid: "лейбл | значение" */
.card-detail.main .right .props .prop{
  display: grid;
  grid-template-columns: 190px 1fr;   /* ширина колонки лейблов как в макете */
  column-gap: 24px;
  align-items: baseline;
  margin: 0 0 10px 0;
}

/* 2) лейбл (артикул, размер...) по макету */
.card-detail.main .right .props .prop .name{
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;                   /* ExtraBold */
  font-size: 20px;
  line-height: 1;                     /* 100% */
  color: #000;
}

/* 3) значение по макету */
.card-detail.main .right .props .prop .value{
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;                   /* Regular */
  font-size: 20px;
  line-height: 1;
  color: #000;
}

/* 4) не рвём артикул на две строки (ZKPY-1078) */
.card-detail.main .right .props .prop:nth-of-type(1) .value{
  white-space: nowrap;
}

/* 5) порядок блоков справа: заголовок → характеристики → цена/кнопки → количество */
.card-detail.main .right{
  display: flex; flex-direction: column; gap: 20px;
}
.card-detail.main .right h1.name.name-product{ order: 1; }
.card-detail.main .right .props{ order: 2; }
.card-detail.main .right .basket-price,
.card-detail.main .right .btns{ order: 3; align-self: flex-start; }
.card-detail.main .right .count{ order: 4; }

/* lowercase + убираем разделительную линию сверху у блока характеристик */
.card-detail.main .right .props{
  border-top: none !important;
}

.card-detail.main .right .props .prop .name,
.card-detail.main .right .props .prop .value{
  text-transform: lowercase !important;
}


/* ===== СТРОКА ЦЕНЫ ===== */

/* обертка строки */
.card-detail.main .right .basket-price{
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 24px;      /* отступ сверху от характеристик */
  margin-bottom: 32px;   /* отступ снизу перед кнопками */
}

/* лейбл "розничная цена:" */
.card-detail.main .right .basket-price .price-label{
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;              /* ExtraBold */
  font-size: 20px;
  line-height: 1;
  color: #000;
  text-transform: lowercase;
}

/* значение цены (119 р) */
.card-detail.main .right .basket-price .base-price{
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;              /* Black */
  font-size: 32px;
  line-height: 1.15;
  color: #3D6EEE;
}

/* Оптовая цена: надпись под строкой розницы */
.card-detail.main .right .basket-price{
  display: flex;
  flex-direction: column;     /* чтобы лейбл оптовой был новой строкой */
  align-items: flex-start;
  gap: 8px;
}

.card-detail.main .right .basket-price .opt-price-label{
  margin-top: 4px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;           /* ExtraBold */
  font-size: 20px;            /* как в макете для лейблов */
  line-height: 1;
  color: #000;
  text-transform: lowercase;  /* ты хотел lowercase */
}

/* общий контейнер цены */
.card-detail.main .right .basket-price {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

/* контейнер для строк цен */
.card-detail.main .right .basket-price .price {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* строка "оптовая цена + значение" */
.card-detail.main .right .basket-price .opt-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

/* надпись "оптовая цена" */
.card-detail.main .right .basket-price .opt-price-label {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800; /* ExtraBold */
  font-size: 20px;
  line-height: 1;
  text-transform: lowercase;
  color: #000;
  margin: 0;
}

/* значение цены */
.card-detail.main .right .basket-price .opt-price-value {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 900; /* Black */
  font-size: 32px;
  line-height: 1.15;
  color: #3D6EEE;
  margin: 0;
}

/*====*/
/* одна строка: количество + кнопки */
.card-detail.main .right .buy-row{
  display: flex;
  align-items: center;
  gap: 16px;                 /* расстояние между qty и кнопками */
  margin: 20px 0 24px;       /* отступ после цены и перед блоком свойств */
  flex-wrap: wrap;           /* чтобы на узких экранах переносилось */
}

/* поле количества — аккуратный бокс */
.card-detail.main .right .buy-row .count .count-field{
  display: inline-flex; align-items: center; gap: 6px;
}
.card-detail.main .right .buy-row .count .input input{
  width: 64px; height: 44px; text-align: center;
  border: 1px solid #E5E7EB; border-radius: 10px; font-weight: 600;
}

/* кнопки — в ряд */
.card-detail.main .right .buy-row .btns{
  display: inline-flex; align-items: center; gap: 12px;
}
.card-detail.main .right .buy-row .btns .in-basket a{
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600;
}

/* на телефоне складываемся в столбик — сначала qty, ниже кнопки */
@media (max-width: 1024px){
  .card-detail.main .right .buy-row{ flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Сбрасываем старые выкрутасы */
.card-detail.main .right{
  display: grid !important;
  grid-auto-flow: row;
  grid-template-columns: auto 1fr;        /* левая узкая, правая широкая */
  grid-template-areas:
    "title  title"                        /* 1) Заголовок */
    "article article"                     /* 2) Артикул */
    "props  props"                        /* 3) Параметры */
    "price  price"                        /* 4) Цена */
    "qty    btns"                         /* 5) Кол-во + Кнопки на одной строке */
    "desc   desc";                        /* описание, если есть */
  row-gap: 16px;
  column-gap: 24px;
  align-items: start;
}

/* Привязка существующих блоков к областям */
.card-detail.main .right h1.name.name-product{ grid-area: title; margin: 0; }
.card-detail.main .right .product-article{     grid-area: article; }
.card-detail.main .right .props{               grid-area: props; }
.card-detail.main .right .basket-price{       grid-area: price; }
.card-detail.main .right .count{              grid-area: qty;   align-self: center; }
.card-detail.main .right .btns{               grid-area: btns;  align-self: center; }
.card-detail.main .right .description-text{   grid-area: desc; }

/* Внутренняя косметика: qty и кнопки ровной строкой */
.card-detail.main .right .count .count-field{ display: inline-flex; align-items: center; gap: 6px; }
.card-detail.main .right .count .input input{
  width: 64px; height: 44px; text-align: center;
  border: 1px solid #E5E7EB; border-radius: 10px; font-weight: 600;
}
.card-detail.main .right .btns{
  display: inline-flex; align-items: center; gap: 12px;
}
.card-detail.main .right .btns .in-basket a{
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600;
}

/* Адаптив: всё в столбик */
@media (max-width: 1100px){
  .card-detail.main .right{
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "article"
      "props"
      "price"
      "qty"
      "btns"
      "desc";
  }
}

/* --- Строка действий под ценой: кнопки справа, количество слева --- */

/* делаем из текущей строки "плавающую" */
.card-detail.main .right .btns{
  float: right !important;         /* кнопки у правого края, независимо от порядка в DOM */
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
  margin-left: 16px;               /* небольшой зазор от количества, если оно вдруг ляжет слева от них */
}

.card-detail.main .right .count{
  float: left !important;          /* количество у левого края этой же строки */
  display: inline-flex;
  align-items: center;
}

/* бокс количества, чтобы не разъезжался */
.card-detail.main .right .count .count-field{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-detail.main .right .count .input input{
  width: 64px;
  height: 44px;
  text-align: center;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  font-weight: 600;
}

/* Сбрасываем влияние float дальше по странице */
.card-detail.main .right .props,
.card-detail.main .right .description-text{
  clear: both;                     /* всё, что ниже, начинается с новой строки */
}

/* На узких экранах — в столбик, чтоб не ломалось */
@media (max-width: 1100px){
  .card-detail.main .right .btns,
  .card-detail.main .right .count{
    float: none !important;
    display: block;
    margin: 0 0 12px 0;
  }
}

.content-body .card-detail.main .right .actions-row{
  display: flex; align-items: center; gap: 16px; margin-top: 16px;
}
.content-body .card-detail.main .right .actions-row .btns{ gap: 12px; }

/* Выравниваем строку количества и кнопок точно по заголовку */
.content-body .card-detail.main .right .actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  margin-left: -30px !important;    /* убираем любые внутренние сдвиги */
  padding-left: 0 !important;   /* и лишние отступы темы */
}

/* корректируем общее выравнивание всей правой колонки */
.content-body .card-detail.main .right {
  display: block;
}

/* на всякий случай сбрасываем грид/флоаты */
.content-body .card-detail.main .right .count,
.content-body .card-detail.main .right .btns {
  float: none !important;
}

/* ===== Quantity pill как в корзине ===== */
.content-body .card-detail.main .right .count { --q-h: 44px; }

.content-body .card-detail.main .right .count .count-field{
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  height: var(--q-h);
  padding: 0 12px;
  border: 1px solid #848484;
  border-radius: 30px;
  background: #fff;
  box-sizing: border-box;
  /* на десктопе как в корзине */
}
@media (min-width: 991px){
  .content-body .card-detail.main .right .count .count-field{
    width: max-content;
    height: max-content;
    padding: 8px 12px;
    border: 1px solid #848484;
    border-radius: 30px;
  }
}

/* инпут внутри пилюли */
.content-body .card-detail.main .right .count .input input{
  width: 54px;                  /* хватит для 3–4 знаков */
  text-align: center;
  border: 0;
  outline: 0;
  background: transparent;
  font: 600 16px/1 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding: 0;
  appearance: textfield;
}
.content-body .card-detail.main .right .count .input input::-webkit-outer-spin-button,
.content-body .card-detail.main .right .count .input input::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}

/* кнопки +/- кружочки */
.content-body .card-detail.main .right .count .btns-count{
  display: inline-flex !important;
  align-items: center;
}
.content-body .card-detail.main .right .count .btns-count span{
  width: 32px; height: 32px;
  border: 1px solid #D1D5DB;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.content-body .card-detail.main .right .count .btns-count span:hover{
  background: #F5F6F7;
}
.content-body .card-detail.main .right .count .btns-count span.disabled{
  opacity: .4;
  pointer-events: none;
}

/* если не менял HTML-иконки и оставил angle-up/down — подменим на +/− */
.content-body .card-detail.main .right .count .btns-count .up i.fas.fa-angle-up::before{ content: "+"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count .down i.fas.fa-angle-down::before{ content: "−"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count i{ font-style: normal; }

/* чтобы строка с qty и кнопками стояла ровно с остальным */
.content-body .card-detail.main .right .actions-row{
  display: flex; align-items: center; gap: 16px;
  margin-top: 16px;
}
/* зазор между qty и блоком кнопок */
.content-body .card-detail.main .right .actions-row .btns{ gap: 12px; }

/* === Quantity: как в корзине, без XL-кружков === */

/* 1) Контейнер-капсула (пилюля) */
.content-body .card-detail.main .right .count .count-field{
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 8px 12px !important;
  border: 1px solid #848484 !important;
  border-radius: 30px !important;
  background: #fff !important;
  width: max-content !important;
  height: max-content !important;
  box-sizing: border-box !important;

  /* чистим то, что ты раньше навесил */
  min-height: auto !important;
}

/* 2) Само число — маленькое, как в корзине */
.content-body .card-detail.main .right .count .input input{
  width: 34px !important;                 /* компактно */
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  text-align: center !important;

  font-weight: 600 !important;
  font-size: 14px !important;             /* корзинный кегль */
  line-height: 23px !important;           /* корзинная высота строки */
  color: #292929 !important;
  appearance: textfield !important;
}
.content-body .card-detail.main .right .count .input input::-webkit-outer-spin-button,
.content-body .card-detail.main .right .count .input input::-webkit-inner-spin-button{
  -webkit-appearance: none !important; margin: 0 !important;
}

/* 3) Кнопки минус/плюс — не кружки, а маленькие кликабельные области */
.content-body .card-detail.main .right .count .btns-count{
  display: inline-flex !important;
  align-items: center !important;
}
.content-body .card-detail.main .right .count .btns-count span{
  width: auto !important;
  height: auto !important;
  padding: 0 6px !important;              /* как в корзине */
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  user-select: none !important;
  color: #292929 !important;
  transition: color .15s ease !important;
}
.content-body .card-detail.main .right .count .btns-count span:hover{
  color: #111 !important;
}
.content-body .card-detail.main .right .count .btns-count span.disabled{
  opacity: .4 !important;
  pointer-events: none !important;
}

/* 4) Если в разметке остались уголки (fa-angle-up/down) — меняем на + / − */
.content-body .card-detail.main .right .count .btns-count .up   i.fas.fa-angle-up::before   { content: "+"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count .down i.fas.fa-angle-down::before { content: "−"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count i{ font-style: normal; }

/* 5) Обнуляем старые «кругляши» на случай, если где-то ещё всплывут */
.content-body .card-detail.main .right .count .btns-count span::before,
.content-body .card-detail.main .right .count .btns-count span::after{
  border: 0 !important;
  background: none !important;
}

/* Пилюля как в корзине */
.content-body .card-detail.main .right .count .count-field{
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 8px 12px !important;
  border: 1px solid #848484 !important;
  border-radius: 30px !important;
  background: #fff !important;
  width: max-content !important;
  height: max-content !important;
  min-height: auto !important; /* гасим раздувание из темы */
  box-sizing: border-box !important;
}

/* Кнопки +/- по бокам, без круглых «блинов» */
.content-body .card-detail.main .right .count .qty{
  display: inline-flex !important;
  align-items: center; justify-content: center;
  padding: 0 6px;            /* как в корзине */
  border: 0; background: transparent;
  font-size: 18px; line-height: 1; color: #292929;
  cursor: pointer; user-select: none;
}
.content-body .card-detail.main .right .count .qty.disabled{
  opacity: .4; pointer-events: none;
}

/* Само число — корзинный кегль */
.content-body .card-detail.main .right .count .input input{
  width: 34px !important;
  padding: 0 !important;
  border: 0 !important; outline: 0 !important; background: transparent !important;
  text-align: center !important;
  font-weight: 600 !important; font-size: 14px !important; line-height: 23px !important;
  color: #292929 !important;
  appearance: textfield !important;
}
.content-body .card-detail.main .right .count .input input::-webkit-outer-spin-button,
.content-body .card-detail.main .right .count .input input::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}

/* На случай, если остался старый .btns-count с вертикальным стеком — полностью выключаем */
.content-body .card-detail.main .right .count .btns-count{
  display: none !important;
}

/* ===== Quantity на карточке 1-в-1 как в корзине ===== */

/* Капсула */
.content-body .card-detail.main .right .count .count-field{
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;

  /* Корзинные размеры */
  height: 39px !important;              /* фикс высоты */
  padding: 8px 12px !important;          /* даёт те же габариты */
  border: 1px solid #848484 !important;
  border-radius: 30px !important;
  background: #fff !important;

  box-sizing: border-box !important;
  width: max-content !important;

  /* Гасим раздувание темы */
  min-height: 0 !important;
  line-height: 0 !important;             /* чтобы высота не росла от наследования */
}

/* Минус, число, плюс — один ряд, без кругляшей */
.content-body .card-detail.main .right .count .qty{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 6px !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer !important;
  user-select: none !important;

  /* Корзинная типографика */
  font-size: 14px !important;
  line-height: 23px !important;
  height: 23px !important;

  /* Не даём внешним правилам тянуть высоту */
  min-height: 0 !important;
}
.content-body .card-detail.main .right .count .qty.disabled{
  opacity: .4 !important;
  pointer-events: none !important;
}

/* Само число */
.content-body .card-detail.main .right .count .input input{
  width: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center !important;

  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 23px !important;
  height: 23px !important;

  appearance: textfield !important;
  min-height: 0 !important;
}
.content-body .card-detail.main .right .count .input input::-webkit-outer-spin-button,
.content-body .card-detail.main .right .count .input input::-webkit-inner-spin-button{
  -webkit-appearance: none !important; margin: 0 !important;
}

/* Если ты оставил fa-angle-up/down — превращаем их в + / − */
.content-body .card-detail.main .right .count .btns-count .up   i.fas.fa-angle-up::before{   content: "+"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count .down i.fas.fa-angle-down::before{ content: "−"; font-weight: 700; font-family: inherit; }
.content-body .card-detail.main .right .count .btns-count i{ font-style: normal !important; }

/* На всякий случай: глушим вертикальные/декоративные штуки темы */
.content-body .card-detail.main .right .count .btns-count{
  display: none !important;          /* если остался старый общий контейнер со стеком */
}
.content-body .card-detail.main .right .count .count-field::before,
.content-body .card-detail.main .right .count .count-field::after,
.content-body .card-detail.main .right .count .btns-count::before,
.content-body .card-detail.main .right .count .btns-count::after{
  content: none !important;
  display: none !important;
}

/* ===== Кнопки под ценой (как в макете) ===== */

/* строка с кнопками */
.content-body .card-detail.main .right .btns{
  display: inline-flex !important;
  align-items: center;
  gap: 16px;                 /* расстояние между кнопками */
}

/* базовый стиль кнопки-пилюли */
.content-body .card-detail.main .right .btns a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;                 /* отступ между иконкой и текстом */
  padding: 14px 22px;        /* pill-паддинги */
  border-radius: 28px;       /* закругление */
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
  box-shadow: none;
}

/* иконки внутри ссылок (fontawesome/inline-svg) */
.content-body .card-detail.main .right .btns a i{
  font-size: 18px;
  line-height: 1;
}

/* PRIMARY: «в корзину» — синяя, белый текст/иконка */
.content-body .card-detail.main .right .btns .in-basket a{
  background: #3D6EEE;      /* основной синий из макета */
  color: #fff;
  border: 1px solid #3D6EEE;
}
.content-body .card-detail.main .right .btns .in-basket a:hover{
  background: #2f5fe0;
  border-color: #2f5fe0;
}
.content-body .card-detail.main .right .btns .in-basket a:active{
  background: #2a58d6;
  border-color: #2a58d6;
}

/* OUTLINE: «в избранное» — белая с серой обводкой и тёмным текстом */
.content-body .card-detail.main .right .btns .favorite a{
  background: #fff;
  color: #2F2F2F;            /* тёмно-серый текст */
  border: 1px solid #D1D5DB; /* светло-серая обводка */
}
.content-body .card-detail.main .right .btns .favorite a i{
  color: #2F2F2F;
}
.content-body .card-detail.main .right .btns .favorite a:hover{
  background: #F7F9FC;
  border-color: #C9CFD6;
}
.content-body .card-detail.main .right .btns .favorite a:active{
  background: #EFF3F8;
  border-color: #BFC6CE;
}

/* чтобы старые стили темы не перетягивали размеры/float */
.content-body .card-detail.main .right .btns .in-basket,
.content-body .card-detail.main .right .btns .favorite{
  float: none !important;
}

/* ===== Кнопки «в корзину» и «в избранное» — исправленный размер и lowercase ===== */

.content-body .card-detail.main .right .btns a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  /* высота и форма */
  padding: 10px 20px !important;
  border-radius: 24px !important;
  height: 40px !important;              /* фикс, чтобы обе одинаковые */
  box-sizing: border-box !important;

  /* шрифт и стиль */
  font-size: 16px !important;
  font-weight: 600 !important;
  text-transform: lowercase !important; /* делаем строчными */
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* синяя кнопка */
.content-body .card-detail.main .right .btns .in-basket a {
  background: #3D6EEE !important;
  color: #fff !important;
  border: 1px solid #3D6EEE !important;
}
.content-body .card-detail.main .right .btns .in-basket a:hover {
  background: #2f5fe0 !important;
  border-color: #2f5fe0 !important;
}

/* белая кнопка */
.content-body .card-detail.main .right .btns .favorite a {
  background: #fff !important;
  color: #2F2F2F !important;
  border: 1px solid #D1D5DB !important;
}
.content-body .card-detail.main .right .btns .favorite a:hover {
  background: #F7F9FC !important;
  border-color: #C9CFD6 !important;
}

/* выравнивание блока с кнопками — кнопки не растягиваются, фиксированный зазор 12px */
.content-body .card-detail.main .right .btns {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.content-body .card-detail.main .right .btns .in-basket,
.content-body .card-detail.main .right .btns .favorite {
  flex: 0 0 auto !important;
}
.content-body .card-detail.main .right .btns .count {
  flex: 0 0 auto !important;
}

/* Сдвигаем блок кнопок влево */
.content-body .card-detail.main .right .btns {
  margin-left: -20px !important;
}

/* === Карточка ZAKKA: двухколоночная сетка и сжатие левой колонки до 80% === */

/* Делаем сам контейнер карточки двухколоночным flex, если его раньше не определили */
.card-detail.main{
  display: flex !important;
  align-items: flex-start !important;
  gap: var(--product-gap, 0px) !important; /* текущий отступ между колонками сохраняем */
}

/* Было «как-то шире». Ставим левую колонку (фото) = 80% от прежней логики.
   В старой теме левая колонка была 38% → 0.8 * 38 = 30.4% */
.card-detail.main .left{
  flex: 0 0 40% !important;
  max-width: 40% !important;
  min-width: 0 !important;
}

/* Правая колонка занимает оставшееся */
.card-detail.main .right{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  position: relative;
  z-index: 10; /* у тебя это уже было — оставим */
}

/* Внутри левой колонки у тебя ещё одна flex-сетка: .bottom (превью) + .top (большое фото).
   Её не ломаем, просто гарантируем, что большое фото вписывается. */
.card-detail.main .left > .top{
  flex: 1 1 0 !important;
  min-width: 0 !important;
}
.card-detail.main .left .preview-image-big-detail.detail{ 
  padding: 0 !important; 
  margin: 0 !important; 
  max-width: 100% !important;   /* не выпирай за колонку */
}
.card-detail.main .left .preview-image-big-detail.detail img{
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Если карточка вдруг рендерится старым .bx_* шаблоном — подстрахуем и его: */
.bx_item_detail .bx_item_container .bx_lt{ width: 30.4% !important; }
.bx_item_detail .bx_item_container .bx_rt{ width: 65.6% !important; }
/* И ограничим «большое фото» старой темы до 80% от их max-width 440px: */
.bx_item_detail .bx_item_slider .bx_bigimages{ max-width: 352px !important; }

/* Мобилка: складываем в столбик и отдаем ширину по 100% */
@media (max-width: 992px){
  .card-detail.main{
    flex-direction: column !important;
    gap: 16px !important;
  }
  .card-detail.main .left,
  .card-detail.main .right{
    flex: 0 0 auto !important;
    max-width: 100% !important;
  }
}

/* ===================== MOBILE FIX #1: характеристики по левому краю ===================== */
@media (max-width: 768px){
  /* контейнер характеристик — одна колонка */
  .content-body .card-detail.main .right .props{
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* каждая пара "лейбл/значение" — в столбик */
  .content-body .card-detail.main .right .props .prop{
    display: block !important;
    grid-template-columns: none !important;  /* убираем твою двухколоночную сетку */
    margin: 0 0 12px 0 !important;
  }
  /* лейбл */
  .content-body .card-detail.main .right .props .prop .name{
    display: block !important;
    width: auto !important;
    margin: 0 0 4px 0 !important;
    text-align: left !important;
  }
  /* значение — ВЛЕВО, без изысков */
  .content-body .card-detail.main .right .props .prop .value{
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
}

/* ====================== MOBILE TUNING (<=768px) ====================== */
@media (max-width: 768px){

  /* 1) Заголовок: помещаемся по ширине, без уродства */
  .content-body .card-detail.main .right h1,
  .content-body .card-detail.main .right .product-title{
    font-size: clamp(20px, 5.2vw, 28px) !important;
    line-height: 1.15 !important;
    margin: 0 0 12px 0 !important;
    word-break: break-word !important;         /* длинные слова пусть переносятся */
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
  }

  /* 2) Характеристики: одна строка "название: значение" с переносом строки ТОЛЬКО если не помещается */
  .content-body .card-detail.main .right .props{
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* каждая пара — в одну строку через grid: [лейбл] [значение] */
  .content-body .card-detail.main .right .props .prop{
    display: grid !important;
    grid-template-columns: max-content 1fr !important; /* лейбл по содержимому, значение забирает остаток */
    column-gap: 8px !important;
    align-items: baseline !important;
    margin: 0 0 8px 0 !important;
  }

  /* лейбл слева, жирный; двоеточие добавим псевдоэлементом, чтобы не тащить в верстку */
  .content-body .card-detail.main .right .props .prop .name{
    font-weight: 700 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  .content-body .card-detail.main .right .props .prop .name::after{
    content: ":" !important;
  }

  /* значение — сразу после лейбла, по левому краю, переносится по словам */
  .content-body .card-detail.main .right .props .prop .value{
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }

  /* 3) Безопасные размеры шрифтов внутри характеристик, чтобы не «выползали» */
  .content-body .card-detail.main .right .props .prop .name,
  .content-body .card-detail.main .right .props .prop .value{
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  /* 4) На всякий случай: убираем любые флоаты/табличные пережитки в этом блоке */
  .content-body .card-detail.main .right .props .prop :is(.name,.value){
    float: none !important;
    width: auto !important;
    display: block !important;
  }
}

/* ================= MOBILE LAYOUT: qty + cart в одну линию, favorite ниже ================= */
@media (max-width: 768px){

  /* Общий контейнер действий справа */
  .content-body .card-detail.main .right .actions-row,
  .content-body .card-detail.main .right .buy-row,
  .content-body .card-detail.main .right .buttons-row{
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
  }

  /* 1) Количество — компактный блок слева в первой строке */
  .content-body .card-detail.main .right .count{
    order: 1 !important;
    flex: 0 0 auto !important;          /* ровно по содержимому */
    max-width: 45% !important;          /* чтобы кнопке «в корзину» осталось место */
  }
  .content-body .card-detail.main .right .count .count-field{
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 12px !important;
    border: 1px solid #848484 !important;
    border-radius: 30px !important;
    height: 40px !important;
  }
  .content-body .card-detail.main .right .count .input input{
    width: 56px !important;
    min-width: 56px !important;
    text-align: center !important;
    border: 0 !important;
    background: transparent !important;
    font-weight: 600 !important;
  }
  .content-body .card-detail.main .right .count .btns-count{
    position: static !important;
    display: inline-flex !important;
    gap: 6px !important;
    margin-left: 6px !important;
  }

  /* 2) «В корзину» — справа от количества, той же строкой */
  .content-body .card-detail.main .right .to-basket,
  .content-body .card-detail.main .right .btn.to-basket{
    order: 2 !important;
    flex: 1 1 0 !important;             /* занимает остаток строки */
    min-width: 40% !important;
    height: 40px !important;
  }

  /* 3) «В избранное» — НИЖЕ, на всю ширину */
  .content-body .card-detail.main .right .to-favorite,
  .content-body .card-detail.main .right .btn.to-favorite{
    order: 3 !important;
    flex: 1 0 100% !important;
    height: 40px !important;
  }

  /* Если где-то остался твой древний сдвиг — прибиваем */
  .content-body .card-detail.main .right .btns{
    margin-left: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
  }
}

/* ===================== HOTFIX: фото и параметры ===================== */

/* 0) Маркер, что блок действительно применился. Удали потом. */
.card-detail.main { outline: 0 solid transparent !important; }

/* 1) Фото: до 768px всегда на всю ширину, не «половинка» */
@media (max-width: 767.98px) {
  .card-detail.main .left,
  .card-detail.main .right {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .card-detail.main .preview-image-big-detail.detail,
  .card-detail.main .preview-image-big-detail.detail img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
  }
}

/* 2) На диапазоне 576–767px запрещаем сетке ужимать фото */
@media (min-width: 576px) and (max-width: 767.98px) {
  .card-detail.main .left,
  .card-detail.main .right {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* 3) На ≥768px колонки нормальной ширины, чтобы характеристики не становились «гвоздём» */
@media (min-width: 768px) {
  .card-detail.main .left  { flex: 0 0 48% !important; max-width: 48% !important; min-width: 0 !important; }
  .card-detail.main .right { flex: 0 0 52% !important; max-width: 52% !important; min-width: 0 !important; }
}

/* 4) Характеристики: одна строка «лейбл: значение» */
.card-detail.main .right .props { margin: 0 !important; padding: 0 !important; }

.card-detail.main .right .props .prop {
  display: grid !important;
  grid-template-columns: max-content 1fr !important;
  column-gap: 8px !important;
  align-items: baseline !important;
  margin: 0 0 10px 0 !important;
  min-width: 0 !important;
}

.card-detail.main .right .props .prop .name {
  white-space: nowrap !important;
  font-weight: 700 !important;
}
.card-detail.main .right .props .prop .name::after { content: ":"; }

/* По твоему требованию: при ширине 400+ значение НЕ переносится, места хватает */
@media (min-width: 400px) {
  .card-detail.main .right .props .prop .value {
    white-space: nowrap !important;
    overflow: visible !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* На очень узких экранах всё-таки разрешаем перенос, чтобы не уезжало за край */
@media (max-width: 399.98px) {
  .card-detail.main .right .props .prop .value {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
}

/* ==== MOBILE/HYBRID HOTFIX: картинка всегда на всю ширину до 990 ==== */

/* 1) На всём диапазоне до 990 запрещаем сетке делить на две колонки */
@media (max-width: 989.98px) {
  .content-body .card-in .card-detail.main {
    display: block !important;       /* убираем flex, чтобы .left не зажимали проценты из темы */
  }
  .content-body .card-in .card-detail.main .left,
  .content-body .card-in .card-detail.main .right {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }
}

/* 2) Сам контейнер большого фото и сам <img> — растягиваем насильно */
.content-body .card-in .card-detail.main .left .preview-image-big-detail.detail,
.content-body .card-in .card-detail.main .left .preview-image-big-detail.detail > div,
.content-body .card-in .card-detail.main .left .preview-image-big-detail.detail img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

/* 3) На совсем узких экранах убираем любые внутренние отступы, чтобы не «съедали» ширину */
@media (max-width: 575.98px) {
  .content-body .card-in .card-detail.main .left .top,
  .content-body .card-in .card-detail.main .left .preview-image-big-detail.detail {
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* 4) Страховка против старых битриксовых классов, если внезапно всплывут */
@media (max-width: 989.98px) {
  .bx_item_detail .bx_item_container .bx_lt,
  .bx_item_detail .bx_item_container .bx_rt {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
  .bx_item_detail .bx_item_slider .bx_bigimages {
    max-width: 100% !important;
  }
}

/* ===== props не сужаются на узких экранах ===== */
@media (max-width: 575.98px) {
  /* контейнеры справа — на всю ширину */
  .content-body .card-in .card-detail.main .right,
  .content-body .card-in .card-detail.main .right .bottom,
  .content-body .card-in .card-detail.main .right .props {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    box-sizing: border-box;
  }

  /* каждая пара "имя: значение" занимает всю строку */
  .content-body .card-in .card-detail.main .right .props .prop {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    display: grid !important;
    grid-template-columns: max-content 1fr !important;
    column-gap: 8px !important;
    align-items: baseline !important;
    min-width: 0 !important;
  }

  /* запрещаем фиксированные 50% у названия/значения */
  .content-body .card-in .card-detail.main .right .props .prop .name,
  .content-body .card-in .card-detail.main .right .props .prop .value {
    width: auto !important;
    max-width: none !important;
  }

  .content-body .card-in .card-detail.main .right .props .prop .name {
    white-space: nowrap !important;
    font-weight: 700;
  }

  /* если нужно строго в одну строку — оставь nowrap; если длинные — сними */
  .content-body .card-in .card-detail.main .right .props .prop .value {
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: 0 !important;
  }
}

/* === Кнопки и количество: ровно по одной линии === */

.card-detail.main .right .btns{
  display: flex !important;
  align-items: center !important;      /* все по одной вертикали */
  gap: 12px !important;                 /* компактное расстояние между кнопками */
  flex-wrap: wrap;                      /* можно переносить на 2 ряд при нехватке места */
  margin: 16px 0 0 0 !important;
}

/* убираем разъезжающиеся margin у детей */
.card-detail.main .right .btns > *{
  margin: 0 !important;
  box-sizing: border-box;
}

/* единая высота для всех контролов */
.card-detail.main .right .btns .count,
.card-detail.main .right .btns .btn,
.card-detail.main .right .btns button,
.card-detail.main .right .btns a{
  height: 44px !important;
}

/* нормализуем кнопки */
.card-detail.main .right .btns .btn,
.card-detail.main .right .btns button,
.card-detail.main .right .btns a{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  line-height: 1 !important;
  white-space: nowrap;
  border-radius: 22px;                  /* как на скрине */
}

/* счётчик количества посередине по вертикали */
.card-detail.main .right .btns .count{
  display: flex !important;
  align-items: center !important;
}

/* если внутри count есть .input > input — пусть занимает всю высоту */
.card-detail.main .right .btns .count .input input{
  height: 100% !important;
  line-height: 44px !important; /* иногда помогает, если тема задаёт свой line-height */
}

/* подсужаем интервалы на очень узких экранах */
@media (max-width: 360px){
  .card-detail.main .right .btns{ gap: 12px !important; }
}

/* страховка: если тема пихает baseline/inline-block */
.card-detail.main .right .btns .btn,
.card-detail.main .right .btns button,
.card-detail.main .right .btns a{
  vertical-align: middle !important;
}

/* === FIX: прижимаем кнопки к левому краю параметров === */
.card-detail.main .right .btns{
  margin-left: 85px !important;   /* компенсируем смещение ровно по замеру */
  justify-content: flex-start !important;
}

/* === ОДНА ЛЕВАЯ ЛИНИЯ ДЛЯ ПРАВОЙ КОЛОНКИ === */
/* 1) Правая колонка — единая сетка; всё внутри выравниваем по одному левому краю */
.card-detail.main .right{
  display: grid !important;
  grid-auto-rows: min-content;
  row-gap: 16px;
  padding-left: 0 !important;
}

/* 2) Никаких своих margin/padding/float/смещений у секций справа */
.card-detail.main .right .name,
.card-detail.main .right .props,
.card-detail.main .right .basket-price,
.card-detail.main .right .btns,
.card-detail.main .right .bottom{
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: static !important;
  left: auto !important;
  transform: none !important;
  justify-self: start !important;   /* ключ: все встают по одному левому краю контейнера .right */
}

/* 3) Кнопочный блок: в ряд, компактный gap 12px, кнопки не растягиваются */
.card-detail.main .right .btns{
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap;
  width: max-content !important;    /* блок только по ширине содержимого — не растягивается */
}
.card-detail.main .right .btns .in-basket,
.card-detail.main .right .btns .favorite,
.card-detail.main .right .btns .count{
  flex: 0 0 auto !important;
}

.card-detail.main .right .btns > *{
  margin: 0 !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 16px !important;
  line-height: 1 !important;
}

/* 4) На всех «мутных» диапазонах отключаем наследуемые ограничения ширины */
@media (max-width: 991.98px){
  .card-detail.main .right,
  .card-detail.main .right > *{
    max-width: 100% !important;
  }
}

/* 5) Если у props внезапно есть внутренний левый отступ — обнуляем */
.card-detail.main .right .props{ padding-left: 0 !important; }

/* 6) На совсем узких слегка уменьшаем gap, чтобы не прыгало из-за переноса */
@media (max-width: 360px){
  .card-detail.main .right .btns{ gap: 12px !important; }
}

/* ===== MOBILE: qty + "в корзину" в одну линию, "в избранное" ниже ===== */
@media (max-width: 768px){

  /* Родительская строка действий: одна "гибкая" строка с переносом */
  .content-body .card-detail.main .right .actions-row{
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 12px !important;
    row-gap: 12px !important;
    margin-left: 0 !important;
  }

  /* Вынуть детей из .btns на уровень родителя, чтобы они стояли рядом с .count */
  .content-body .card-detail.main .right .btns{
    display: contents !important;
    margin-left: 0 !important;   /* на случай прежних "−170px" хакингов */
  }

  /* 1) Количество слева */
  .content-body .card-detail.main .right .count{
    order: 1 !important;
    flex: 0 0 auto !important;
    max-width: 45% !important;
  }

  /* 2) "В корзину" справа от количества в той же строке */
  .content-body .card-detail.main .right .btns .in-basket{
    order: 2 !important;
    flex: 1 1 0 !important;          /* занимает оставшееся место в строке */
    min-width: 40% !important;
  }
  .content-body .card-detail.main .right .btns .in-basket a{
    width: 100% !important;          /* кнопка растягивается по своему flex-элементу */
    height: 40px !important;
  }

  /* 3) "В избранное" следующей строкой на всю ширину */
  .content-body .card-detail.main .right .btns .favorite{
    order: 3 !important;
    flex: 1 0 100% !important;
  }
  .content-body .card-detail.main .right .btns .favorite a{
    width: 100% !important;
    height: 40px !important;
  }
}


/* Исправление для кнопок количества */
.content-body .card-detail.main .right .count .qty {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    user-select: none !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: #292929 !important;
    min-width: 20px !important;
}

.content-body .card-detail.main .right .count .qty.disabled {
    opacity: 0.4 !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* Убедитесь что инпут видим */
.content-body .card-detail.main .right .count .input input {
    background: transparent !important;
    border: none !important;
    font-weight: 600 !important;
}

.card-detail.main .right {
  margin-left: 0 !important;
  max-width: 50% !important;
  box-sizing: border-box;
}