/*
Theme Name: My-Xatka-theme
Theme URI: http://xatka.top
Author: Xatka Design
Description: Тема для магазину на базі WooCommerce. Є швидка заміна кольорів :root.
Version: 1.15
Text Domain: Pasha
*/

:root {
    /* Основні акценти */
    --primary-color: #ffaa00;      /* Помаранчевий */
    --primary-hover: #f39c12;      /* Темніший помаранчевий */
    --secondary-color: #2c3e50;    /* Темно-синій */
    --secondary-hover: #34495e;    /* Світліший синій */
    
    /* Текст та фони */
    --text-main: #333;
    --text-muted: #7f8c8d;
    --text-light: #95a5a6;
    --text-white: #fff;
    --body-bg: #f9f9f9;
    --archive-bg: #f4f6f8;
    --white: #fff;
    
    /* Межі та допоміжні */
    --border-color: #e1e8ed;
    --border-light: #f0f0f0;
    --bg-light: #f8f9fa;
    --bg-warm: #fffcf5;
    
    /* Статуси */
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --price-old: #a0a0a0;
	
	--container-xl: 1440px; /* Нова максимальна ширина для великих екранів */
    --container-lg: 1200px; /* Стандартна ширина */
}

/* Базові налаштування */
body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; padding: 0; color: var(--text-main); background-color: var(--body-bg); }
.container { max-width: var(--container-xl); margin: 0 auto; padding: 0 15px; background: var(--white); }

/* Хедер */
/* --- СТИЛІ ХЕДЕРА --- */

.site-header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Логотип */
.logo a {
    font-size: 28px;
    font-weight: 900;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color); /* Наш помаранчевий */
}
/* опис сайту */
.site-description {
    font-size: 13px;
    color: var(--secondary-color);
    margin: 0;
    padding: 0;
}

/* Пошук */
/* КОНТЕЙНЕР ПОШУКУ */
.header-search {
    flex-grow: 1;
    max-width: 600px;
}

.search-form-inner {
    display: flex; /* Вишиковує в один рядок */
    width: 100%;
    position: relative;
}

/* ПОЛЕ ВВОДУ */
.header-search input[type="search"] {
    flex-grow: 1;
    padding: 12px 25px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-right: none; /* Прибираємо праву межу, щоб з'єднати з кнопкою */
    border-radius: 50px 0 0 50px; /* Закруглення тільки зліва */
    background: var(--bg-light);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.header-search input[type="search"]:focus {
    background: var(--white);
    border-color: var(--primary-color);
}

/* КНОПКА ПОШУКУ */
.search-submit-btn {
    background-color: var(--secondary-color); /* Темний колір для контрасту */
    color: var(--text-white);
    border: 2px solid var(--secondary-color);
    padding: 0 30px;
    height: 50px;
    border-radius: 0 50px 50px 0; /* Закруглення тільки справа */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background-color: var(--primary-color); /* Помаранчевий при наведенні */
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 170, 0, 0.2);
}

/* Спеціальний хак: якщо поле у фокусі, підсвічуємо і межу кнопки, якщо вона помаранчева */
.header-search input[type="search"]:focus + .search-submit-btn {
    border-left-color: var(--primary-color);
}

/* АДАПТИВНІСТЬ */
@media (max-width: 600px) {
    .search-submit-btn {
        padding: 0 15px;
        font-size: 12px;
    }
}

