/* Bafleh public-site consolidation. Loaded after legacy bafleh-site.css. */
:root {
    --bafleh-gold: #a77b25;
    --bafleh-gold-soft: #f5ead1;
    --bafleh-ink: #171717;
    --bafleh-line: #e7e0d5;
    --bafleh-focus: #b8862d;
}

.bafleh-public-body {
    min-width: 320px;
    overflow-x: hidden;
}

.new-bafleh-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 1px 0 rgba(17, 17, 17, .08);
}

.new-bafleh-header-inner {
    min-height: 84px;
    width: min(100% - 48px, 1640px);
    grid-template-columns: 220px minmax(0, 1fr) auto;
    gap: 26px;
}

.new-bafleh-logo img {
    width: 190px;
    max-height: 58px;
}

.new-bafleh-nav {
    min-width: 0;
}

.new-bafleh-menu {
    justify-content: center;
    gap: clamp(8px, 1.5vw, 24px);
}

.new-bafleh-menu > li {
    position: relative;
    list-style: none;
}

.new-bafleh-menu > li > a,
.new-bafleh-menu > li > button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 5px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--bafleh-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.new-bafleh-menu > li > a:hover,
.new-bafleh-menu > li > button:hover,
.new-bafleh-menu > li.is-open > button {
    color: var(--bafleh-gold);
    border-bottom-color: var(--bafleh-gold);
}

.new-bafleh-menu > li > button svg {
    width: 16px;
    height: 16px;
    transition: transform .16s ease;
}

.new-bafleh-menu > li.is-open > button svg {
    transform: rotate(180deg);
}

.new-menu-dropdown-panel {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    width: 235px;
    padding: 8px;
    transform: translateX(-50%);
    border: 1px solid var(--bafleh-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(17, 17, 17, .15);
    z-index: 550;
}

.new-menu-dropdown.is-open .new-menu-dropdown-panel {
    display: block;
}

.new-menu-dropdown-panel a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 9px;
    color: #2d2a26;
    font-size: 13px;
    font-weight: 650;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}

.new-menu-dropdown-panel a:hover {
    color: #765314;
    background: var(--bafleh-gold-soft);
}

.new-bafleh-shop-link {
    margin-left: 0;
}

.new-bafleh-shop-link a {
    min-height: 42px !important;
    padding: 0 16px !important;
    border: 1px solid #1f1f1f !important;
    border-radius: 999px;
    color: #fff !important;
    background: #1f1f1f;
    font-size: 13px !important;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.new-bafleh-shop-link a:hover {
    border-color: var(--bafleh-gold) !important;
    background: var(--bafleh-gold);
}

.new-bafleh-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.new-header-icon-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e4ded4;
    border-radius: 50%;
    background: #fff;
    color: #292622;
    cursor: pointer;
    text-decoration: none;
}

.new-header-icon-button:hover {
    color: #765314;
    border-color: #d3b575;
    background: #fffaf0;
}

.new-header-icon-button svg {
    width: 20px;
    height: 20px;
}

.new-mobile-menu-button {
    width: 42px;
    height: 42px;
    border: 1px solid #e4ded4;
    border-radius: 50%;
    background: #fff;
}

.header-search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 540;
    padding: 17px 24px;
    background: rgba(255, 255, 255, .99);
    border-top: 1px solid #eee8df;
    border-bottom: 1px solid #ddd4c7;
    box-shadow: 0 16px 38px rgba(17, 17, 17, .10);
}

.search-panel-form {
    width: min(960px, 100%);
    margin: 0 auto;
}

.search-panel-form input {
    border-radius: 10px;
    font-size: 15px;
}

.search-panel-form button {
    border-radius: 10px;
    cursor: pointer;
}

.site-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.bafleh-system-links {
    min-height: 31px;
    padding: 6px max(24px, calc((100vw - 1640px) / 2));
    align-items: center;
}

.new-bafleh-header a:focus-visible,
.new-bafleh-header button:focus-visible,
.bafleh-public-body main a:focus-visible,
.bafleh-public-body main button:focus-visible,
.bafleh-public-body input:focus-visible,
.bafleh-public-body select:focus-visible,
.bafleh-public-body textarea:focus-visible {
    outline: 3px solid var(--bafleh-focus);
    outline-offset: 3px;
}

.image-fallback-active {
    object-fit: contain !important;
    padding: 12px;
    background: #faf7ef !important;
}

.live-product-card,
.product-card,
.product-detail-live-grid,
.enquiry-panel,
.filter-panel {
    min-width: 0;
}

.live-product-hover a,
.live-add-cart,
.new-home-cta,
.btn {
    text-align: center;
}

@media (hover: hover) and (pointer: fine) {
    .new-menu-dropdown:hover .new-menu-dropdown-panel {
        display: block;
    }
}

@media (max-width: 1220px) {
    .new-bafleh-header-inner {
        width: min(100% - 30px, 1640px);
        grid-template-columns: 190px minmax(0, 1fr) auto;
        gap: 15px;
    }

    .new-bafleh-logo img { width: 174px; }
    .new-bafleh-menu { gap: 7px; }
    .new-bafleh-menu > li > a,
    .new-bafleh-menu > li > button { font-size: 12px; }
}

@media (max-width: 900px) {
    .new-bafleh-header-inner {
        min-height: 74px;
        grid-template-columns: 1fr auto;
        width: min(100% - 24px, 1640px);
    }

    .new-bafleh-logo img {
        width: 166px;
    }

    .new-bafleh-tools {
        grid-column: 2;
        grid-row: 1;
    }

    .new-mobile-menu-button {
        display: block;
    }

    .new-bafleh-nav {
        display: none;
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        padding: 8px 0 14px;
        border-top: 1px solid #eee8df;
    }

    .new-bafleh-nav.is-open {
        display: block;
    }

    .new-bafleh-menu,
    .new-bafleh-menu.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .new-bafleh-menu > li > a,
    .new-bafleh-menu > li > button {
        width: 100%;
        min-height: 46px;
        justify-content: space-between;
        padding: 10px 12px;
        border: 0;
        border-radius: 9px;
        font-size: 13px;
        text-align: left;
    }

    .new-bafleh-menu > li > a:hover,
    .new-bafleh-menu > li > button:hover,
    .new-bafleh-menu > li.is-open > button {
        background: #f8f3e9;
    }

    .new-menu-dropdown-panel {
        position: static;
        width: auto;
        margin: 2px 0 7px 14px;
        transform: none;
        box-shadow: none;
        border-radius: 10px;
        background: #fcfaf6;
    }

    .new-bafleh-shop-link a {
        justify-content: center !important;
        margin-top: 5px;
    }

    .header-search-panel {
        padding: 14px 12px;
    }

    .bafleh-system-links {
        justify-content: center;
        padding-left: 12px;
        padding-right: 12px;
    }

    .new-home-panel {
        min-height: calc(100svh - 105px);
    }
}

@media (max-width: 560px) {
    .new-header-icon-button[href] {
        display: none;
    }

    .new-bafleh-logo img {
        width: 150px;
    }

    .new-home-panel-content {
        width: calc(100% - 22px);
        padding: 24px 20px;
    }

    .search-panel-form {
        grid-template-columns: 1fr 1fr;
    }

    .search-panel-form input {
        grid-column: 1 / -1;
    }
}
