p:empty {
    display: none;
}

p:blank {
    display: none;
}

/* Heading */

.title-underlined h2,
.related.products h2.ct-module-title {
    position: relative;
    padding-bottom: 12px;
}

.title-underlined h2::after,
.related.products h2.ct-module-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 78px;
    height: 2px;
    background-color: #dca951;
}

.title-underlined-center h2 {
    position: relative;
    padding-bottom: 20px;
    text-align: center;
}

.title-underlined-center h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 78px;
    height: 2px;
    background-color: #dca951;
}

/* end: Heading */

/* Hero */

.ct-hero-section--no-title {
    background: rgba(252, 248, 246, 1);
    /* border: 1px solid red; */
}

/* end: Hero */

/* Breadcrumbs */

.ct-breadcrumbs {
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    color: #552832 !important;
    padding: 30px 0;
}

.ct-breadcrumbs nav,
.ct-breadcrumbs nav a {
    color: #999999 !important;
}

.ct-breadcrumbs nav a {
    display: inline-block !important;
    margin: 0 10px !important;
}

.ct-breadcrumbs nav a:first-child {
    margin-left: 0 !important;
}

.ct-breadcrumbs nav .current-crumb {
    color: #552832 !important;
    margin-left: 10px !important;
    display: inline-block !important;
}

/* end: Breadcrumbs */

/* Lang Switcher */

.header-lang-switcher {
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 14px;
    /* Adjust text size to match menu */
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Base style for both languages */
.header-lang-switcher .lang-item {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Active language color (Dark brownish gold) */
.header-lang-switcher span.lang-item.active {
    color: #8C6D47;
    /* Replace with your exact logo gold hex code */
    pointer-events: none;
}

/* Inactive language link color (Muted gray) */
.header-lang-switcher a.lang-item {
    color: #a0a0a0;
}

/* Inactive hover state */
.header-lang-switcher a.lang-item:hover {
    color: #8C6D47;
}

/* The separator line styling */
.header-lang-switcher .lang-sep {
    color: #d1d1d1;
    margin: 0 6px;
    font-weight: 300;
}

/* end: Lang Switcher */

/* Catalog Pages */

/* Базовий контейнер для меню підкатегорій */
.subcategory-global-wrapper {
    width: 100% !important;
    display: block !important;
    background: rgba(252, 248, 246, 1);
}

/* Наш новий флекс-контейнер для сайдбару та товарів */
.custom-archive-flex-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Забороняємо перенос рядків для десктопа */
    gap: 45px !important;
    align-items: flex-start !important;
    width: 100% !important;
}

/* Налаштування сайдбару (Фільтри) */
.custom-archive-flex-wrapper aside#sidebar,
.custom-archive-flex-wrapper .ct-sidebar,
.custom-archive-flex-wrapper aside {
    flex: 0 0 280px !important;
    /* Строго фіксована ширина */
    width: 280px !important;
    display: block !important;
}

/* Якщо сайдбар повністю порожній або прихований плагіном — ховаємо його і звільняємо місце */
.custom-archive-flex-wrapper aside#sidebar:empty,
.custom-archive-flex-wrapper aside:empty {
    display: none !important;
    flex: 0 !important;
    width: 0 !important;
}

/* Права зона з товарами */
.custom-archive-flex-wrapper .custom-products-zone {
    flex: 1 !important;
    /* Займає весь вільний простір */
    display: block !important;
    width: 100% !important;
}

.custom-archive-flex-wrapper aside#sidebar~.custom-products-zone ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

.custom-archive-flex-wrapper .custom-products-zone ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
}

/* Адаптивність для планшетів та мобільних телефонів */
@media (max-width: 999px) {
    .custom-archive-flex-wrapper {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 30px !important;
    }

    .custom-archive-flex-wrapper aside#sidebar,
    .custom-archive-flex-wrapper .custom-products-zone {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .custom-archive-flex-wrapper .custom-products-zone ul.products,
    .custom-archive-flex-wrapper aside#sidebar~.custom-products-zone ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 575px) {

    .custom-archive-flex-wrapper .custom-products-zone ul.products,
    .custom-archive-flex-wrapper aside#sidebar~.custom-products-zone ul.products {
        grid-template-columns: 1fr !important;
    }
}