/* Меню */
.nav-list {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-list a:hover {
    color: var(--primary-color);
}

/* Контейнер всередині помаранчевої лінії */
.divider-content {
    max-width: var(--container-xl); /* Або будь-яка інша ширина, яку хочеш */
    margin: 0 auto;
    padding: 0 20px; /* Відступи від країв екрану */
    display: flex;
    align-items: center;
    height: 100%; /* Щоб меню було по центру висоти лінії */
}

/* Список меню */
.secondary-menu-list a {
    color: var(--text-white) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 40px; /* Висота самої лінії для вертикального центру */
    display: block;
    transition: 0.2s ease;
}

.secondary-menu-list a:hover {
    background: var(--primary-hover);
    padding: 0 5px;
    margin: 0 -5px;
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
    .divider-content {
        padding: 0 10px;
        overflow-x: auto; /* Дозволяє скролити меню вбік на телефонах */
    }
    
    .secondary-menu-list {
        gap: 15px;
    }
    
    .secondary-menu-list a {
        font-size: 12px;
        white-space: nowrap; /* Щоб пункти не переносилися на новий рядок */
    }
}

/* Базовий список меню */
.secondary-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

/* Пункт з підменю */
.secondary-menu-list li {
    position: relative;
}

/* Випадаюче вікно */
.secondary-menu-list .sub-menu {
    position: absolute;
    top: 100%; /* Одразу під лінією */
    left: 0;
    background: var(--primary-color);
    min-width: 180px;
    display: none; /* Ховаємо */
    list-style: none;
    padding: 5px 0;
    margin: 0;
    z-index: 100;
}

/* Показуємо при наведенні */
.secondary-menu-list li:hover > .sub-menu {
    display: block;
}

/* Посилання всередині підменю */
.secondary-menu-list .sub-menu li a {
    line-height: 1.5;
    padding: 8px 15px;
    font-size: 13px;
    text-transform: none; /* Звичайний текст */
    display: block;
    white-space: nowrap;
}

/* Ховер всередині підменю */
.secondary-menu-list .sub-menu li a:hover {
    background-color: var(--primary-hover);
}

/* Стрілочка (необов'язково, але корисно) */
.menu-item-has-children > a:after {
    content: '▾';
    margin-left: 5px;
}



/* Стилі для спойлера в хедері */
.header-info-spoiler {
    position: relative;
    display: inline-block;
}

.spoiler-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.spoiler-btn .arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* Контент спойлера (ховаємо за замовчуванням) */
.spoiler-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    padding: 15px 0;
    margin-top: 5px;
}

/* Показ при наведенні */
.header-info-spoiler:hover .spoiler-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-info-spoiler:hover .spoiler-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.header-info-spoiler:hover .arrow {
    transform: rotate(180deg);
}

/* Стилі для списку всередині спойлера */
.info-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-nav-list li a {
    display: block;
    padding: 10px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.info-nav-list li a:hover {
    background: var(--bg-warm);
    color: var(--primary-color);
    padding-left: 25px;
}

/* Кошик */
.cart-contents {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 8px 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.cart-contents:hover {
    background: var(--bg-warm);
    border-color: var(--primary-color);
}

.cart-icon {
    font-size: 20px;
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 3px;
}

.cart-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

/* Помаранчева лінія */
.orange-divider {
    height: 40px;
    background: var(--primary-color);
    width: 100%;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.05);
}

/* Адаптивність */
@media (max-width: 1024px) {
    .header-inner { flex-wrap: wrap; gap: 15px; }
    .header-search { order: 3; max-width: 100%; }
    .main-navigation { display: none; } /* Для мобільних зазвичай роблять меню-бургер */
}

/* Архів (Список товарів таблицею) */
.archive-main-container {
    background-color: var(--archive-bg);
    padding: 20px 0 60px 0;
}

.archive-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Кнопки сортування */
.custom-archive-sorting {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sort-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 1px;
}

.sort-buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Це дозволить кнопкам падати на новий рядок */
}

