
/* =========================================================
   ГЛАВНАЯ — финальная геометрия категорий и товарных фото
   Этот файл намеренно нейтрализует старые first-child правила site.css.
   ========================================================= */

/* 1. Категории: все 7 карточек имеют ОДИНАКОВУЮ геометрию */
body:has(.hero) .category-strip{
  padding:16px 0 18px;
  background:#f4efe9;
  border-block:1px solid #e6ddd5;
}

body:has(.hero) .category-strip .category-strip__track,
body:has(.hero) .benefits + .home-gifts + .category-strip .category-strip__track{
  display:grid !important;
  grid-template-columns:repeat(7,minmax(0,1fr)) !important;
  gap:8px !important;
  overflow:visible !important;
}

/* Убираем накопившийся специальный дизайн первой карточки */
body:has(.hero) .category-strip .category-strip__item,
body:has(.hero) .category-strip .category-strip__item:first-child,
body:has(.hero) .category-strip .category-strip__item:first-child:not(.is-current),
body:has(.hero) .category-strip .category-strip__item.is-current{
  position:relative !important;
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center !important;
  align-content:normal !important;
  justify-content:flex-start !important;
  min-width:0 !important;
  min-height:76px !important;
  gap:10px !important;
  padding:10px 38px 10px 11px !important;
  border:1px solid #ded3ca !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#2d251f !important;
  box-shadow:none !important;
  font-size:12px !important;
  line-height:1.15 !important;
  transform:none !important;
}

/* Первая карточка больше не "особенная" */
body:has(.hero) .category-strip .category-strip__item:first-child::before,
body:has(.hero) .category-strip .category-strip__item.is-current::before{
  display:none !important;
  content:none !important;
}

body:has(.hero) .category-strip .category-strip__item:hover{
  border-color:#c98c73 !important;
  background:#fffaf7 !important;
  transform:translateY(-1px) !important;
}

/* Иконка */
body:has(.hero) .category-strip .category-strip__thumb,
body:has(.hero) .category-strip .category-strip__item:first-child .category-strip__thumb,
body:has(.hero) .category-strip .category-strip__item:first-child:not(.is-current) .category-strip__thumb,
body:has(.hero) .category-strip .category-strip__item.is-current .category-strip__thumb{
  width:40px !important;
  height:40px !important;
  flex:0 0 40px !important;
  grid-row:auto !important;
  display:grid !important;
  place-items:center !important;
  overflow:hidden !important;
  border-radius:9px !important;
  background:#f3ede7 !important;
  box-shadow:none !important;
}

body:has(.hero) .category-strip .category-strip__thumb img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

/* Название категории — по вертикальному центру */
body:has(.hero) .category-strip .category-strip__item>span:last-child,
body:has(.hero) .category-strip .category-strip__item:first-child>span:last-child,
body:has(.hero) .category-strip .category-strip__item:first-child:not(.is-current)>span:last-child,
body:has(.hero) .category-strip .category-strip__item.is-current>span:last-child{
  display:block !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  align-self:center !important;
  color:inherit !important;
  font-size:12px !important;
  font-weight:700 !important;
  line-height:1.18 !important;
  word-break:normal !important;
  overflow-wrap:normal !important;
  hyphens:none !important;
}

/* Стрелка всегда точно по центру высоты карточки */
body:has(.hero) .category-strip .category-strip__item::after,
body:has(.hero) .category-strip .category-strip__item:first-child::after,
body:has(.hero) .category-strip .category-strip__item.is-current::after{
  content:'→' !important;
  display:block !important;
  position:absolute !important;
  top:50% !important;
  right:11px !important;
  bottom:auto !important;
  width:auto !important;
  height:auto !important;
  transform:translateY(-50%) !important;
  color:var(--orange) !important;
  font-size:16px !important;
  font-weight:400 !important;
  line-height:1 !important;
}

/* 2. Карточки товаров на главной:
   используем 4:3 — под реальные исходные фотографии, а не квадрат 1:1 */
body:has(.hero) .home-popular .product-card .product-image,
body:has(.hero) .category-menu .product-card .product-image{
  width:100% !important;
  height:auto !important;
  aspect-ratio:4 / 3 !important;
  overflow:hidden !important;
  border-radius:10px !important;
  background:#eee7df !important;
}

body:has(.hero) .home-popular .product-card .product-image img,
body:has(.hero) .category-menu .product-card .product-image img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center center !important;
}

/* Товарные карточки остаются компактными после уменьшения изображения */
body:has(.hero) .home-popular .product-card,
body:has(.hero) .category-menu .product-card{
  min-width:0;
}

body:has(.hero) .home-popular .product-card h3,
body:has(.hero) .category-menu .product-card h3{
  margin-top:12px;
}

/* 3. Стрелки сценариев выбора тоже по центру */
body:has(.hero) .choice-card{
  position:relative;
  padding-right:42px !important;
}
body:has(.hero) .choice-card::after{
  top:50% !important;
  right:14px !important;
  bottom:auto !important;
  transform:translateY(-50%) !important;
  line-height:1 !important;
}

/* 4. Акции остаются перед "Как оформить заказ" */
body:has(.hero) .category-menu + .section:has(.promo-grid){
  padding-top:34px;
  padding-bottom:34px;
}
body:has(.hero) .section:has(.promo-grid) + .section{
  padding-top:30px;
}

/* Планшет */
@media(max-width:1180px){
  body:has(.hero) .category-strip .category-strip__track{
    display:flex !important;
    grid-template-columns:none !important;
    gap:8px !important;
    overflow-x:auto !important;
    padding-bottom:2px !important;
    scrollbar-width:none;
  }
  body:has(.hero) .category-strip .category-strip__track::-webkit-scrollbar{
    display:none;
  }
  body:has(.hero) .category-strip .category-strip__item,
  body:has(.hero) .category-strip .category-strip__item:first-child,
  body:has(.hero) .category-strip .category-strip__item:first-child:not(.is-current){
    flex:0 0 176px !important;
    min-width:176px !important;
  }
}

/* Телефон */
@media(max-width:640px){
  body:has(.hero) .category-strip{
    padding:12px 0 14px;
  }

  body:has(.hero) .category-strip .category-strip__item,
  body:has(.hero) .category-strip .category-strip__item:first-child,
  body:has(.hero) .category-strip .category-strip__item:first-child:not(.is-current){
    flex:0 0 158px !important;
    min-width:158px !important;
    min-height:64px !important;
    padding:8px 34px 8px 8px !important;
  }

  body:has(.hero) .category-strip .category-strip__thumb,
  body:has(.hero) .category-strip .category-strip__item:first-child .category-strip__thumb{
    width:38px !important;
    height:38px !important;
    flex-basis:38px !important;
  }

  body:has(.hero) .category-strip .category-strip__item::after{
    right:9px !important;
    font-size:15px !important;
  }

  body:has(.hero) .home-popular .product-card .product-image,
  body:has(.hero) .category-menu .product-card .product-image{
    aspect-ratio:4 / 3 !important;
  }
}

/* T007: показываем категории полностью и товары вертикальными карточками */
@media(max-width:760px){.category-strip__track{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important}.category-strip__item{min-width:0!important;flex:none!important}.home-popular .product-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;overflow:visible!important}.home-popular .product-card{width:100%!important;min-width:0!important;flex:none!important}.info-split{grid-template-columns:minmax(0,1fr)!important}.info-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}}