.detailed-description-fullwidth-container {
    margin-top: 40px;
    margin-bottom: 20px;
}

.term-description.term-description-bottom {
    padding: 60px 0;
    background: rgba(251, 249, 248, 1);
}

.ct-container.custom-archive-layout-container {
    margin-bottom: 60px;
}

.ct-pagination {
    margin: 0;
    /* padding-bottom: 40px; */
}

/* Product Card */

[data-products] .product {
    border: 1px solid #f3dfd8;
    border-radius: 4px;
}

/* [data-products] .product figure {
    margin-bottom: 15px;
} */

[data-products] .woocommerce-loop-product__title {
    font-size: 16px;
    line-height: 1.3;
    padding: 16px 18px;
}

[data-products] .woocommerce-loop-product__title a {
    font-size: 16px;
    color: #000000;
}

[data-products] .ct-woo-card-actions {
    padding: 0 18px 16px 18px;
}

[data-products] .button.product_type_simple {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    background: none;
    border: none;
    border-radius: 0;
    color: #8d3735;
    padding: 0;
    margin: 0;
}

.woocommerce a.button.product_type_simple::after {
    font-size: 20px;
    content: "→";
    margin-left: 8px;
    margin-top: -2px;
    transition: transform .2s ease;
}

.woocommerce a.button:hover::after {
    transform: translateX(3px);
}

/* end: Product Card */

/* end: Catalog Pages */

/* Sidebar WC */

.wc-block-product-filters__overlay-content {
    background: rgba(255, 250, 250, 1);
    border: 1px solid #f6f1f1;
    /* border: 1px solid red; */
    border-radius: 4px;
    gap: 0;
}

.wp-block-woocommerce-product-filter-attribute {
    padding: 25px;
    border-bottom: 1px solid #f6f1f1;
    /* border-bottom: 1px solid red; */
}

.wc-block-product-filters__overlay-content .wp-block-woocommerce-product-filter-attribute:last-of-type {
    border-bottom: none;
}

.filters-title {
    font-family: 'Playfair Display', Sans-Serif;
    font-size: 20px;
    color: #552832;
    margin: 0;
}

.filter-toggle-content {
    padding-top: 12px;
}

/* Батьківський контейнер заголовка */
.filter-toggle-header {
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

/* Обертка для SVG — жорстко ізолюємо від стилів теми */
.filter-chevron-svg {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* Фіксуємо розміри контейнера під іконку (наприклад, 24х24 для зручного кліку) */
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0 !important;

    /* Скидаємо бордери, які тема накладала на блоки .stk-block */
    border: none !important;
    border-style: none !important;
    border-width: 0 !important;
    background: none !important;

    /* Анімація обертання */
    transition: transform 0.2s ease !important;
}

/* Стилізуємо сам тег svg всередині */
.filter-chevron-svg svg {
    display: block !important;
    /* Дозволяємо svg зайняти свій рідний розмір, вказаний в атрибутах width/height */
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Стан, коли фільтр ЗАКРИТИЙ — розвертаємо іконку (наприклад, на 180 градусів) */
.filter-toggle-header.is-closed .filter-chevron-svg {
    transform: rotate(180deg) !important;
}

/* fix first p tag WC sidebar */

.ct-sidebar>.ct-widget.widget_block>p:first-child {
    display: none;
}

/* end: Sidebar WC*/

/* Pagination */

[data-pagination="simple"]>div .page-numbers {
    flex: 0 0 50px;
    width: 50px;
    border-radius: 50%;
    background: rgba(85, 40, 50, 0);
}

[data-pagination="simple"]>div .page-numbers:hover {
    color: #552832;
    border-color: rgba(85, 40, 50, 1) !important;
}

[data-pagination="simple"] .page-numbers:not(.dots):hover {
    color: #552832;
}

[data-pagination="simple"] .page-numbers.current {
    border-color: rgba(85, 40, 50, 1);
    background: rgba(85, 40, 50, 1) !important;
}

[data-pagination="simple"] a.prev.page-numbers,
[data-pagination="simple"] a.next.page-numbers {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: none;
}

[data-pagination="simple"] a.page-numbers svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
}


/* end: Pagination */


/* Product Card Page */

h1.product_title.entry-title {
    line-height: 1.3;
    margin-bottom: 15px !important;
}

@media (min-width: 1000px) {
    .product-entry-wrapper {
        display: flex;
        gap: 30px;
    }

    .product-entry-wrapper>.woocommerce-product-gallery {
        margin-right: 0 !important;
    }

    .product-entry-wrapper>.summary {
        margin-left: 0 !important;
    }
}

.woocommerce-product-details__short-description {
    font-size: 16px;
    color: #999999;
    margin-bottom: 30px !important;
}

.woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0;
}

