/* 4 карточки в ряд начиная с 992px ширины (и на MacBook, и на десктопах) */
@media (min-width: 992px) {
  .product-layout.product-grid.col-md-4,
  .product-layout.product-grid.col-lg-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}







/* === Кружочки выбора цвета === */

/* ===== КРУЖКИ ДЛЯ КАТЕГОРИЙ (список товаров) ===== */
.variants-list.category-variants {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin: 6px 0 2px; /* чуть меньше низ */
}

.variants-list.category-variants .variant-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  text-decoration: none;
}

.variants-list.category-variants .color-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ccc;
  transition: all .2s;
}

.variants-list.category-variants .variant-item:hover .color-circle {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0,123,255,.4);
}

.variants-list.category-variants .variant-item.active .color-circle {
  border: 2px solid #007bff;
  box-shadow: 0 0 6px rgba(0,123,255,.5);
}


/* ===== КРУЖКИ ДЛЯ КАРТОЧКИ ТОВАРА ===== */
.product-variants { margin: 15px 0; }

.variants-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.variants-list .variant-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  text-decoration: none;
}

.variants-list .color-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ddd;
  box-shadow: 0 0 3px rgba(0,0,0,.08);
  transition: all .2s;
}

.variants-list .variant-item:hover .color-circle {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0,123,255,.35);
}

.variants-list .variant-item.active .color-circle {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0,123,255,.5);
}


/* --- Мобилка --- */
@media (max-width: 767px) {
  .variants-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }
  .variant-item { flex: 0 0 auto; }

  /* ФИКС для модулей на главной (чтобы кружки не падали вниз) */
  .product-thumb .variants-list.category-variants {
    order: -1;            /* поднимем выше */
    margin-top: 4px;      /* небольшой отступ сверху */
    margin-bottom: 2px;   /* прижмём к названию */
    justify-content: flex-start;
  }
}

/* === CHAIR INSIGHT CARD (универсальный) ===*/
/* .ci-card{
  --ci-bg:#fff;
  --ci-br:#eee;
  --ci-txt:#1d1d1f;
  --ci-sub:#6b6b6f;
  --ci-accent:#ff8a00;      
  --ci-accent2:#ffb366;

  background:var(--ci-bg);
  border:1px solid var(--ci-br);
  border-radius:14px;
  padding:18px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  min-height:320px;
}

.ci-card {
  margin-top: 16px; 
}

.ci-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.ci-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  font-size:13px;
  padding:6px 10px;
  color:#fff;
  background:linear-gradient(90deg,var(--ci-accent),var(--ci-accent2));
  border-radius:999px;
  white-space:nowrap;
}
.ci-badge svg{display:block}

.ci-sub{
  color:var(--ci-sub);
  font-size:13px;
  line-height:1.3;
}

.ci-grid{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:14px;
}

.ci-mrow{
  display:grid;
  grid-template-columns:140px 1fr;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}
.ci-mrow span{color:var(--ci-txt);font-size:13px}
.ci-bar{
  height:8px;border-radius:6px;background:#f0f0f0;overflow:hidden;position:relative;
}
.ci-bar i{
  display:block;height:100%;
  background:linear-gradient(90deg,var(--ci-accent),var(--ci-accent2));
  border-radius:6px;transition:width .4s ease;
}

.ci-tags{
  display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0;padding:0;list-style:none;
}
.ci-tags li{
  font-size:12px;color:var(--ci-sub);
  padding:6px 10px;border:1px dashed var(--ci-br);border-radius:999px;background:#fafafa;
} */

/* === иконки-фичі (пересмотрено) === */
/* .ci-feats{
  display:grid;
  grid-template-columns:repeat(2, 1fr); 
  gap:14px;
}
.ci-feat{
  display:flex;
  align-items:flex-start;
  gap:10px;
  background:#fafafa;
  border:1px solid var(--ci-br);
  border-radius:10px;
  padding:10px;
  font-size:13px;
  line-height:1.25;
  transition:transform .15s ease, border-color .15s ease;
}
.ci-feat:hover{transform:translateY(-2px);border-color:#e6e6e6}
.ci-ico{
  flex:0 0 28px;height:28px;border-radius:8px;
  color:var(--ci-accent);
  background:#fff;border:1px solid var(--ci-br);
  display:grid;place-items:center;
}
.ci-ico svg{width:16px;height:16px;display:block} */

