/*
Theme Name:   Tavana — вязаные изделия
Theme URI:    https://tavana.shop
Description:  Дочерняя тема Blocksy для магазина изделий ручной работы: вязаных игрушек, сумок и сувениров. Тёплая палитра натуральной шерсти, локальные шрифты с кириллицей.
Author:       Tavana
Template:     blocksy
Version:      1.0.0
Text Domain:  tavana
*/

/* ============================================================
   ТИПОГРАФИКА
   Шрифты локальные (папка /fonts), Google Fonts не запрашивается.
   Cormorant Garamond — заголовки, Manrope — весь остальной текст.
   ============================================================ */

:root {
  --theme-font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --theme-font-weight: 400;

  /* Собственные токены магазина */
  --tavana-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --tavana-sage: #7E8F6E;          /* шалфейный — вторичный акцент */
  --tavana-radius: 14px;           /* мягкие скругления «как у пряжи» */
}

h1, h2,
.site-title,
.entry-title,
.woocommerce-products-header__title {
  font-family: var(--tavana-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.2; }

/* Названия товаров — Manrope: на карточках он читается лучше засечного */
.woocommerce-loop-product__title,
.wc-block-grid__product-title {
  font-family: var(--theme-font-family);
  font-weight: 600;
  letter-spacing: 0;
}

/* ============================================================
   КАРТОЧКИ ТОВАРОВ
   ============================================================ */

.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.wc-block-grid__product-image img {
  border-radius: var(--tavana-radius);
}

.woocommerce span.onsale,
.wc-block-grid__product-onsale {
  background-color: var(--tavana-sage);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================================
   КНОПКИ И ФОРМЫ
   ============================================================ */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wp-block-button__link,
.wc-block-components-button {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wc-block-components-text-input input,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border-radius: 10px;
}

/* Кнопка выбора ПВЗ 5Post — приводим к стилю магазина.
   Классы разные: .fivepost-button-map в классическом чекауте,
   .post5-choose-point в блочном. */
.fivepost-button-map,
.post5-choose-point {
  background-color: var(--tavana-sage) !important;
  border-color: var(--tavana-sage) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 600;
  padding: 11px 22px !important;
  border: none !important;
  cursor: pointer;
}

.post5-map-btn-wrapper {
  margin-top: 12px;
}

.fivepost-button-map:hover,
.post5-choose-point:hover {
  background-color: #6C7C5E !important;
  border-color: #6C7C5E !important;
}

/* ============================================================
   МЕЛОЧИ
   ============================================================ */

.entry-content a:not(.button):not(.wp-block-button__link) {
  text-underline-offset: 3px;
}

/* Уважаем настройку «уменьшенное движение» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   ГЛАВНАЯ
   Заголовок страницы не нужен — у главной свой герой-блок.
   ============================================================ */

.home .hero-section,
.home .page-title,
.home .entry-header {
  display: none;
}

/* Плитка категорий: у блока Woo своя CSS, целимся в его собственные классы */
.wc-block-product-categories-list--has-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wc-block-product-categories-list-item {
  margin: 0;
  text-align: center;
}

.wc-block-product-categories-list-item > a {
  display: block;
  text-decoration: none;
  font-family: var(--theme-font-family);
  font-weight: 600;
  font-size: 1.05rem;
}

.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image {
  /* блок Woo жёстко задаёт этой обёртке 48px — снимаем ограничение */
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 12px;
}

.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image img {
  /* стили блока Woo подключаются позже — здесь нужен вес */
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  border-radius: var(--tavana-radius);
}

/* счётчик товаров — приглушаем, он вторичен */
.wc-block-product-categories-list-item-count {
  color: var(--theme-palette-color-3);
  font-weight: 400;
}

/* ============================================================
   КАРТОЧКА В СЕТКЕ
   При четырёх колонках дефолтный размер названия слишком крупный.
   ============================================================ */

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title {
  font-size: 1.02rem;
  line-height: 1.35;
  margin-bottom: 6px;
}

.woocommerce ul.products li.product .price,
.wc-block-grid__product-price {
  font-weight: 700;
  font-size: 1.05rem;
}

/* Категория под названием — вспомогательная информация */
.woocommerce ul.products li.product .ct-product-taxonomies {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--theme-palette-color-3);
}

/* ============================================================
   ИЗГОТОВЛЕНИЕ ПОД ЗАКАЗ
   Отметка должна быть заметной: от неё зависит, применимо ли
   ограничение возврата по ст. 26.1 ЗоЗПП.
   ============================================================ */

.tavana-mto-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--tavana-sage);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.woocommerce ul.products li.product {
  position: relative;
}

.tavana-mto-notice {
  margin: 18px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--tavana-sage);
  border-radius: 10px;
  background: var(--theme-palette-color-6);
}

.tavana-mto-notice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--theme-palette-color-4);
}

.tavana-mto-notice p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--theme-palette-color-3);
}

/* Отметка в корзине и сводке блочного чекаута */
.wc-block-components-product-details__izgotovlenie-pod-zakaz,
.wc-block-components-product-details li {
  font-size: 0.82rem;
}
