/* The catalogue's icon row and brand strip (inc/catalogue-nav.php). Loaded after style.css. */

/* ---- Icon row: one line, scrolls sideways on a phone ---- */
.barami-catnav {
    margin-top: 36px;
}

.barami-catnav__list {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* the row continues to the left: a soft fade says so */
    -webkit-mask-image: linear-gradient(to left, #000 88%, transparent 100%);
    mask-image: linear-gradient(to left, #000 88%, transparent 100%);
}

.barami-catnav__list::-webkit-scrollbar {
    display: none;
}

.barami-catnav__cell {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.barami-catnav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 78px;
    padding: 8px 2px 10px;
    color: #1A1A1A;
    text-align: center;
    text-decoration: none;
}

.barami-catnav__icon {
    display: block;
    width: 36px;
    height: 36px;
    color: #1A1A1A;
    transition: color .4s ease, transform .4s ease;
}

.barami-catnav__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.barami-catnav__label {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: .6px;
    color: rgba(26, 26, 26, .6);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: color .4s ease, border-color .4s ease;
}

.barami-catnav__item:hover .barami-catnav__icon,
.barami-catnav__item:focus-visible .barami-catnav__icon {
    color: #9C6C2E;
    transform: translateY(-2px);
}

.barami-catnav__item:hover .barami-catnav__label,
.barami-catnav__item:focus-visible .barami-catnav__label {
    color: #1A1A1A;
}

.barami-catnav__item.is-current .barami-catnav__icon {
    color: #9C6C2E;
}

.barami-catnav__item.is-current .barami-catnav__label {
    color: #1A1A1A;
    border-bottom-color: #9C6C2E;
}

@media (min-width: 768px) {
    .barami-catnav {
        margin-top: 48px;
    }

    .barami-catnav__item {
        width: 92px;
    }

    .barami-catnav__icon {
        width: 40px;
        height: 40px;
    }

    .barami-catnav__label {
        font-size: 13px;
    }
}

/* Wide screens: the whole row fits, spread over the width, no fade. */
@media (min-width: 1200px) {
    .barami-catnav__list {
        justify-content: space-between;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .barami-catnav__cell {
        flex: 1 1 0;
        min-width: 0;
    }

    .barami-catnav__item {
        width: auto;
    }
}

/* The brand sub-categories under the row on a category page. */
.barami-catnav + .barami-subcats {
    margin-top: 12px;
}

/* ---- Brand strip under the products ---- */
.barami-brands {
    padding-top: 8px;
    padding-bottom: 80px;
}

.barami-brands__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.barami-brands__all {
    font-size: 13px;
    letter-spacing: 1.958px;
    color: rgba(26, 26, 26, .6);
    border-bottom: 1px solid rgba(26, 26, 26, .25);
    padding-bottom: 2px;
    transition: color .4s ease, border-color .4s ease;
}

.barami-brands__all:hover {
    color: #9C6C2E;
    border-bottom-color: #9C6C2E;
}

.barami-brands__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.barami-brands__cell {
    width: calc((100% - 10px) / 2);
}

.barami-brands__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    height: 92px;
    padding: 12px;
    border: 1px solid #E6E1D8;
    border-radius: 18px;
    background: #fff;
    transition: border-color .4s ease, box-shadow .4s ease;
}

.barami-brands__img {
    display: block;
    width: calc(var(--w) * .8);
    height: calc(var(--h) * .8);
    max-width: 100%;
    object-fit: contain;
    /* Every logo in the maker's own colours at rest (owner, 2026-11-14): no grey filter, no fading. */
    flex: none;
}

.barami-brands__name {
    font-size: 18px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #1A1A1A;
}

/* "Exclusive representative in Israel" under the logos of the brands Barami represents exclusively. */
.barami-brands__excl {
    display: block;
    flex: none;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
    color: #6B645A;
}

.barami-brands__item:hover,
.barami-brands__item:focus-visible {
    border-color: #9C6C2E;
    box-shadow: 0 6px 24px rgba(26, 26, 26, .06);
}

.barami-brands__item:hover .barami-brands__excl,
.barami-brands__item:focus-visible .barami-brands__excl {
    color: #8A5F28;
}

@media (min-width: 768px) {
    .barami-brands {
        padding-bottom: 112px;
    }

    .barami-brands__head {
        margin-bottom: 32px;
    }

    .barami-brands__list {
        gap: 16px;
    }

    .barami-brands__cell {
        width: calc((100% - 48px) / 4);
    }

    .barami-brands__item {
        height: 116px;
    }

    .barami-brands__img {
        width: var(--w);
        height: var(--h);
    }

    .barami-brands__name {
        font-size: 22px;
    }

    .barami-brands__excl {
        font-size: 12px;
    }
}

@media (min-width: 1200px) {
    .barami-brands__cell {
        width: calc((100% - 80px) / 6);
    }
}

/* ---- The page's own text, moved under the products (owner, 2026-11-14) ---- */
/* Room under the text, only where a text is printed (a category without text leaves no gap). */
section.barami-listing-text,
div.barami-listing-text:has(> section) {
    padding-bottom: 80px;
}

/* The brand strip above already leaves room. */
.barami-listing-text > section:first-child {
    padding-top: 0;
}

@media (min-width: 768px) {
    section.barami-listing-text,
    div.barami-listing-text:has(> section) {
        padding-bottom: 112px;
    }
}
