/*
 Theme Name: SeoUsluga child
 Author:	seousluga.ru 
 Template:     template
 Version:      1.0.0
*/

/* ===== ПРЕМИАЛЬНЫЕ ЗАГОЛОВКИ H1–H4 ===== */

.premium-heading {
  position: relative;
  margin-top: 0;
  color: #173c2b;
  font-family: inherit;
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
}

/* Не даёт заголовку HERO мелькнуть до подготовки слов */
.growth-hero__title:not([data-premium-heading="1"]) {
  visibility: hidden;
}

h1.premium-heading { margin-bottom: 5px; font-size: clamp(32px, 5vw, 42px); }
h1.product_title.premium-heading { margin-bottom: 10px; font-size: clamp(28px, 3.5vw, 42px); }
h2.premium-heading { margin-bottom: 24px; font-size: clamp(30px, 4vw, 36px); }
h3.premium-heading { margin-bottom: 18px; font-size: clamp(23px, 3vw, 30px); }
h4.premium-heading { margin-bottom: 14px; font-size: clamp(19px, 2vw, 25px); letter-spacing: -.015em; }

/* Каждое слово */
.heading-word {
  display: inline-block;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(0, .55em, 0) scale(.97);
  transform-origin: left bottom;
  will-change: transform, opacity;
}

.premium-heading.word-reveal-visible .heading-word {
  animation: premiumWordReveal .7s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: calc(40ms + var(--word-index) * 75ms);
}

@keyframes premiumWordReveal {
  from {
    opacity: 0;
    transform: translate3d(0, .55em, 0) scale(.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Золотое оформление первого полноценного слова */
.heading-first-word {
  position: relative;
  color: #d59c39;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(213, 156, 57, .15);
}

.heading-first-word::after {
  content: "";
  position: absolute;
  right: 3%;
  bottom: -5px;
  left: 3%;
  height: 3px;
  border-radius: 20px;
  background: linear-gradient(90deg, #d59c39 0%, rgba(213, 156, 57, .4) 70%, transparent 100%);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform, opacity;
}

.premium-heading.word-reveal-visible .heading-first-word::after {
  animation: premiumLineReveal .7s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: .45s;
}

@keyframes premiumLineReveal {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 767px) {
  h1.premium-heading { margin-bottom: 22px; font-size: clamp(31px, 10vw, 43px); }
  h1.product_title.premium-heading { margin-bottom: 18px; font-size: clamp(27px, 8vw, 36px); }
  h2.premium-heading { margin-bottom: 19px; font-size: clamp(26px, 8vw, 35px); }
  h3.premium-heading { margin-bottom: 15px; font-size: clamp(21px, 6vw, 27px); }
  h4.premium-heading { margin-bottom: 12px; font-size: clamp(18px, 5vw, 22px); }

  .premium-heading.word-reveal-visible .heading-word {
    animation-duration: .6s;
    animation-delay: calc(25ms + var(--word-index) * 55ms);
  }

  .heading-first-word::after {
    bottom: -4px;
    height: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heading-word,
  .heading-first-word::after {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
/* скроллбар */
html {
  scrollbar-width: thin;
  scrollbar-color: #173C2B #f4f4f4;
}

/* WebKit (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f4f4f4;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #173C2B 0%, #2A5C43 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2A5C43 0%, #173C2B 100%);
}

/*Корзина*/
.wd-tools-element .wd-cart-number.wd-tools-count{
position:absolute!important;
top:-6px!important;
inset-inline-end:-10px!important;
transform:translateX(25%)!important;
display:inline-flex!important;
align-items:center!important;
justify-content:center!important;
width:auto!important;
min-width:22px!important;
max-width:none!important;
height:22px!important;
padding:0 7px!important;
white-space:nowrap!important;
border-radius:999px!important;
box-sizing:border-box!important;
background:#fff!important;
color:var(--wd-primary-color)!important;
font-size:11px!important;
font-weight:700!important;
line-height:1!important;
box-shadow:0 3px 10px rgba(0,0,0,.14)!important;
}

/* ==================================================
   ЕКОМПАКТНЫЙ ПЕРЕКЛЮЧАТЕЛЬ: CF7 + WOOCOMMERCE (#028249)
================================================== */

/* Контейнеры и строки */
:is(.seousluga-form-container, .seousluga-consent-block) label:has(input[name="seousluga-policy"]),
.woocommerce-checkout label.woocommerce-form__label-for-checkbox:has(input#terms) {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 10px;
  width: 100%;
  margin: 0 !important;
  cursor: pointer;
}

:is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-list-item {
  display: block;
  margin: 0 !important;
}

:is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-acceptance {
  display: block;
  width: 100%;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 15px !important;
}

/* Переключатель (уменьшенный размер 38x22px) */
:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"],
.woocommerce-checkout input#terms.input-checkbox {
  position: relative !important;
  display: block !important;
  flex: 0 0 38px !important;
  height: 22px !important;
  margin: 1px 0 0 !important;
  padding: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
  overflow: hidden;
  cursor: pointer;
  outline: 0;
  background: #eef1ef !important;
  background-image: none !important;
  border: 1px solid #c5ccc8 !important;
  border-radius: 999px !important;
  box-shadow: inset 0 1px 3px rgba(20, 35, 27, .1), 0 1px 2px rgba(20, 35, 27, .05) !important;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Бегунок (выключен — 14px) */
:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]::before,
.woocommerce-checkout input#terms.input-checkbox::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 4px !important;
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background: #028249 !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 5px rgba(2, 130, 73, .22) !important;
  transform: translate3d(0, -50%, 0) !important;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), background-color .25s ease, box-shadow .25s ease;
}

/* Сброс стандартных галочек */
:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]::after,
.woocommerce-checkout input#terms.input-checkbox::after {
  display: none !important;
  content: none !important;
}

/* Переключатель: включен */
:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]:checked,
.woocommerce-checkout input#terms.input-checkbox:checked {
  background: #028249 !important;
  border-color: #028249 !important;
  box-shadow: inset 0 1px 3px rgba(0, 60, 34, .18), 0 3px 10px rgba(2, 130, 73, .18) !important;
}

:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]:checked::before,
.woocommerce-checkout input#terms.input-checkbox:checked::before {
  background: #fff !important;
  box-shadow: 0 2px 5px rgba(0, 50, 28, .24) !important;
  transform: translate3d(16px, -50%, 0) !important;
}

/* Фокус и ошибки */
:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]:focus-visible,
.woocommerce-checkout input#terms.input-checkbox:focus-visible {
  border-color: #028249 !important;
  box-shadow: 0 0 0 3px rgba(2, 130, 73, .16) !important;
}

:is(.seousluga-form-container, .seousluga-consent-block) input[name="seousluga-policy"]:disabled,
.woocommerce-checkout input#terms.input-checkbox:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.woocommerce-checkout input#terms.input-checkbox[aria-invalid="true"]:not(:checked) {
  border-color: #c94a4a !important;
  box-shadow: 0 0 0 3px rgba(201, 74, 74, .15) !important;
}

/* Текст согласия */
:is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-list-item-label {
  display: block;
  flex: 1;
  color: #59625d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
  display: block;
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: calc(100% - 50px);
  color: #59625d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* Звёздочка WooCommerce */
.woocommerce-checkout label:has(input#terms) abbr.required {
  flex: 0 0 auto !important;
  align-self: flex-start;
  margin: 1px 0 0 -6px !important;
  padding: 0 !important;
  position: static !important;
  color: #c94a4a;
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
}

/* Ссылки в тексте */
:is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-list-item-label a,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text a {
  color: #028249 !important;
  font-weight: 650;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(2, 130, 73, .3);
  transition: color .2s ease, border-color .2s ease;
}

:is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-list-item-label a:hover,
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text a:hover {
  color: #016d3d !important;
  border-color: #016d3d !important;
}

/* Мобильная адаптация */
@media (max-width: 767px) {
  :is(.seousluga-form-container, .seousluga-consent-block) label:has(input[name="seousluga-policy"]),
  .woocommerce-checkout label.woocommerce-form__label-for-checkbox:has(input#terms) {
    gap: 8px;
  }

  :is(.seousluga-form-container, .seousluga-consent-block) .wpcf7-list-item-label,
  .woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
    font-size: 12px;
    line-height: 1.35;
  }

  .woocommerce-checkout label:has(input#terms) abbr.required {
    margin-left: -5px !important;
    font-size: 12px;
  }
}