/* end: Product Card Page */

/* Last News */

/* .last-news-card-placeholder {
    aspect-ratio: 4/3;
}

.last-news-card-placeholder img {
    border-bottom-color: #f4e3dd;
    border-bottom-width: 1px;
    width: 100%;
    height: 100%;
    object-fit: cover;
} */

/* Примусова сітка на 4 колонки (якщо тема не ділить їх сама) */
.home-news-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    width: 100%;
}

/* Копіюємо поведінку Blocksy Boxed картки для головної сторінки */
.home-news-grid .entry-card {
    background-color: #ffffff !important;
    border: 1px solid #f4e3dd;
    border-radius: 4px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0px 12px 18px -6px rgba(34, 56, 101, 0.04);
}

/* Коригуємо вивід медіа (картинок та заглушок) */
.home-news-grid .entry-card .ct-media-container,
.home-news-grid .entry-card>img.wp-post-image {
    margin: calc(20px * -1) calc(20px * -1) 20px calc(20px * -1) !important;
    width: calc(100% + (20px * 2)) !important;
    max-width: none !important;
    border-radius: 4px 4px 0 0 !important;
    object-fit: cover !important;
    border-bottom: 1px solid #f4e3dd;
}

/* Стиль для заголовків на головній */
.home-news-grid .entry-title, 
.entry-title {
    font-family: 'Inter', Sans-Serif;
    font-size: 20px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 0 20px 0 !important;
}

.home-news-grid .entry-title a {
    color: inherit;
    text-decoration: none !important;
}

.home-news-grid .entry-title a:hover {
    color: #dca951;
}

.entry-meta {
    margin-bottom: 10px !important;
}

.ct-meta-element-date {
    font-size: 14px;
    font-weight: 400;
    color: #8c8c8c;
}

/* Вирівнювання кнопки до низу картки */
.home-news-grid .entry-button {
    margin-top: auto !important;
    align-self: flex-start !important;
    /* якщо кнопка має бути зліва, а не на всю ширину */
}

/* Адаптивність під мобільні пристрої */
@media (max-width: 991px) {
    .home-news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

@media (max-width: 600px) {
    .home-news-grid {
        grid-template-columns: 1fr !important;
    }
}

[data-cards="boxed"] .entry-card, 
[data-cards="cover"] .entry-card {
  padding: 20px !important;
  border: 1px solid #f4e3dd !important;
  border-radius: 4px !important;
}

.entry-card .boundless-image:first-child {
    margin-top: calc(20px * -1) !important;
}

.entry-card .boundless-image {
    width: calc(100% + 20px * 2) !important;
    margin-inline: calc(20px * -1) !important;
    border-bottom: 1px solid #f4e3dd;
}

.entry-button.wp-element-button.ct-button {
    font-size: 16px;
    padding: 0;
    border-radius: 0;
    min-height: auto;
    background: none;
    color: #8d3735;
}

.ct-button-arrow {
    display: inline-flex;
    margin-top: -3px;
}

/* end: Last News */

/* CTA */

.lime-cta-banner > .stk-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 30px;
}

