/* WPBakery Sytem Header Footer */

/* Hide theme header/footer when enabled
   v1.0.1: supports classic themes, Porto and WordPress block themes.
   Block themes usually render their header/footer as .wp-block-template-part
   inside .wp-site-blocks, not as .site-header.
*/
body.wbshf-hide-theme-header #header:not(.wbshf-header),
body.wbshf-hide-theme-header .header-wrapper:not(.wbshf-header),
body.wbshf-hide-theme-header .site-header:not(.wbshf-header),
body.wbshf-hide-theme-header header#masthead:not(.wbshf-header),
body.wbshf-hide-theme-header .porto-header:not(.wbshf-header),
body.wbshf-hide-theme-header .wp-site-blocks > header:not(.wbshf-header),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-template-part:first-child:has(header):not(.wbshf-footer),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-template-part:first-child:has(nav):not(.wbshf-footer),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-template-part:first-child:has(.wp-block-site-title):not(.wbshf-footer),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-template-part:first-child:has(.wp-block-navigation):not(.wbshf-footer),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-group:first-child:has(nav),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-group:first-child:has(.wp-block-site-title),
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-group:first-child:has(.wp-block-navigation) {
    display: none !important;
}

body.wbshf-hide-theme-footer #footer:not(.wbshf-footer),
body.wbshf-hide-theme-footer .footer-wrapper:not(.wbshf-footer),
body.wbshf-hide-theme-footer .site-footer:not(.wbshf-footer),
body.wbshf-hide-theme-footer footer#colophon:not(.wbshf-footer),
body.wbshf-hide-theme-footer .wp-site-blocks > footer:not(.wbshf-footer),
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-template-part:last-child:has(footer):not(.wbshf-header),
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-template-part:last-child:has(nav):not(.wbshf-header),
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-template-part:last-child:has(.wp-block-site-title):not(.wbshf-header),
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-template-part:last-child:has(.wp-block-navigation):not(.wbshf-header),
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-group:last-child:has(.wp-block-site-title) {
    display: none !important;
}

/* JS fallback adds these classes when the theme structure is unusual. */
body.wbshf-hide-theme-header .wbshf-theme-header-hidden,
body.wbshf-hide-theme-footer .wbshf-theme-footer-hidden {
    display: none !important;
}

.wbshf-header,
.wbshf-header *,
.wbshf-footer,
.wbshf-footer * {
    box-sizing: border-box;
}

.wbshf-inner {
    width: calc(100% - 96px);
    max-width: var(--wbshf-max, 1180px);
    margin: 0 auto;
}

/* Header */
.wbshf-header {
    width: 100%;
    position: relative;
    z-index: 9990;
    color: var(--wbshf-header-text, #333333);
    font-family: inherit;
}

.wbshf-header-top {
    background: var(--wbshf-header-top-bg, #f5f5f5);
    padding: var(--wbshf-top-pad, 22px) 0 18px;
}

.wbshf-header-top-inner {
    min-height: 165px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

.wbshf-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.wbshf-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.wbshf-logo a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--wbshf-header-text, #333333);
}

.wbshf-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--wbshf-logo-w, 230px);
    max-height: var(--wbshf-logo-h, 140px);
    object-fit: contain;
}

.wbshf-site-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.wbshf-social {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
}

.wbshf-header .wbshf-social {
    justify-content: flex-end;
    gap: 10px;
}

