/*
Theme Name: Favorit 98 Block Theme
Author: Favorit 98
Description: Clean Full Site Editing (Block Theme) matching favorit98.com 1:1 without Elementor.
Version: 1.0.3
Text Domain: favorit98-block
*/

body {
    background-color: #eded9a;
    color: #000000;
    margin: 0;
}

.favorit-header, .favorit-footer {
    background-color: #f9b62f;
    color: #000000;
}

.favorit-footer {
    padding: 12px 24px;
}

.favorit-footer a {
    color: #333333;
}

/* Full-size header logo */
.favorit-header .wp-block-site-logo img {
    width: 185px !important;
    max-height: 70px !important;
    object-fit: contain !important;
    display: block;
}

/* Equal-size square navigation tabs — ONLY active page is green */
.favorit-header .wp-block-navigation__container {
    gap: 0 !important;
}

.favorit-header .wp-block-navigation-item__content {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    height: 44px !important;
    padding: 0 14px !important;
    background-color: transparent !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 0 !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.favorit-header .wp-block-navigation-item__content:hover {
    background-color: rgba(59, 209, 33, 0.35) !important;
    text-decoration: none !important;
}

.favorit-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.favorit-header .wp-block-navigation-item[aria-current="page"] > .wp-block-navigation-item__content {
    background-color: #3bd121 !important;
    color: #000000 !important;
}

/* Hide extra WooCommerce header account/cart icons */
.favorit-header .wc-block-customer-account,
.favorit-header .wc-block-mini-cart {
    display: none !important;
}

/* Center "ДОБРЕ ДОШЛИ" inside the top banner */
.wp-block-cover.alignfull {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.wp-block-cover__inner-container {
    width: auto !important;
    margin: 0 auto !important;
    text-align: center !important;
}

.favorit-hero-badge {
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 35px;
    padding: 6px 32px !important;
    display: inline-block;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 2px;
    text-shadow: 4px 4px 2px rgba(0, 0, 0, 0.25);
    margin: 0 auto !important;
}

/* White shadowed cards for За Нас, Технология, Контакти */
.favorit-card {
    background-color: #ffffff;
    border: 1px solid #000000;
    border-radius: 5px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    padding: 16px 22px;
    margin-bottom: 20px;
}

/* Full-width 5-bread slideshow */
.favorit-slider {
    position: relative;
    width: 100%;
    height: 42vh;
    min-height: 240px;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #000000;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.5);
}
.favorit-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: favoritFade 25s infinite;
}
.favorit-slider img:nth-child(1) { animation-delay: 0s; }
.favorit-slider img:nth-child(2) { animation-delay: 5s; }
.favorit-slider img:nth-child(3) { animation-delay: 10s; }
.favorit-slider img:nth-child(4) { animation-delay: 15s; }
.favorit-slider img:nth-child(5) { animation-delay: 20s; }

@keyframes favoritFade {
    0%   { opacity: 0; transform: scale(1); }
    4%   { opacity: 1; }
    20%  { opacity: 1; }
    24%  { opacity: 0; transform: scale(1.05); }
    100% { opacity: 0; }
}

/* WooCommerce 4-column product cards 1:1 match */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
@media (max-width: 900px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}
.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    background-color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5) !important;
    padding: 10px !important;
    text-align: center !important;
    transition: background-color 0.25s ease;
}
.woocommerce ul.products li.product:hover {
    background-color: #D2FBD7 !important;
}
.woocommerce ul.products li.product img {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
}
.woocommerce ul.products li.product h2 {
    font-size: 16px !important;
    line-height: 2.5ex !important;
    height: 5ex !important;
    overflow: hidden !important;
    color: #000000 !important;
    margin: 8px 0 !important;
}

.favorit-header .wp-block-navigation-item.current-menu-item > a,
.favorit-header .wp-block-navigation-item__content[aria-current="page"] {
    background-color: #3bd121 !important;
    color: #000000 !important;
}

/* Remove default gap between header, main banner, and footer */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > * + * {
    margin-block-start: 0 !important;
    margin-top: 0 !important;
}

/* Match search bar height (44px) to navigation buttons + gray Storefront search button */
.favorit-header .wp-block-search__inside-wrapper {
    height: 44px !important;
    padding: 0 !important;
    border: 1px solid #999999 !important;
    border-radius: 3px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
}

