/* ==========================================================================
 * CUSTOM.CSS — meble-wysokiej-jakosci.pl
 * Soledad Food specific: header, slider, footer, nav
 *
 * @author  Damian Zieba <biuro@semtak.pl>
 * @link    https://semtak.pl
 * ========================================================================== */

/* --------------------------------------------------------------------------
 * Header — Soledad style: centered logo + slogan + nav bar
 * ----------------------------------------------------------------------- */
.stb-header {
    background: var(--color-bg);
}

.stb-header-main {
    padding: var(--header-padding) 0;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.stb-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stb-logo {
    margin-bottom: 8px;
}

.stb-logo .custom-logo {
    max-width: 420px;
    width: 100%;
    height: auto;
}

.stb-logo-text {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: bold;
    color: var(--color-heading);
    display: block;
}

.stb-logo-text:hover {
    color: var(--color-heading);
}

.stb-header-slogan {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--color-meta);
    font-style: normal;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
 * Navigation Bar — Soledad style
 * ----------------------------------------------------------------------- */
.stb-nav-bar {
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 100;
    background: var(--color-bg);
}

.stb-nav-bar.stb-nav-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0px 1px 5px rgba(190, 190, 190, 0.46);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.stb-nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stb-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.stb-menu li {
    position: relative;
}

.stb-menu li a {
    display: block;
    padding: 0 15px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text);
    line-height: var(--nav-height);
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.stb-menu li a:hover,
.stb-menu li.current-menu-item a,
.stb-menu li.current-menu-ancestor a {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* Dropdown submenu */
.stb-menu li ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    min-width: 200px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 101;
}

.stb-menu li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
}

.stb-menu li ul.sub-menu li a {
    line-height: 1.4;
    padding: 10px 15px;
    font-size: 12px;
    border-bottom: 1px solid var(--color-border);
}

/* Search toggle */
.stb-search-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 10px;
    transition: color 0.3s;
}

.stb-search-toggle:hover {
    color: var(--color-accent);
}

/* Hamburger — mobile */
.stb-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    position: relative;
}

.stb-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-text);
    margin: 4px auto;
    transition: all 0.3s;
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.stb-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --------------------------------------------------------------------------
 * Search Overlay
 * ----------------------------------------------------------------------- */
.stb-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stb-search-overlay[hidden] {
    display: none;
}

.stb-search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: 0 20px;
    position: relative;
}

.stb-search-close {
    position: absolute;
    top: -50px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
}

.stb-search-overlay-input {
    width: 100%;
    padding: 15px 0;
    font-family: var(--font-heading);
    font-size: 24px;
    color: #fff;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    outline: none;
}

.stb-search-overlay-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile overlay */
.stb-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.stb-mobile-overlay[hidden] {
    display: none;
}

/* --------------------------------------------------------------------------
 * Featured Slider — Swiper carousel, 3 slides, portrait (Soledad style-10)
 * ----------------------------------------------------------------------- */
.stb-featured-slider {
    padding: 30px 0 0;
    margin-bottom: 30px;
}

.stb-slider-swiper {
    position: relative;
}

.stb-slide-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 6;
}

.stb-slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.stb-slide-link:hover .stb-slider-img {
    transform: scale(1.03);
}

.stb-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 25px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    text-align: center;
    z-index: 2;
}

.stb-slide-cat {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: var(--color-accent);
    padding: 4px 10px;
    margin-bottom: 10px;
}

.stb-slide-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.stb-slide-date {
    font-family: var(--font-body);
    font-size: 12px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
}

/* Swiper nav arrows — Soledad style (small, subtle) */
.stb-slider-swiper .swiper-button-prev,
.stb-slider-swiper .swiper-button-next {
    color: #fff;
    width: 27px;
    height: 44px;
}

.stb-slider-swiper .swiper-button-prev::after,
.stb-slider-swiper .swiper-button-next::after {
    font-size: 14px;
}

/* --------------------------------------------------------------------------
 * Footer — Soledad Food dark style
 * ----------------------------------------------------------------------- */
.stb-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    text-align: center;
    padding: 40px 0 30px;
}

.stb-footer-social {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-footer-border);
    margin-bottom: 20px;
}

.stb-footer-social a {
    color: var(--color-footer-text);
    transition: color 0.3s;
}

.stb-footer-social a:hover {
    color: #fff;
}

.stb-footer-links {
    margin-bottom: 15px;
}

.stb-footer-links a {
    color: var(--color-footer-text);
    font-size: 13px;
    transition: color 0.3s;
}

.stb-footer-links a:hover {
    color: #fff;
}

.stb-footer-sep {
    margin: 0 10px;
    color: var(--color-footer-border);
}

.stb-footer-copyright {
    font-size: 13px;
    color: var(--color-footer-text);
}

/* --------------------------------------------------------------------------
 * Back to Top — Soledad style
 * ----------------------------------------------------------------------- */
.stb-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-heading);
    color: #fff;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    z-index: 99;
}

.stb-back-to-top:not([hidden]) {
    opacity: 1;
}

.stb-back-to-top:hover {
    background: var(--color-accent);
    color: #fff;
}

/* --------------------------------------------------------------------------
 * RESPONSIVE overrides
 * ----------------------------------------------------------------------- */

/* Tablet: 768-960px */
@media (max-width: 960px) {
    .stb-slide-title {
        font-size: 16px;
    }

    .stb-header-main {
        padding: 25px 0;
    }

    .stb-logo .custom-logo {
        max-width: 300px;
    }
}

/* Mobile: < 768px */
@media (max-width: 767px) {
    .stb-menu-toggle {
        display: block;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .stb-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    .stb-menu.stb-menu-open {
        display: flex;
    }

    .stb-menu li a {
        line-height: 1.4;
        padding: 12px 20px;
        border-bottom: 1px solid var(--color-border);
    }

    .stb-menu li ul.sub-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
    }

    .stb-menu li ul.sub-menu li a {
        padding-left: 35px;
    }

    .stb-slide-title {
        font-size: 14px;
    }

    .stb-header-main {
        padding: 20px 0;
    }

    .stb-logo .custom-logo {
        max-width: 250px;
    }

    .stb-logo-text {
        font-size: 24px;
    }

    .stb-footer-social {
        gap: 20px;
    }
}

/* Small: < 480px */
@media (max-width: 479px) {
    .stb-logo .custom-logo {
        max-width: 200px;
    }

    .stb-logo-text {
        font-size: 20px;
    }

    .stb-slide-title {
        font-size: 13px;
    }

    .stb-slide-overlay {
        padding: 15px 10px;
    }
}