.sort-btn {
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sort-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sort-btn.active {
    background: var(--secondary-color);
    color: var(--text-white);
    border-color: var(--secondary-color);
}

@media (max-width: 380px) {
    .sort-btn {
        flex: 1 1 calc(50% - 10px); /* Кнопки стануть по 2 в ряд на мобільних */
        text-align: center;
    }
}


/* Картка товару (Single) */

/* Глобальні налаштування для сторінки */
.single-product-container {
    background-color: var(--archive-bg); /* Легкий сірий фон для всієї сторінки */
    padding: 20px 0 60px 0;
}

/* Білий блок контенту */
.container.product-white-bg {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Хлібні крихти */
.product-breadcrumbs {
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-muted);
}
.product-breadcrumbs a { color: #3498db; text-decoration: none; }
.product-breadcrumbs a:hover { text-decoration: underline; }

/* Головний макет (Галерея + Інфо) */
.product-main-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

/* ЛІВА КОЛОНКА - Галерея */
.product-gallery {
    flex: 1;
    min-width: 400px;
    position: sticky; /* Липке зображення при скролі */
    top: 20px;
    height: fit-content;
}

.product-gallery img {
    width: 100%;
    height: auto;
	object-fit: contain !important;
    max-height: 550px !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    background: var(--white);
    transition: transform 0.3s ease;
}
.product-gallery img:hover {
    transform: scale(1.02); /* Легкий зум при наведенні */
}


/* ПРАВА КОЛОНКА - Інфо */
.product-summary {
    flex: 1.3;
    display: flex;
    flex-direction: column;
}

/* Заголовок */
.product-title-main {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary-color);
    margin: 0 0 15px 0;
}

/* Мета (Артикул + Наявність) */
.product-meta-top {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    font-size: 14px;
}

.meta-sku {
    color: var(--text-muted);
    background: #f1f3f5;
    padding: 4px 10px;
    border-radius: 4px;
}

.meta-stock {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-stock.in-stock { color: var(--success-color); }
.meta-stock.out-of-stock { color: var(--error-color); }
.woocommerce div.product p.stock { font-size: 1.2em; }

/* Блок Ціни */
.product-price-section {
    margin: 25px 0 35px 0;
    padding: 15px 20px;
    background: var(--bg-warm); /* Дуже легкий теплий фон для виділення зони */
    border-radius: 8px;
    display: inline-block; /* Щоб фон не розтягувався на всю ширину */
    min-width: 250px;
}

.product-price-section .price {
    display: flex;
    flex-direction: column-reverse; /* Стара ціна буде НАД новою */
    gap: 5px;
}

/* Основна ціна (теперішня) */
.product-price-section .amount {
    font-size: 48px; /* Робимо дуже великою */
    font-weight: 900; /* Максимальна жирність */
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
}

/* Символ валюти (грн) */
.product-price-section .woocommerce-Price-currencySymbol {
    font-size: 24px;
    margin-left: 5px;
    color: #666;
    font-weight: 600;
}

/* Якщо є знижка (ins - нова ціна) */
.product-price-section ins {
    text-decoration: none;
}

.product-price-section ins .amount {
    color: var(--error-color); /* Акцентний червоний для ціни зі знижкою */
}

/* Стара ціна (del) */
.product-price-section del {
    font-size: 18px;
    color: var(--price-old);
    font-weight: 500;
    margin-bottom: -5px;
}

.product-price-section del .amount {
    font-size: 20px;
    font-weight: 500;
    color: var(--price-old);
}

/* Додамо підпис "Ціна за одиницю" або статус */
.product-price-section::after {
    content: "Ціна за 1 шт.";
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* Якщо знижки немає, ціна буде стандартного кольору */
/*.price > .amount { 
	color: var(--secondary-color);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}*/

/* Блок дій (Кількість + Кнопка) */
.product-actions-wrapper {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

form.cart {
    display: flex;
    align-items: center;
    gap: 20px;
	margin-bottom: 0 !important;
}

/* Стилізація поля кількості */
.quantity {
    position: relative;
}
.quantity input.qty {
    width: 70px;
    height: 50px;
    text-align: center;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Приховуємо стрілки для Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Приховуємо для Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Кнопка Додати в кошик - Фірмова помаранчева */
.single_add_to_cart_button {
    flex-grow: 1;
    height: 50px;
    background-color: var(--primary-color) !important; /* Наш помаранчевий */
    color: var(--text-white) !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.1s ease !important;
    cursor: pointer;
}

.single_add_to_cart_button:hover {
    background-color: var(--primary-hover) !important; /* Темніший помаранчевий при наведенні */
}
.single_add_to_cart_button:active {
    transform: scale(0.98); /* Ефект натискання */
}

/* Стильний блок доставки */
.delivery-info-card {
    display: flex;
    /*align-items: center;*/
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}
.delivery-info-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.delivery-icon-circle {
    width: 50px;
    height: 50px;
    background: #fff3cd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
	flex-shrink: 0;
}

.delivery-text strong {
    display: block;
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 3px;
}
.delivery-text p,
.delivery-text ul {
    margin: 0;
    font-size: 14px;
}

/* Короткі характеристики */
.short-attributes {
    margin-top: auto; /* Притиснути до низу колонки */
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}
.short-attributes strong { color: var(--secondary-color); }

/* НИЖНІ БЛОКИ (Опис + Схожі) */
.product-details-tabs {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.section-title-modern {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}
/* Помаранчева лінія під заголовком */
.section-title-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.product-full-description {
    font-size: 16px;
    line-height: 1.8;
    color: #506172;
    max-width: 800px; /* Обмеження ширини тексту для читабельності */
}
.product-full-description p { margin-bottom: 20px; }

/* Схожі товари */
.related-products-modern {
    margin-top: 80px;
}

/* АДАПТИВНІСТЬ */
@media (max-width: 992px) {
    .product-main-layout { flex-direction: column; gap: 30px; }
    .product-gallery { min-width: 100%; position: static; }
    .container.product-white-bg { padding: 20px; }
    .product-title-main { font-size: 21px; }
    .product-gallery img:hover { transform: none; }
	.product-price-section .amount { font-size: 28px; }
	.single_add_to_cart_button { height: 40px; font-size: 0.7em !important;}
	.product-gallery img { box-sizing: border-box; }
	.product-actions-wrapper { padding: 10px; }
	.quantity input.qty { height: 35px; }
	.product-price-section { margin: 0px 0 20px 0; }
	.product-details-tabs { margin-top: 30px; padding-top: 10px; }
	}
@media (max-width: 576px) {
    form.cart { 
        flex-direction: row;
        align-items: center;
    }
    .quantity {
        flex: 0 0 80px; /* фіксована ширина */
    }
    .single_add_to_cart_button {
        flex: 1;
        width: auto !important;
    }
}


/* --- СТИЛІЗАЦІЯ СІТКИ ТОВАРІВ --- */

/* 1. Контейнер списку */
.woocommerce ul.products, 
.woocommerce-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important; 
    margin: 30px 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 2. Базова картка товару (Плитка) */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    float: none !important;
    margin: 0 !important;
    padding: 20px !important;    
    width: 25% !important; 
    box-sizing: border-box !important;
    background: var(--white, #fff);
    display: flex;
    flex-direction: column;
    text-align: left;
    
    /* Розділювачі */
    border-right: 1px solid var(--border-light, #eee); 
    border-bottom: 1px solid var(--border-light, #eee);
    border-left: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    transition: all 0.3s ease;
}

/* Ховер ефект */
.woocommerce ul.products li.product:hover {
    background: #f9f9f9;
    z-index: 2;
}

/* --- ЛОГІКА РОЗДІЛЮВАЧІВ (ДЕ ТРЕБА ПРИБРАТИ) --- */

/* Десктоп: 4 в ряд */
@media (min-width: 1025px) {
    .woocommerce ul.products li.product:nth-child(4n) { border-right: none !important; }
    .woocommerce ul.products li.product:nth-last-child(-n+4) { border-bottom: none !important; }
}

/* --- ОФОРМЛЕННЯ ВНУТРІШНІХ ЕЛЕМЕНТІВ --- */

/* Фото товару */
.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: 250px !important; 
    object-fit: contain !important;
    margin-bottom: 15px !important;
    display: block !important;
    transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.03);
}

/* Назва товару */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--secondary-color, #222) !important;
    line-height: 1.3 !important;
    height: 55px; 
    overflow: hidden;
    margin: 10px 0 !important;
    padding: 0 !important;
    text-decoration: none !important; /* Прибираємо підкреслення */
}

.woocommerce ul.products li.product .woocommerce-loop-product__title:hover {
    color: var(--primary-hover, #222) !important;
}

/* Ціна */
.woocommerce ul.products li.product .price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--secondary-color);
    margin-bottom: 15px !important;
    display: block !important;
}

/* Нова ціна (знижка) */
.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: var(--error-color, #e74c3c) !important;
}

/* Кнопка "Купити" */
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    background: var(--primary-color, #ffaa00) !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 13px !important;
    text-align: center;
    border: none !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--secondary-color, #222) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- АДАПТИВНІСТЬ --- */

/* Планшети: 3 в ряд */
@media (max-width: 1024px) {
    .woocommerce ul.products li.product {
        width: 33.333% !important;
        border-right: 1px solid var(--border-light, #eee) !important;
        border-bottom: 1px solid var(--border-light, #eee) !important;
    }
    .woocommerce ul.products li.product:nth-child(3n) { border-right: none !important; }
    .woocommerce ul.products li.product:nth-last-child(-n+3) { border-bottom: none !important; }
}

/* Смартфони: 2 в ряд */
@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        width: 50% !important;
        border-right: 1px solid var(--border-light, #eee) !important;
        border-bottom: 1px solid var(--border-light, #eee) !important;
        padding: 15px !important;
    }
    .woocommerce ul.products li.product:nth-child(2n) { border-right: none !important; }
    .woocommerce ul.products li.product:nth-last-child(-n+2) { border-bottom: none !important; }
	.woocommerce ul.products li.product a img { height: 200px !important }
	.woocommerce ul.products li.product .button { padding: 8px 20px !important; font-size: 12px !important; }
	}
/* Маленькі екрани: 1 в ряд */
@media (max-width: 380px) {
    .woocommerce ul.products li.product {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-light, #eee) !important;
    }
    .woocommerce ul.products li.product:last-child { border-bottom: none !important; }
}

/* Очищення стандартних стилів WooCommerce */
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product .button::after { display: none !important; }

/* кінець стилів сітки товарів */


/* --- СУЧАСНА ПАГІНАЦІЯ (TECH-STYLE) --- */

.woocommerce-pagination {
    margin-top: 60px !important;
    padding: 20px 0 !important;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
	overflow: visible !important;
}

.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    list-style: none !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    gap: 10px; /* Відстань між кнопками */
    border: none !important; /* Прибираємо стандартні рамки вукомерса */
	overflow: visible !important;
}

.woocommerce-pagination ul.page-numbers li {
    border-right: none !important; /* Прибираємо розділювачі */
    margin: 0 !important;
    padding: 0 !important;
}

/* Базовий стиль для кожної кнопки */
.woocommerce-pagination ul.page-numbers li a, 
.woocommerce-pagination ul.page-numbers li span {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px !important;
    background: var(--white) !important;
    color: var(--secondary-color) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Ефект при наведенні */
.woocommerce-pagination ul.page-numbers li a:hover {
    background-color: var(--white) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 170, 0, 0.15);
	position: relative;
    z-index: 10;
}

/* Стиль поточної (активної) сторінки */
.woocommerce-pagination ul.page-numbers li span.current {
    background: var(--secondary-color) !important; /* Темно-синій фон */
    color: var(--text-white) !important;
    border-color: var(--secondary-color) !important;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* Стилізація кнопок "Далі" та "Назад" */
.woocommerce-pagination ul.page-numbers li a.next,
.woocommerce-pagination ul.page-numbers li a.prev {
    background: var(--bg-light) !important;
    font-size: 18px !important; /* Трохи більші стрілки */
}

.woocommerce-pagination ul.page-numbers li a.next:hover,
.woocommerce-pagination ul.page-numbers li a.prev:hover {
    background: var(--primary-color) !important;
    color: var(--text-white) !important;
    border-color: var(--primary-color) !important;
}

/* Адаптивність для мобільних */
@media (max-width: 768px) {
    .woocommerce-pagination ul.page-numbers {
        gap: 5px;
    }
    .woocommerce-pagination ul.page-numbers li a, 
    .woocommerce-pagination ul.page-numbers li span {
        width: 12px;
        height: 35px;
        font-size: 13px !important;
        padding: 0 8px !important;
    }
}

@media (max-width: 480px) {
    .woocommerce-pagination ul.page-numbers {
        gap: 5px;
    }
    .woocommerce-pagination ul.page-numbers li a, 
    .woocommerce-pagination ul.page-numbers li span {
        width: 10px;
        height: 32px;
        font-size: 12px !important;
        padding: 0 7px !important;
    }
}

/* для виведення бренду (таксономія) */ 
.brand-line {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-muted);
	padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.brand-line strong {
    color: var(--secondary-color);
}

.brand-line a {
    color: var(--primary-color); /* Ваш помаранчевий колір */
    text-decoration: none;
    font-weight: 700;
    transition: border-bottom 0.2s;
    border-bottom: 1px solid transparent;
}

.brand-line a:hover {
    border-bottom: 1px solid var(--primary-color);
}

/* Стиль лейбла "Немає в наявності" */
.ts-out-of-stock-label {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--error-color); /* Червоний колір для залучення уваги */
    color: var(--text-white);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    pointer-events: none; /* Щоб лейбл не заважав клікати на товар */
}

/* Контейнер для відносної позиції (якщо ще немає) */
.woocommerce ul.products li.product {
    position: relative;
}

/* Опціонально: робимо фото товару трохи прозорим, якщо його немає */
.woocommerce ul.products li.product.outofstock img {
    opacity: 0.8;
    filter: grayscale(0.5); /* Додає ефект "неактивності" */
    transition: all 0.3s ease;
}

/* При наведенні повертаємо колір, але залишаємо лейбл */
.woocommerce ul.products li.product.outofstock:hover img {
    opacity: 0.8;
    filter: grayscale(0);
}


/* Базовий контейнер для сторінок */
.container.product-white-bg {
    max-width: var(--container-xl);
    margin: 30px auto;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-sizing: border-box;
}

.product-white-bg .entry-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    text-transform: uppercase;    
    border-bottom: 3px solid var(--primary-color); /* Помаранчева полосочка знизу */
    display: inline-block; /* Щоб полоска була по довжині тексту, а не на всю ширину */
}

.product-white-bg .entry-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    clear: both; /* Щоб текст не налізав на заголовок */
}

/* Адаптивність */
@media (max-width: 768px) {
    .container.product-white-bg {
        margin: 15px;
        padding: 20px;
    }
}

/* СТИЛІ ДЛЯ СТОРІНКИ 404 */

.error-404-page {
    text-align: center;
    padding: 60px 20px !important; /* Більше простору для візуального акценту */
}

.error-404-content .entry-title {
    font-size: 48px !important; /* Робимо цифру 404 великою */
    margin-bottom: 20px !important;
}

.error-message {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Кнопка повернення (схожа на ваші кнопки в каталозі) */
.btn-back-home, .btn-to-shop {
    display: inline-block;
    padding: 12px 25px;
    background: var(--secondary-color);
    color: var(--text-white) !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-to-shop {
    background: var(--primary-color); /* Ваш помаранчевий для каталогу */
}

.btn-back-home:hover {
    background: var(--secondary-hover);
}

.btn-to-shop:hover {
    background: #e69900;
}

/* Адаптив для мобільних */
@media (max-width: 480px) {
    .error-actions {
        flex-direction: column;
    }
}


/* --- СТИЛІЗАЦІЯ КНОПКИ ОФОРМЛЕННЯ ЗАМОВЛЕННЯ (WC BLOCKS) --- */

/* Головна кнопка "Оформити замовлення" */
.wc-block-cart__submit, 
.wp-block-woocommerce-proceed-to-checkout-block .checkout-button,
.wc-block-components-checkout-step__container .wc-block-components-button {
    background-color: var(--primary-color) !important; /* Твій помаранчевий */
    color: var(--text-white) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 18px 30px !important; /* Робимо її помітною та великою */
    font-size: 16px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    box-shadow: 0 4px 12px rgba(255, 170, 0, 0.2) !important;
}

/* Ефект при наведенні */
.wc-block-cart__submit:hover, 
.wp-block-woocommerce-proceed-to-checkout-block .checkout-button:hover {
    background-color: var(--primary-hover) !important; /* Темніший помаранчевий */
    box-shadow: 0 6px 15px rgba(255, 170, 0, 0.3) !important;
}

/* Ефект при натисканні */
.wc-block-cart__submit:active, 
.wp-block-woocommerce-proceed-to-checkout-block .checkout-button:active {
    transform: scale(0.98) !important;
}

/* Вирівнювання всього блоку (контейнера) */
.wp-block-woocommerce-proceed-to-checkout-block {
    margin-top: 20px !important;
    padding: 0 !important;
}

/* Стилізація посилань "Повернутися до кошика", якщо вони є */
.wc-block-cart__return-to-shop {
    color: var(--secondary-color) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.wc-block-cart__return-to-shop:hover {
    color: var(--primary-color) !important;
}
/* Якщо це посилання-кнопка в кошику */
a.wc-block-components-button {
    color: var(--text-white) !important;
}


/* --- СТИЛІ ДЛЯ СІТКИ БРЕНДІВ (ШОРТКОД) --- */

.active-brands-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin: 30px 0 !important;
}

/* Базова картка бренду */
.active-brands-grid .brand-item {
    background: var(--white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    flex: 1 1 calc(20% - 15px) !important; /* 5 у ряд */
    min-width: 160px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    overflow: hidden;
    position: relative;
    box-sizing: border-box !important;
}

/* Посилання всередині картки */
.active-brands-grid .brand-item a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px !important;
    text-decoration: none !important;
    height: 100% !important;
}

/* --- ЕФЕКТ ПРИ НАВЕДЕННІ (HOVER) --- */
.active-brands-grid .brand-item:hover {
    border-color: var(--primary-color) !important; /* Ваш фірмовий помаранчевий */
    box-shadow: 0 10px 25px rgba(255, 170, 0, 0.15) !important;
    transform: translateY(-5px) !important; /* Легкий підйом */
    background-color: #fffcf9 !important; /* Ледь помітний відтінок */
}

/* Логотип при наведенні */
.active-brands-grid .brand-item:hover .brand-logo-img {
    filter: grayscale(0) !important; /* Робимо кольоровим */
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* Текст при наведенні */
.active-brands-grid .brand-item:hover .brand-name {
    color: var(--primary-color) !important;
}

/* --- ДОДАТКОВІ ЕЛЕМЕНТИ --- */

.brand-logo-wrapper {
    width: 100% !important;
    height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
}

.brand-logo-img {
    max-width: 90% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    filter: grayscale(1); /* Спочатку сіре */
    opacity: 0.6;
    transition: all 0.4s ease !important;
}

.brand-info {
    text-align: center !important;
}

.brand-name {
    display: block !important;
    font-weight: 800 !important;
    color: var(--secondary-color) !important;
    font-size: 15px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease !important;
}

.brand-count {
    display: block !important;
    font-size: 11px !important;
    color: var(--price-old) !important;
    margin-top: 4px !important;
}

/* Адаптивність */
@media (max-width: 1024px) {
    .active-brands-grid .brand-item { flex: 1 1 calc(33.33% - 15px) !important; }
}
@media (max-width: 480px) {
    .active-brands-grid .brand-item { flex: 1 1 100% !important; }
}


/* СТИЛІ ДЛЯ СІТКИ БРЕНДІВ + товари (ШОРТКОД) */
/* --- СТИЛІ ДЛЯ СІТКИ БРЕНДІВ + ТОВАРИ (ШОРТКОД) --- */

/* 1. Основна сітка та контейнери */
.brands-main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 20px 0;
}

.brand-section-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.brand-section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.brand-products-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; /* Для десктопа залишаємо gap для візуального простору */
    position: relative;
    z-index: 2;
}

/* Елемент товару та розділювачі */
.mini-product-item {
    position: relative;
    border-right: 1px solid #eee; /* Вертикальна лінія */
    padding: 0 10px;
}

.mini-product-item:nth-child(3n), 
.mini-product-item:last-child {
    border-right: none; /* Прибираємо лінію у кожного третього та самого останнього */
}

/* 2. Шапка бренду та кнопка "Всі товари" */
.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.brand-bg-logo {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.view-all-brand {
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-all-brand:hover {
    background: var(--primary-color);
    color: #fff !important;
}

/* 3. Картка товару: Фото, Назва, Ціна */
.mini-product-item img {
    width: 100%;
    height: 110px;
    object-fit: contain;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 4px;
}

.mini-title {
    display: block;
    font-size: 13px;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    color: var(--secondary-color);
    text-decoration: none !important;
    margin-bottom: 6px;
}

.mini-product-item a:hover .mini-title {
    color: var(--primary-color);
}

.mini-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.mini-price {
    font-weight: 800;
    color: #333;
    font-size: 15px;
    line-height: 1;
}

/* 4. Кнопка кошика */
.mini-add-to-cart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    font-size: 16px !important;
    transition: all 0.2s ease;
}

.mini-add-to-cart-btn:hover {
    background-color: var(--secondary-color) !important;
    transform: scale(1.1);
}

.mini-add-to-cart-btn.added_to_cart { display: none !important; }
.mini-add-to-cart-btn.loading { opacity: 0.6; }

/* 5. Глобальне скидання підкреслень */
.mini-product-item a, 
.mini-product-item a:hover, 
.mini-product-item a:focus, 
.mini-product-item a:active {
    text-decoration: none !important;
    outline: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* 6. Адаптивність (Об'єднана) */
@media (max-width: 768px) {
    .brands-main-grid {
        grid-template-columns: 1fr;
    }
    .brand-products-mini-grid {
        gap: 10px;
    }
	.mini-product-item { border-right: 0; padding: 0; }
    .mini-title { font-size: 12px; }
    .mini-price { font-size: 13px; }
	.brand-title { margin: 1px; }
	.brand-section-card { padding: 10px; }
	.brand-header { flex-wrap: wrap; }

    .view-all-brand {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }
}
/* кінець. СТИЛІ ДЛЯ СІТКИ БРЕНДІВ + товари (ШОРТКОД) */


/* --- СТИЛІ ФУТЕРА --- */
.footer-container { max-width: var(--container-xl); margin: 0 auto; padding: 0 15px; }
.site-footer {
    background-color: var(--secondary-color);
    color: #ecf0f1;
    padding: 60px 0 0 0;
    font-size: 14px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column h3 {
    color: var(--text-white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

/* Логотип у футері */
.footer-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-white);
    margin-bottom: 20px;
}
.footer-logo span { color: var(--primary-color); }

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px; /* Легкий ефект руху */
}

/* Нижня панель */
.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-muted);
}

.payment-icons {
    display: flex;
    gap: 15px;
    /*filter: grayscale(1) brightness(1.5); /* Стильно виглядає на темному фоні */
}

/* Адаптивність */
@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr 1fr;
    }
    .footer-bottom-inner {
        justify-content: center;
        text-align: center;
    }
}