.favorit-header .wp-block-search__input {
    height: 42px !important;
    padding: 0 10px !important;
    border: none !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.favorit-header .wp-block-search__button {
    height: 42px !important;
    width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #eeeeee !important;
    color: #333333 !important;
    border: none !important;
    border-left: 1px solid #cccccc !important;
    border-radius: 0 2px 2px 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.favorit-header .wp-block-search__button:hover {
    background-color: #dddddd !important;
}

.favorit-header .wp-block-search__button svg {
    fill: #333333 !important;
}

/* Make logo fill full header height without expanding header bar */
.favorit-header .wp-block-site-logo {
    margin: -6px 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}

.favorit-header .wp-block-site-logo img {
    height: 56px !important;
    width: auto !important;
    max-height: 56px !important;
    object-fit: contain !important;
}

/* Make header inner row span 100% full screen width */
.favorit-header > .alignwide {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 1. Rounded corners on header search bar */
.favorit-header .wp-block-search__inside-wrapper {
    border-radius: 6px !important;
    overflow: hidden !important;
}

.favorit-header .wp-block-search__button {
    border-radius: 0 5px 5px 0 !important;
}

/* 2. Compact, cleanly spaced WooCommerce product cards (Homepage + Shop) */
.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 26px !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 10px 0 !important;
    box-sizing: border-box !important;
}

@media (max-width: 960px) {
    .woocommerce ul.products,
    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 18px !important;
    }
}

.woocommerce ul.products li.product,
ul.products li.product {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 255px !important;
    margin: 0 auto !important;
    float: none !important;
    background-color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 6px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.45) !important;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: center !important;
}

.woocommerce ul.products li.product img,
ul.products li.product img {
    width: 100% !important;
    height: 175px !important;
    object-fit: contain !important;
    margin-bottom: 8px !important;
    border-radius: 4px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product h2 {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    height: 2.6em !important;
    overflow: hidden !important;
    margin: 6px 0 !important;
    color: #000000 !important;
}

/* 1. Move Категории box down so its top border aligns with Product Cards Row 1 */
@media (min-width: 782px) {
    .wp-block-column > .favorit-sidebar.favorit-card {
        margin-top: 152px !important;
    }
}

/* 2. Start first product card flush-left directly below "Начало / Продукти" with clean 22px gaps */
.post-type-archive-product .woocommerce ul.products,
.tax-product_cat .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 245px)) !important;
    justify-content: start !important;
    gap: 22px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.post-type-archive-product .woocommerce ul.products li.product,
.tax-product_cat .woocommerce ul.products li.product {
    margin: 0 !important;
    max-width: 245px !important;
    width: 100% !important;
}

/* 1. Keep left Категории sidebar at a steady 210px width (never squished/elongated) */
@media (min-width: 921px) {
    .post-type-archive-product .wp-block-columns,
    .tax-product_cat .wp-block-columns {
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 32px !important;
    }
    .post-type-archive-product .wp-block-columns > .wp-block-column:first-child,
    .tax-product_cat .wp-block-columns > .wp-block-column:first-child {
        flex: 0 0 210px !important;
        width: 210px !important;
        max-width: 210px !important;
    }
    .post-type-archive-product .wp-block-columns > .wp-block-column:last-child,
    .tax-product_cat .wp-block-columns > .wp-block-column:last-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .wp-block-column > .favorit-sidebar.favorit-card {
        margin-top: 152px !important;
    }
}