.wbshf-social a {
    width: 34px;
    height: 34px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-radius: 50%;
    color: var(--wbshf-header-text, #333333);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.wbshf-social a:hover {
    color: #ffffff;
    background: var(--wbshf-accent, var(--cps-green, #009900));
}

.wbshf-menu-wrap {
    width: 100%;
    background: var(--wbshf-header-menu-bg, #f5f5f5);
    border-bottom: 1px solid #eeeeee;
    transition: box-shadow 0.18s ease, background 0.18s ease;
}

.wbshf-menu-inner {
    min-height: 58px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wbshf-nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wbshf-menu,
.wbshf-menu ul,
.wbshf-mobile-menu,
.wbshf-mobile-menu ul,
.wbshf-footer-menu,
.wbshf-footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wbshf-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--wbshf-menu-gap, 26px);
}

.wbshf-menu > li {
    position: relative;
}

.wbshf-menu a {
    color: var(--wbshf-header-text, #333333);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
}

.wbshf-menu > li > a {
    display: block;
    padding: 16px 16px;
}

.wbshf-menu a:hover,
.wbshf-menu > li.current-menu-item > a,
.wbshf-menu > li.current-menu-ancestor > a {
    color: var(--wbshf-accent, var(--cps-green, #009900));
}

.wbshf-menu li ul {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 9999;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.wbshf-menu li:hover > ul,
.wbshf-menu li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wbshf-menu li ul a {
    display: block;
    padding: 11px 15px;
    font-size: 14px;
}

.wbshf-toggle {
    display: none;
    width: 44px;
    height: 38px;
    border: 0;
    background: var(--wbshf-accent, var(--cps-green, #009900));
    border-radius: 3px;
    padding: 8px 11px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.wbshf-toggle span:not(.screen-reader-text) {
    display: block;
    height: 2px;
    width: 100%;
    background: #ffffff;
    border-radius: 2px;
}

.wbshf-mobile-panel {
    display: none;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
}

.wbshf-mobile-panel.is-open {
    display: block;
}

.wbshf-mobile-panel nav {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding: 12px 0;
}

.wbshf-mobile-menu li {
    border-bottom: 1px solid #eeeeee;
}

.wbshf-mobile-menu a {
    display: block;
    color: var(--wbshf-header-text, #333333);
    text-decoration: none;
    padding: 12px 0;
    font-size: 16px;
}

.wbshf-mobile-menu ul {
    padding-left: 18px;
}

/* Sticky menu on scroll */
body.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 9991;
    background: var(--wbshf-header-sticky-bg, #ffffff);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

body.admin-bar.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
    top: 32px;
}

body.wbshf-header-enabled.wbshf-scrolled {
    padding-top: 58px;
}

body.wbshf-header-enabled.wbshf-scrolled .wbshf-header-top {
    margin-bottom: 58px;
}

/* Footer */
.wbshf-footer {
    width: 100%;
    background: var(--wbshf-footer-bg, #000000);
    color: var(--wbshf-footer-text, #cfcfcf);
    font-family: inherit;
    margin-top: 0;
}

.wbshf-footer-main {
    padding: 72px 0 78px;
    background: var(--wbshf-footer-bg, #000000);
}

.wbshf-footer-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr 1fr 1fr 1.35fr;
    gap: 54px;
    align-items: start;
}

.wbshf-footer-logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 28px;
    color: var(--wbshf-footer-heading, #ffffff);
    text-decoration: none;
}

.wbshf-footer-logo img {
    display: block;
    max-width: 180px;
    max-height: 84px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.wbshf-footer .wbshf-site-title {
    color: var(--wbshf-footer-heading, #ffffff);
    font-size: 34px;
}

.wbshf-footer-contact {
    margin-bottom: 26px;
}

.wbshf-footer-contact p {
    color: var(--wbshf-footer-text, #cfcfcf);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 10px;
}

.wbshf-footer .wbshf-social a {
    background: transparent;
    border: 0;
    color: var(--wbshf-footer-link, #cfcfcf);
    width: auto;
    height: auto;
    border-radius: 0;
    font-size: 20px;
}

.wbshf-footer .wbshf-social a:hover {
    color: var(--wbshf-footer-link-hover, #ffffff);
    background: transparent;
}

.wbshf-footer-col h3 {
    margin: 0 0 24px;
    color: var(--wbshf-footer-heading, #ffffff);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.wbshf-footer-menu li {
    margin: 0 0 13px;
}

.wbshf-footer-menu a {
    color: var(--wbshf-footer-link, #cfcfcf);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.35;
}

.wbshf-footer-menu a:hover {
    color: var(--wbshf-footer-link-hover, #ffffff);
}

.wbshf-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wbshf-payments span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #ffffff;
    color: #111111;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.wbshf-footer-bottom {
    background: var(--wbshf-footer-bottom-bg, #0a0a0a);
    color: var(--wbshf-footer-text, #cfcfcf);
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
    line-height: 1.5;
}

.wbshf-header .screen-reader-text,
.wbshf-footer .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
}

@media (max-width: 1199px) {
    .wbshf-footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .wbshf-inner {
        width: calc(100% - 28px);
    }

    .wbshf-header-top {
        padding: 14px 0;
    }

    .wbshf-header-top-inner {
        min-height: 86px;
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }

    .wbshf-logo img {
        max-width: min(var(--wbshf-logo-w, 230px), 180px);
        max-height: 76px;
    }

    .wbshf-header .wbshf-social {
        display: none;
    }

    .wbshf-menu-inner {
        min-height: 54px;
        justify-content: flex-start;
    }

    .wbshf-toggle {
        display: inline-flex;
    }

    .wbshf-nav {
        display: none;
    }

    body.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
        position: sticky;
        top: 0;
    }

    body.admin-bar.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
        top: 46px;
    }

    body.wbshf-header-enabled.wbshf-scrolled,
    body.wbshf-header-enabled.wbshf-scrolled .wbshf-header-top {
        padding-top: 0;
        margin-bottom: 0;
    }

    .wbshf-footer-main {
        padding: 48px 0 52px;
    }

    .wbshf-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 34px;
    }
}

@media (max-width: 782px) {
    body.admin-bar.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
        top: 46px;
    }
}

@media (max-width: 600px) {
    body.admin-bar.wbshf-header-enabled.wbshf-scrolled .wbshf-menu-wrap {
        top: 0;
    }

    .wbshf-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .wbshf-footer-main {
        padding: 38px 0 42px;
    }
}

/* Hide default WordPress homepage title generated by block/classic themes.
   This removes the visible "Home" title so the search/coupon content sits closer to the standalone header.
*/
body.wbshf-hide-front-page-title.home h1.wp-block-post-title,
body.wbshf-hide-front-page-title.front-page h1.wp-block-post-title,
body.wbshf-hide-front-page-title.home .entry-title,
body.wbshf-hide-front-page-title.front-page .entry-title,
body.wbshf-hide-front-page-title.home .page-title,
body.wbshf-hide-front-page-title.front-page .page-title {
    display: none !important;
}

/* Reduce the empty top gap that block themes often leave around the hidden title. */
body.wbshf-hide-front-page-title.home main,
body.wbshf-hide-front-page-title.front-page main {
    margin-top: 0 !important;
}

body.wbshf-hide-front-page-title.home .wp-site-blocks > main > .wp-block-group:first-child,
body.wbshf-hide-front-page-title.front-page .wp-site-blocks > main > .wp-block-group:first-child {
    padding-top: 18px !important;
}


body.wbshf-hide-front-page-title .wbshf-default-home-title-hidden { display: none !important; }

/* Header fallback moved by JS when a custom template does not fire wp_body_open(). */
.wbshf-header.wbshf-footer-fallback {
    display: block !important;
}

/* WBSHF THEME SEPARATOR CLEANUP - v1.1.1
   Purpose:
   - Remove leftover separators/borders from default/block themes around the standalone WBSHF header/footer.
   - Keep the scope limited to top-level theme wrappers and JS-marked separator nodes.
   - Do not style coupon/store content, cards, filters, popup, or any .cps-* layout.
*/
.wbshf-header,
.wbshf-footer {
    clear: both;
}

.wbshf-header {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none;
}

.wbshf-footer {
    position: relative;
    z-index: 10;
    border: 0 !important;
    outline: 0 !important;
}

/* Theme wrappers sometimes leave a border on top/bottom of the main content
   after their own header/footer is hidden. Limit this to direct top-level wrappers. */
body.wbshf-hide-theme-header .wp-site-blocks > main,
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-group:first-child,
body.wbshf-hide-theme-header main.site-main,
body.wbshf-hide-theme-header #primary,
body.wbshf-hide-theme-header #content {
    border-top: 0 !important;
    box-shadow: none;
}

body.wbshf-hide-theme-footer .wp-site-blocks > main,
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-group:last-child,
body.wbshf-hide-theme-footer main.site-main,
body.wbshf-hide-theme-footer #primary,
body.wbshf-hide-theme-footer #content {
    border-bottom: 0 !important;
}

/* Remove only top-level separator blocks that commonly remain after hiding a block-theme header/footer. */
body.wbshf-hide-theme-header .wp-site-blocks > hr.wp-block-separator:first-child,
body.wbshf-hide-theme-header .wp-site-blocks > .wp-block-separator:first-child,
body.wbshf-hide-theme-header main > hr.wp-block-separator:first-child,
body.wbshf-hide-theme-header main > .wp-block-separator:first-child,
body.wbshf-hide-theme-footer .wp-site-blocks > hr.wp-block-separator:last-child,
body.wbshf-hide-theme-footer .wp-site-blocks > .wp-block-separator:last-child,
body.wbshf-hide-theme-footer main > hr.wp-block-separator:last-child,
body.wbshf-hide-theme-footer main > .wp-block-separator:last-child {
    display: none !important;
}

/* JS marks visual separator lines only when they are physically close to the WBSHF header/footer. */
body.wbshf-hide-theme-header .wbshf-theme-separator-hidden,
body.wbshf-hide-theme-footer .wbshf-theme-separator-hidden {
    display: none !important;
}

/* WBSHF FLOATING SCROLL BUTTONS - v1.1.3
   Global UI utility owned by Header/Footer plugin.
   Applies across all frontend pages and all viewport sizes.
   Scoped only to .wbshf-scroll-* classes. */
.wbshf-scroll-buttons {
    position: fixed !important;
    right: max(14px, env(safe-area-inset-right)) !important;
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    z-index: 2147483000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    pointer-events: none !important;
}

.wbshf-scroll-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--wbshf-accent, var(--cps-green, #009900)) !important;
    color: #ffffff !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    cursor: pointer !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(6px) !important;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease, background 0.18s ease !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: transparent !important;
}

.wbshf-scroll-btn:hover,
.wbshf-scroll-btn:focus {
    background: var(--wbshf-accent-dark, var(--cps-green-dark, #007f00)) !important;
    color: #ffffff !important;
    outline: none !important;
}

body.wbshf-scroll-show-up .wbshf-scroll-up,
body.wbshf-scroll-show-down .wbshf-scroll-down {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Mobile/tablet: keep the control available on every device, but make it compact and safe-area aware. */
@media (max-width: 767px) {
    .wbshf-scroll-buttons {
        right: max(10px, env(safe-area-inset-right)) !important;
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
        gap: 7px !important;
    }

    .wbshf-scroll-btn {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 6px !important;
        font-size: 22px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .wbshf-scroll-buttons {
        right: max(14px, env(safe-area-inset-right)) !important;
        bottom: calc(22px + env(safe-area-inset-bottom)) !important;
    }
}