/* адаптив + анти-дёрганье */
/* @media (max-width:1600px){ .ci-card{min-height:360px} }
@media (max-width:1366px){ .ci-card{min-height:400px} }
@media (max-width:991px){
  .ci-card{min-height:auto;margin-top:14px}
  .ci-grid{grid-template-columns:1fr;gap:12px}
  .ci-mrow{grid-template-columns:1fr;gap:6px}
  .ci-feats{grid-template-columns:1fr} 
} */


/* Обгортка як у категорій */
.ocf-body > div {
  background:#f8f9fb;
  border:1px solid #e5e7eb;
  border-radius:8px;
  padding:10px 12px;
  margin-bottom:8px;
}



/* Мини-блок под кнопкой */
.mini-delivery{margin-top:12px;padding:10px 12px;border:1px solid #eee;border-radius:8px;background:#fafafa}
.mini-delivery__row{display:flex;align-items:center;gap:8px}
.mini-delivery__label{font-weight:600}
.mini-delivery__short{color:#555;flex:1}
.mini-delivery__toggle{width:28px;height:28px;border:none;border-radius:50%;background:#ff8a00;color:#fff;cursor:pointer;font-weight:700;line-height:28px}

/* Попап */
.delivery-popup{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9999;justify-content:center;align-items:center}
.delivery-popup.is-open{display:flex}
.delivery-popup__dialog{background:#fff;max-width:680px;width:92%;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.2);padding:18px 20px 8px;position:relative}
.delivery-popup__close{position:absolute;right:10px;top:6px;border:none;background:none;font-size:24px;line-height:1;cursor:pointer}
.delivery-popup__title{margin:6px 0 14px;font-size:20px;font-weight:700}
.delivery-popup__list{border-top:1px solid #eee}
.delivery-popup__item{display:flex;align-items:flex-start;gap:10px;padding:12px 2px;border-bottom:1px solid #eee}
.delivery-popup__icon{flex:0 0 28px}
.delivery-popup__info{flex:1;min-width:0}
.delivery-popup__name{font-weight:600;margin-bottom:2px}
.delivery-popup__desc{color:#666;font-size:13px;line-height:1.4}
.delivery-popup__price{white-space:nowrap;font-weight:700;margin-left:8px}
body.modal-open{overflow:hidden}


@media (max-width: 767px) {
  .mini-delivery {
    margin: 14px auto 16px;   /* сверху 14px, снизу 16px для отлипа */
    width: 95%;               /* чуть шире чем было */
    max-width: 360px;         /* можно подогнать под ширину кнопки */
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    padding: 12px 14px;
    box-sizing: border-box;
  }
}


.btn-compare + .btn-share {
  margin-left: 12px !important;
}


/* КОРЗИНА МОБИЛА */
@media (max-width: 767px){
  /* твой рабочий фикс — оставляем */
  .product-thumb .actions,
  .product-item .actions,
  .product-thumb .cart,
  .product-item .cart,
  .product-thumb .btn-cart,
  .product-item .btn-cart {
    width: auto !important;
    max-width: 42px !important;
    min-width: 42px !important;
  }

  /* делаем кнопку квадратной */
  .product-thumb .btn-cart,
  .product-item .btn-cart,
  .product-thumb .btn-general,   /* если остался старый класс */
  .product-item .btn-general {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 0 !important; /* убираем текст */
    background: #ff6f00 !important; /* цвет темы */
  }

  /* сама иконка корзины */
  .product-thumb .btn-cart .icon-cart-add,
  .product-item .btn-cart .icon-cart-add,
  .product-thumb .btn-general .icon-cart-add,
  .product-item .btn-general .icon-cart-add {
    width: 20px !important;
    height: 20px !important;
    display: inline-block !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
  }

  /* прячем "Купити" */
  .product-thumb .btn-cart .text-cart-add,
  .product-item .btn-cart .text-cart-add,
  .product-thumb .btn-general .text-cart-add,
  .product-item .btn-general .text-cart-add {
    display: none !important;
  }
}


/* --- Сетка для caption --- */
.product-thumb .caption.dflex.flex-column,
.product-item  .caption.dflex.flex-column {
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-auto-rows: auto;
  grid-row-gap: 6px;
}

/* Название всегда на всю ширину */
.product-thumb .caption .product-name,
.product-item  .caption .product-name {
  grid-column: 1 / -1;
}

/* "В наявності" — слева, аккуратно */
.product-thumb .caption .stock-status,
.product-item  .caption .stock-status {
  grid-column: 1 / 2;
  display: flex !important;
  align-items: center !important;
  gap: 4px;
  font-size: 12px !important;
  font-weight: 400 !important;
  background: none !important;
  padding: 0 !important;
  border: none !important;
  white-space: nowrap;
}

/* Рейтинг — справа, в той же строке */
.product-thumb .caption .rating,
.product-item  .caption .rating {
  grid-column: 2 / 3;
  justify-self: end;
  display: flex !important;
  align-items: center !important;
  gap: 4px;
  font-size: 12px !important;
  margin-top: 0 !important;
}

/* Счётчик отзывов — оставляем, но миниатюрный */
.product-thumb .quantity-reviews,
.product-item .quantity-reviews {
  font-size: 11px !important;
  margin-left: 4px !important;
  background: #F8F9FA;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Блок цены/корзины — всегда ниже */
.product-thumb .caption .price-actions-box,
.product-item  .caption .price-actions-box {
  grid-column: 1 / -1;
}

@media (max-width: 767px) {
  /* Делаем компактнее */
  .product-thumb .caption.dflex.flex-column,
  .product-item .caption.dflex.flex-column {
    grid-row-gap: 2px !important; /* меньше расстояние между строками */
  }

  /* Звёзды и текст "в наявності" */
  .product-thumb .caption .stock-status,
  .product-item .caption .stock-status,
  .product-thumb .caption .rating,
  .product-item .caption .rating {
    font-size: 12px !important;
    gap: 3px !important;
    margin-bottom: 0 !important; /* убираем лишний низ */
  }

  /* Размер звёзд */
  .product-thumb .rating-star,
  .product-item .rating-star,
  .product-thumb .rating-star-active,
  .product-item .rating-star-active {
    width: 12px !important;
    height: 12px !important;
  }

  /* Счётчик отзывов (если нужен компактнее) */
  .product-thumb .quantity-reviews,
  .product-item .quantity-reviews {
    font-size: 10px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
  }
}










/* Гарантируем, что блок с вариантами всегда уходит ниже артикула+рейтинга */
#product .left-block .product-variants {
  clear: both;
  margin-top: 10px;   /* можешь отрегулировать по вкусу */
}


/* Карточка товара: артикул слева, рейтинг справа */
#product .left-block .content-block{
  display: flow-root;           /* замыкаем float'ы, ничего ниже не поплывёт */
}

#product .left-block .info-model{
  float: left;
  margin: 0 12px 8px 0;         /* прижали к звёздам и убрали лишний отступ снизу */
}

#product .left-block .rating{
  float: right;
  margin: 0 0 8px 12px;
}

/* лёгкий сдвиг звёзд чуть левее (если нужно — подкорректируй/удали) */
#product .left-block .rating-stars{ transform: translateX(-4px); }

/* счётчик отзывов — маленький зазор слева */
#product .left-block .rating .quantity-reviews{ margin-left: 6px; }

/* На мобиле пусть всё становится столбиком */
@media (max-width: 767px){
  #product .left-block .info-model,
  #product .left-block .rating {
    float: none;
    display: inline-flex;
    margin: 0 8px 6px 0;
  }

  /* прижимаем вправо */
  #product .left-block .rating {
    margin-left: 100px; /* сдвигаем вправо */
  }

  /* чуть опускаем звёзды и счётчик */
  #product .left-block .rating-stars,
  #product .left-block .rating .quantity-reviews {
    position: relative;
    top: 1px; /* опускаем вниз */
  }
}


/* уменьшаем заголовок "Варіанти кольору" */
#product .left-block .product-variants h3 {
  font-size: 14px !important;  /* вместо 18–20px */
  font-weight: 500;            /* можно сделать тоньше */
  margin-bottom: 6px;          /* поджали отступ */
}











