/* Привязки MediaCenter/WooCommerce/YITH. Здесь только native-селекторы,
   их состояния и ограничения сторонних стилей; фирменные значения берутся
   из skin, общая раскладка собственных компонентов — из objects. */
/* Единый язык каталога и покупки: фирменный зелёный, прежние шрифты и FA6.
   Выбранные фильтры и значения атрибутов печатает PHP из данных WooCommerce. */
/* WooCommerce не подключает свои CSS в MediaCenter. Размеры и видимость
   штатного price-slider задаются здесь, обработчики остаются WooCommerce. */
.gh-filter-widget .ui-slider { position: relative; height: 6px; margin: 22px 12px; background: var(--gh-border); border-radius: 6px; }
.gh-filter-widget .ui-slider-range { position: absolute; height: 100%; background: var(--gh-brand); }
.gh-filter-widget .ui-slider-handle { position: absolute; top: -9px; width: 24px; height: 24px; margin-left: -12px; border: 2px solid var(--gh-brand); border-radius: 50%; background: var(--gh-paper); cursor: ew-resize; z-index: 2; touch-action: none; }
.gh-filter-widget .price_slider_amount { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.gh-filter-widget .price_slider_amount .clear { display: none; }
.gh-filter-widget .price_slider_amount input[name="min_price"],
.gh-filter-widget .price_slider_amount input[name="max_price"] { display: block !important; width: calc(50% - 5px); min-height: 44px; padding: 8px; border: 1px solid var(--gh-border-strong); border-radius: 6px; font-size: 16px; }
.gh-filter-widget .price_label { font-size: 13px; color: var(--gh-muted); }
.gh-filter-widget button { min-height: 44px; padding: 10px 16px; border-radius: 6px; }
.gh-purchase-min { color: var(--gh-ink); font-size: 14px; }
/* Сообщения сохраняют native role/status и Ajax-маркеры. Уменьшается
   только оформление темы, превращавшее пустую корзину в огромный заголовок. */
.woocommerce .cart-empty.woocommerce-info { font-size: 20px !important; line-height: 1.5 !important; text-align: center; padding: 24px !important; margin: 20px 0 12px; background: var(--gh-soft); border: 1px solid var(--gh-border); border-radius: 8px; color: var(--gh-brand-ink); }
.woocommerce .return-to-shop { text-align: center; margin: 0 0 32px; }
.woocommerce .return-to-shop .button { min-height: 44px; padding: 12px 20px; border-radius: 6px; }
.woocommerce :is(.woocommerce-message,.woocommerce-error,.woocommerce-info) { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 991px) {
    /* Native-крошки используют ту же политику полосы, что OOCSS-навигация.
       overflow-x сохраняется: длинный путь доступен касанием и клавиатурой. */
    .gh-site-header .mc-breadcrumb { scrollbar-width: none; }
    .gh-site-header .mc-breadcrumb::-webkit-scrollbar { display: none; }
    /* Категории уже доступны в компактной навигации; прежняя сетка категорий
       на мобильном не повторяется перед каждой товарной выдачей. */
    .gh-catalog #grid-view .product-category { display: none; }
    .gh-catalog .control-bar { border: 1px solid var(--gh-border); border-radius: 8px; background: var(--gh-soft); }
    .gh-catalog .gh-catalog-filters > summary { margin-bottom: 8px; }
    .gh-catalog .gh-catalog-filters[open] > summary { margin-bottom: 8px; }
    .gh-catalog .gh-filter-body { margin-bottom: 12px; }
    .gh-catalog #list-view .product-inner { padding: 12px; border: 1px solid var(--gh-border); border-radius: 6px; }
    .gh-catalog #list-view .row { display: flex; flex-wrap: wrap; margin: 0; }
    .gh-catalog #list-view .product-thumbnail-wrapper { max-width: 140px; margin: auto; }
    .gh-catalog #list-view .product-thumbnail-wrapper img { position: static; transform: none; width: 100%; height: auto; object-fit: contain; }
    .gh-catalog #list-view .title-area { height: auto !important; }
    .gh-catalog #list-view .title-area h2, .gh-catalog #list-view .title-area h3 { font-size: 18px; line-height: 1.4; }
    .gh-catalog #list-view .body, .gh-catalog #list-view .footer { width: 100%; padding: 8px; }
    .gh-catalog #list-view .button { min-height: 44px; }
    .single-product .summary .product_meta { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
    .single-product .summary .price { font-size: 25px; }
    .single-product .summary .quantity input { min-height: 48px; font-size: 16px; }
    .single-product .woocommerce-tabs ul.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0; }
    .single-product .woocommerce-tabs ul.tabs li { flex: 0 0 auto; margin: 0; }
    .single-product .woocommerce-tabs ul.tabs a { display: block; min-height: 44px; padding: 12px; font-size: 14px; }
    .woocommerce-cart .woocommerce-message { margin: 12px 0; }
    /* Штатный preview YITH не должен лежать под нижней навигацией.
       Сохраняются его ссылки удаления/сравнения и существующие обработчики. */
    #yith-woocompare-preview-bar { bottom: calc(76px + env(safe-area-inset-bottom)) !important; max-width: 100%; padding: 8px; }
    #yith-woocompare-preview-bar > .container { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; margin: 0; }
    #yith-woocompare-preview-bar .content { flex: 1; min-width: 0; width: auto; padding: 0; }
    #yith-woocompare-preview-bar .compare-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 0; margin: 0; }
    #yith-woocompare-preview-bar .compare-list > li { flex: 0 0 52px; width: 52px; height: 52px; margin: 0; }
    #yith-woocompare-preview-bar .compare-list > .product-placeholder { display: none !important; }
    #yith-woocompare-preview-bar .image-wrap, #yith-woocompare-preview-bar .image-wrap img { width: 52px; height: 52px; object-fit: contain; }
    #yith-woocompare-preview-bar footer { flex: 0 0 130px; width: 130px; padding: 0; margin: 0; }
    #yith-woocompare-preview-bar footer .button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; font-size: 12px; line-height: 1.4; white-space: normal; }
    body:has(#yith-woocompare-preview-bar.shown) { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
    /* Галерея с несколькими фото: общие правила большого изображения не
       распространяются на миниатюры. Переключение и увеличение остаются WC. */
    .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image > a > img { height: 220px; width: 100%; object-fit: contain; }
    .single-product .woocommerce-product-gallery .flex-control-thumbs { display: flex !important; flex-wrap: nowrap; gap: 8px; list-style: none; padding: 0; margin: 8px 0; overflow-x: auto; }
    .single-product .woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 56px !important; width: 56px !important; float: none !important; margin: 0; }
    .single-product .woocommerce-product-gallery .flex-control-thumbs img { width: 56px; height: 56px; object-fit: contain; cursor: pointer; }
    .single-product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:not(:first-child) { display: none; }
    /* На узком экране hover-увеличение закрывает исходное фото при касании.
       Полноэкранный просмотр по штатной кнопке галереи остаётся доступен. */
    .single-product .woocommerce-product-gallery .zoomImg { display: none !important; }
}