/* Stack sidebar cleanly above products below 920px before any text wraps */
@media (max-width: 920px) {
    .post-type-archive-product .wp-block-columns,
    .tax-product_cat .wp-block-columns {
        flex-wrap: wrap !important;
    }
    .post-type-archive-product .wp-block-columns > .wp-block-column,
    .tax-product_cat .wp-block-columns > .wp-block-column {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .wp-block-column > .favorit-sidebar.favorit-card {
        margin-top: 0 !important;
    }
}

/* 2. Anchor product cards flush-left on ALL screen widths (fullscreen to mobile) */
.post-type-archive-product .woocommerce,
.tax-product_cat .woocommerce {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.post-type-archive-product .woocommerce ul.products,
.tax-product_cat .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.post-type-archive-product .woocommerce ul.products li.product,
.tax-product_cat .woocommerce ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 1150px) {
    .post-type-archive-product .woocommerce ul.products,
    .tax-product_cat .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 680px) {
    .post-type-archive-product .woocommerce ul.products,
    .tax-product_cat .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Fixed-size product cards (230px) with 12px gap — reflow rows without size morphing */
.post-type-archive-product .woocommerce ul.products,
.tax-product_cat .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 230px) !important;
    justify-content: start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.post-type-archive-product .woocommerce ul.products li.product,
.tax-product_cat .woocommerce ul.products li.product {
    width: 230px !important;
    max-width: 230px !important;
    min-width: 230px !important;
    margin: 0 !important;
}

@media (max-width: 540px) {
    .post-type-archive-product .woocommerce ul.products,
    .tax-product_cat .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
    .post-type-archive-product .woocommerce ul.products li.product,
    .tax-product_cat .woocommerce ul.products li.product {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* Lock product cards at 220px width with 12px gaps — zero size morphing at any window size */
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products,
body.woocommerce-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.post-type-archive-product .woocommerce ul.products li.product,
body.tax-product_cat .woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product {
    flex: 0 0 220px !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

/* 1. Move Категории back up to top of left column + snug compact card height */
@media (min-width: 921px) {
    .wp-block-column > .favorit-sidebar.favorit-card {
        margin-top: 0 !important;
        padding: 12px 16px !important;
    }
}

/* 2. Remove the large "Продукти" H1 heading and tighten spacing above product cards */
.post-type-archive-product .woocommerce-products-header,
.tax-product_cat .woocommerce-products-header {
    display: none !important;
}

.post-type-archive-product .woocommerce-breadcrumb,
.tax-product_cat .woocommerce-breadcrumb {
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
}

.post-type-archive-product .woocommerce-ordering,
.post-type-archive-product .woocommerce-result-count,
.tax-product_cat .woocommerce-ordering,
.tax-product_cat .woocommerce-result-count {
    margin: 0 14px 12px 0 !important;
    float: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.post-type-archive-product .woocommerce ul.products,
.tax-product_cat .woocommerce ul.products {
    margin-top: 4px !important;
    clear: both !important;
}

/* Full-width 3-zone footer matching header width */
.favorit-footer {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.favorit-footer-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 16px !important;
}

.favorit-footer-left {
    justify-self: start !important;
    margin: 0 !important;
}

.favorit-footer-center {
    justify-self: center !important;
    text-align: center !important;
    margin: 0 !important;
}

.favorit-footer-right {
    justify-self: end !important;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .favorit-footer-inner {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 10px !important;
    }
    .favorit-footer-left,
    .favorit-footer-center,
    .favorit-footer-right {
        justify-self: center !important;
    }
}

/* Технология 2x2 individual photo blocks (no outer white box, stacks 1-by-1 on mobile) */
.favorit-tech-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 17px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important;
}

.favorit-tech-gallery .wp-block-image {
    width: 100% !important;
    margin: 0 !important;
    background: transparent !important;
}

.favorit-tech-gallery .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.45) !important;
}

@media (max-width: 768px) {
    .favorit-tech-gallery {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* Align left & right edges of text card and 2x2 photo gallery pixel-for-pixel */
.favorit-card,
.favorit-tech-gallery,
figure.wp-block-gallery.favorit-tech-gallery {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Контакти map & standalone factory photo (no thick white outer frame) */
.favorit-map-wrap,
.favorit-contact-img {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
    background: transparent !important;
}

.favorit-contact-img img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Native Contact Form styling matching live site */
.favorit-contact-form p {
    margin: 0 0 12px 0 !important;
}
.favorit-contact-form label {
    font-weight: 600;
    font-size: 14px;
    display: block;
}
.favorit-contact-form input,
.favorit-contact-form textarea {
    width: 100% !important;
    padding: 8px 10px !important;
    margin-top: 4px !important;
    border: 1px solid #666666 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}
.favorit-contact-form button[type="submit"] {
    background-color: #019816 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    padding: 10px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}
.favorit-contact-form button[type="submit"]:hover {
    background-color: #3bd121 !important;
    color: #000000 !important;
}

/* 1. Sticky footer at bottom of viewport on short pages */
.wp-site-blocks {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

body.logged-in.admin-bar .wp-site-blocks {
    min-height: calc(100vh - 32px) !important;
}

.wp-site-blocks > main {
    flex: 1 0 auto !important;
}

.wp-site-blocks > footer,
.favorit-footer {
    margin-top: auto !important;
}


/* Clean equal-width 2x2 grid on Контакти (page-id-617) with auto-stretching top row */
@media (min-width: 782px) {
    .page-id-617 .wp-block-columns {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .page-id-617 .wp-block-column {
        display: contents !important;
    }
    .page-id-617 .wp-block-column:first-child > *:first-child {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 315px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    .page-id-617 .wp-block-column:last-child > *:first-child {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 315px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .page-id-617 .favorit-map-wrap iframe {
        width: 100% !important;
        height: 100% !important;
        min-height: 315px !important;
    }
    .page-id-617 .wp-block-column:first-child > *:last-child {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        height: 390px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .page-id-617 .wp-block-column:last-child > *:last-child {
        grid-column: 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
        height: 390px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .page-id-617 .favorit-contact-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

.favorit-header .wc-block-customer-account,
.favorit-header .wp-block-woocommerce-customer-account,
.favorit-header [data-block-name="woocommerce/customer-account"],
.favorit-header a[href*="my-account"] {
    display: none !important;
}

.favorit-about-img {
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.favorit-about-img img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border: none !important;
}

/* 1. Folder icons, flush-left alignment, and right-aligned counts in Категории sidebar */
.favorit-sidebar .wc-block-product-categories-list,
.favorit-sidebar ul.wc-block-product-categories-list {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.favorit-sidebar ul li {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
}

.favorit-sidebar ul li::before {
    content: "📁";
    font-size: 15px;
    line-height: 1;
}

.favorit-sidebar .wc-block-product-categories-list-item-count,
.favorit-sidebar ul li > span:last-child {
    margin-left: auto !important;
    text-align: right !important;
    font-variant-numeric: tabular-nums !important;
}

/* 2. Match 6px rounded corners of the search bar on the BG language switcher button */
.favorit-lang-inline .gt_float_switcher,
.favorit-lang-inline .gt_float_switcher .gt-selected {
    border-radius: 6px !important;
}

/* Add clean spacing above WooCommerce pagination buttons on Продукти */
.woocommerce nav.woocommerce-pagination,
.woocommerce-pagination {
    margin-top: 16px !important;
    clear: both !important;
}

/* Keep header bar compact height when BG language dropdown opens */
.favorit-lang-inline .gt_float_switcher {
    position: relative !important;
    height: 44px !important;
    overflow: visible !important;
}

.favorit-lang-inline .gt_float_switcher .gt_options {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    bottom: auto !important;
    left: 0 !important;
    width: max-content !important;
    min-width: 145px !important;
    z-index: 100000 !important;
    margin: 0 !important;
}

/* Solid white rounded card background for the floating BG language dropdown list */
.favorit-lang-inline .gt_float_switcher .gt_options {
    background-color: #ffffff !important;
    border: 1px solid #999999 !important;
    border-radius: 6px !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25) !important;
    padding: 4px 0 !important;
}

.favorit-lang-inline .gt_float_switcher .gt_options a {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.favorit-lang-inline .gt_float_switcher .gt_options a:hover {
    background-color: #f2f2f2 !important;
}

/* Match exact 44px height & horizontal alignment between BG button and search bar */
.favorit-header-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.favorit-lang-inline,
.favorit-lang-inline .gt_float_switcher,
.favorit-header-right .wp-block-search,
.favorit-header-right .wp-block-search__inside-wrapper {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}

.favorit-lang-inline .gt_float_switcher .gt-selected {
    height: 100% !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

/* Single Product Page: White cards for product photo, nutrition summary, and description panel */
.single-product div.product div.images.woocommerce-product-gallery,
.single-product div.product div.summary.entry-summary {
    background-color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5) !important;
    padding: 20px 24px !important;
    box-sizing: border-box !important;
}

/* Nutrition table row gridlines & clean spacing */
.single-product div.product div.summary table {
    width: 100% !important;
    max-width: 520px !important;
    border-collapse: collapse !important;
    margin: 12px 0 16px 0 !important;
}

.single-product div.product div.summary table th,
.single-product div.product div.summary table td {
    padding: 7px 10px !important;
    border-bottom: 1px solid #dcdcdc !important;
    text-align: left !important;
}

.single-product div.product div.summary table td:last-child,
.single-product div.product div.summary table th:last-child {
    text-align: right !important;
}

/* White card for Описание / Допълнителна информация tab content */
.single-product div.product .woocommerce-tabs .panel {
    background-color: #ffffff !important;
    border: 1px solid #000000 !important;
    border-radius: 0 5px 5px 5px !important;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5) !important;
    padding: 20px 24px !important;
    margin-top: -1px !important;
}

.single-product div.product .woocommerce-tabs ul.tabs {
    margin-bottom: 0 !important;
    padding-left: 0 !important;
}

.single-product div.product .woocommerce-tabs ul.tabs li {
    border: 1px solid #000000 !important;
    border-bottom: none !important;
    border-radius: 5px 5px 0 0 !important;
    background-color: #e8e8e8 !important;
}

.single-product div.product .woocommerce-tabs ul.tabs li.active {
    background-color: #ffffff !important;
    border-bottom: 1px solid #ffffff !important;
}

/* Mobile polish (<= 600px): keep BG arrow inline + 2 full-width product cards per row */
@media (max-width: 600px) {
    /* 1. Keep flag, "BG", and arrow on one crisp horizontal line */
    .favorit-lang-inline,
    .favorit-lang-inline .gt_float_switcher,
    .favorit-lang-inline .gt_float_switcher .gt-selected,
    .favorit-lang-inline .gt_float_switcher .gt-selected a {
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0 !important;
        width: auto !important;
    }

    /* 2. Arrange Продукти cards in a full-width 2-column grid on phone screens */
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.woocommerce-page ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    body.post-type-archive-product .woocommerce ul.products li.product,
    body.tax-product_cat .woocommerce ul.products li.product,
    body.woocommerce-page ul.products li.product {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 10px !important;
        box-sizing: border-box !important;
    }

    body.post-type-archive-product .woocommerce ul.products li.product img,
    body.tax-product_cat .woocommerce ul.products li.product img {
        height: 120px !important;
    }
}