/* ========================================
   КАТЕГОРИИ
   Применяется только к сетке .wd-cats
======================================== */

.products.wd-cats {
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:14px !important;
}

.products.wd-cats > .wd-cat {
  width:auto !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
}

.products.wd-cats > .wd-cat > .wd-cat-inner {
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  gap:18px !important;
  width:100% !important;
  min-height:140px !important;
  height:100% !important;
  margin:0 !important;
  padding:14px !important;
  background:#fff !important;
  border:1px solid #e7e7e7 !important;
  border-radius:10px !important;
  box-shadow:none !important;
  transition:
    border-color .3s,
    transform .35s cubic-bezier(.22,1,.36,1),
    box-shadow .35s;
}

.products.wd-cats > .wd-cat .wd-cat-thumb,
.products.wd-cats > .wd-cat .wd-cat-image {
  position:relative !important;
  inset:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 104px !important;
  width:104px !important;
  height:104px !important;
  min-width:104px !important;
  min-height:104px !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
}

.products.wd-cats > .wd-cat .wd-cat-image img {
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  margin:auto !important;
  object-fit:contain !important;
  object-position:center !important;
  transform:none;
  transition:transform .5s cubic-bezier(.22,1,.36,1);
}

.products.wd-cats > .wd-cat .wd-cat-content {
  position:static !important;
  display:block !important;
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
  height:auto !important;
  margin:0 !important;
  padding:0 38px 0 0 !important;
  background:none !important;
  transform:none !important;
}

.products.wd-cats > .wd-cat .wd-cat-header,
.products.wd-cats > .wd-cat .wd-entities-title {
  display:block !important;
  margin:0 !important;
  padding:0 !important;
}

.products.wd-cats > .wd-cat .wd-entities-title a {
  color:#0a0a0a !important;
  font-size:20px !important;
  font-weight:700 !important;
  line-height:1.25 !important;
  letter-spacing:-.015em;
  text-decoration:none !important;
  text-shadow:none !important;
  transition:color .3s;
}

.products.wd-cats > .wd-cat .wd-cat-content::after {
  content:"→";
  position:absolute;
  top:50%;
  right:18px;
  color:#028249;
  font-size:20px;
  opacity:.55;
  transform:translateY(-50%);
  transition:
    opacity .3s,
    transform .35s cubic-bezier(.22,1,.36,1);
}

.products.wd-cats > .wd-cat .wd-fill {
  z-index:4;
}

@media (hover:hover) {
  .products.wd-cats > .wd-cat > .wd-cat-inner:hover {
    border-color:#028249 !important;
    box-shadow:0 12px 28px rgba(2,130,73,.12) !important;
    transform:translateY(-3px);
  }

  .products.wd-cats
  > .wd-cat
  > .wd-cat-inner:hover
  .wd-cat-image img {
    transform:scale(1.04);
  }

  .products.wd-cats
  > .wd-cat
  > .wd-cat-inner:hover
  .wd-entities-title a {
    color:#028249 !important;
  }

  .products.wd-cats
  > .wd-cat
  > .wd-cat-inner:hover
  .wd-cat-content::after {
    opacity:1;
    transform:translateY(-50%) translateX(5px);
  }
}