@media (max-width: 799px) {
    .lime-cta-banner > .stk-row {
        flex-direction: column;
    }
}

/* Ліва колонка (текст та заголовок) */
.lime-cta-banner > .stk-row > .wp-block-stackable-column:first-child {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0;
}

/* Права колонка (кнопка) */
.lime-cta-banner > .stk-row > .wp-block-stackable-column:last-child {
    flex: 0 0 auto !important;
    width: auto !important;
    white-space: nowrap !important;
}

.lime-cta-btn a {
    white-space: nowrap;
    padding: 25px 35px;
}

/* end: CTA */

/* Footer */

/* #footer {
    margin-top: 60px;
} */

[data-footer*="type-1"] .ct-footer [data-row*="middle"]>div {
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr !important;
}

/* 2. Екрани менше 1200px (Планшети ландшафт / Ноутбуки) */
@media (max-width: 1199px) {
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 40px 20px !important;
    }
    
    /* Перший елемент (Логотип + опис) переносимо на окремий рядок зверху */
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div > *:first-child {
        grid-column: 1 / -1 !important; /* Розтягуємо на всі 4 колонки */
        max-width: 600px; /* Обмежуємо ширину тексту, щоб він не розповзався */
        margin-bottom: 20px;
    }
}

/* 3. Екрани менше 992px (Планшети портрет) */
@media (max-width: 991px) {
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        grid-template-columns: repeat(2, 1fr) !important; /* Перетворюємо на 2 колонки */
        gap: 30px !important;
    }
    
    /* Блок підписки (останній елемент) робимо ширшим, якщо потрібно, або залишаємо в сітці 2х2 */
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div > *:last-child {
        /* grid-column: span 2 !important; -> розкоментуйте, якщо форма підписки має бути на всю ширину */
    }
}

/* 4. Екрани менше 686px (Мобільні телефони) */
@media (max-width: 689px) {
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div {
        grid-template-columns: 1fr !important; /* Строго одна колонка */
        text-align: center !important; /* Центруємо текст для зручності на телефонах */
        gap: 35px !important;
    }
    
    /* Вирівнюємо іконки контактів по центру на мобільних */
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] .ct-contacts-block {
        justify-content: center !important;
    }
    
    [data-footer*="type-1"] .ct-footer [data-row*="middle"] > div > *:first-child {
        margin: 0 auto 10px auto;
    }
}

.footer-contact-link a {
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
}

/* Subcribe Form */

.footer-subscribe-form form.es_subscription_form.es_subscription_form {
    border-radius: 0 !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-subscribe-form form.es_subscription_form.es_subscription_form label {
    font-size: 0 !important;
    margin: 0 !important;
}

.footer-subscribe-form form.es_subscription_form.es_subscription_form input {
    margin: 0 !important;
    padding: 15px 20px !important;
    min-height: 50px !important;
}

.footer-subscribe-form form.es_subscription_form.es_subscription_form input::placeholder,
.footer-subscribe-form form.es_subscription_form.es_subscription_form textarea::placeholder {
    color: #999999 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    font-style: normal !important;
}

.footer-subscribe-form form.es_subscription_form.es_subscription_form input:focus::placeholder,
.footer-subscribe-form form.es_subscription_form.es_subscription_form textarea:focus::placeholder {
    color: #cccccc !important;
    transition: color 0.2s ease;
}

.footer-subscribe-form form.es_subscription_form.es_subscription_form .es-subscribe-btn.es-custom-button {
    border-radius: 4px !important;
    min-height: auto !important;
    height: auto !important;
    line-height: 1.1 !important;
    padding: 15px 25px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
}

.es_subscription_message.success {
    background: #008000;
    border-color: #008000;
    font-size: 16px;
    color: #ffffff;
}

/* end: Subcribe Form */

/* end: Footer */