@media (max-width:1024px) {
  .products.wd-cats {
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  .products.wd-cats > .wd-cat .wd-entities-title a {
    font-size:17px !important;
  }
}

@media (max-width:640px) {
  .products.wd-cats {
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:8px !important;
  }

  .products.wd-cats > .wd-cat > .wd-cat-inner {
    flex-direction:column !important;
    justify-content:flex-start !important;
    gap:6px !important;
    min-height:0 !important;
    padding:8px !important;
    text-align:center !important;
  }

  .products.wd-cats > .wd-cat .wd-cat-thumb,
  .products.wd-cats > .wd-cat .wd-cat-image {
    flex-basis:auto !important;
    width:100% !important;
    height:auto !important;
    min-width:0 !important;
    min-height:0 !important;
    aspect-ratio:1 / 1 !important;
  }

  .products.wd-cats > .wd-cat .wd-cat-image img {
    padding:5px !important;
  }

  .products.wd-cats > .wd-cat .wd-cat-content {
    width:100% !important;
    padding:0 !important;
  }

  .products.wd-cats > .wd-cat .wd-cat-content::after {
    display:none !important;
  }

  .products.wd-cats > .wd-cat .wd-entities-title a {
    font-size:14px !important;
    line-height:1.2 !important;
  }
}

/* ========================================
   ОБЫЧНЫЕ ТОВАРНЫЕ КАРТОЧКИ

   Работает в:
   — каталоге;
   — категории;
   — блоках под категориями;
   — обычных каруселях;
   — похожих товарах.

   Не работает для компактных wd-hover-small.
======================================== */


/* Одинаковая высота карточек */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item) {
  align-self:stretch !important;
  height:100% !important;
  min-height:0 !important;
}

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
> .wd-product-wrapper {
  display:flex !important;
  flex-direction:column !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
}


/* Одинаковая адаптивная область фотографии */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.wd-product-thumb {
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex:0 0 auto !important;
  width:100% !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  aspect-ratio:1 / 1 !important;
  overflow:hidden !important;
  background:#fff !important;
}


/* Ссылка заполняет всю область фотографии */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.wd-product-img-link {
  position:relative !important;
  inset:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  margin:0 !important;
  padding:10px !important;
  overflow:hidden !important;
  background:#fff !important;
}


/* Фотография показывается целиком и располагается по центру */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.wd-product-img-link > img {
  position:static !important;
  inset:auto !important;
  display:block !important;
  flex:0 1 auto !important;
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  max-width:100% !important;
  max-height:100% !important;
  margin:auto !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center center !important;
  transform:none !important;
}


/* Дополнительное изображение при наведении */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.hover-img {
  position:absolute !important;
  inset:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:100% !important;
  height:100% !important;
  padding:10px !important;
  overflow:hidden !important;
  background:#fff !important;
}

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.hover-img img {
  position:static !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  margin:auto !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center center !important;
}


/* Нижняя часть растягивается до одинаковой высоты */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.product-element-bottom {
  display:flex !important;
  flex:1 1 auto !important;
  flex-direction:column !important;
  width:100% !important;
  min-width:0 !important;
  min-height:0 !important;
}


/* Цена и кнопка располагаются в нижней части */

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.wrap-price {
  margin-top:auto !important;
}

.wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
.wd-product-footer {
  margin-top:0 !important;
}


/* Одинаковая высота слайдов обычной карусели */

.wd-carousel-item:has(
  > .wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
) {
  align-self:stretch !important;
  height:auto !important;
}


/* Мобильная версия */

@media (max-width:767px) {
  .wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
  .wd-product-img-link {
    padding:6px !important;
  }

  .wd-product.product-grid-item:not(.wd-hover-small):not(.wd-product-list):not(.wd-product-small):not(.product-list-item)
  .hover-img {
    padding:6px !important;
  }
}