@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --page-bg: #f3f3f1;
    --surface: #ffffff;
    --text: #1e2024;
    --muted: #686b70;
    --border: #deded9;
    --accent: #c99b16;
    --accent-soft: #fff8df;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
input {
    color: inherit;
    font: inherit;
}

button,
select {
    min-height: 42px;
    border-radius: 5px;
}

.menu {
    position: sticky;
    z-index: 100;
    top: 0;
    width: 100%;
    background: rgba(243, 243, 241, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease;
    backdrop-filter: blur(10px);
}

.menu.out {
    transform: translateY(-100%);
}

.tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(1120px, 100%);
    min-height: 68px;
    margin: 0 auto;
    padding: 12px 20px;
}

.menu-switch {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin-right: 12px;
    padding-right: 20px;
    color: var(--muted);
    border-right: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.menu-switch:hover {
    color: var(--text);
}

.menu-switch:focus-visible,
.btn_raz:focus-visible,
.btn_fas:focus-visible,
.filters:focus-visible,
.tabs_category:focus-visible,
.tabs_fil_menu:focus-visible {
    outline: 3px solid rgba(201, 155, 22, 0.28);
    outline-offset: 2px;
}

.btn_raz,
.btn_fas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 15px;
    background: var(--surface);
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn_raz:hover,
.btn_fas:hover {
    border-color: #c9c9c4;
}

.btn_raz.active,
.btn_fas.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(201, 155, 22, 0.08);
    font-weight: 600;
}

.btn_raz img,
.btn_fas img {
    width: 22px;
    height: 22px;
    margin: 0;
    object-fit: contain;
    flex: 0 0 22px;
}

.tabs_category,
.tabs_fil_menu {
    padding: 8px 34px 8px 12px;
    background: var(--surface);
    border: 1px solid #c9c9c4;
    cursor: pointer;
}

.tabs_category {
    max-width: 220px;
}

.filters {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.filters:hover,
.filters[aria-expanded='true'] {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    text-decoration: none;
}

.filters_menu {
    display: none;
    padding: 0 20px 14px;
    text-align: center;
}

.filters_menu form {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.off {
    display: none !important;
}

.container_beer {
    width: min(1680px, 100%);
    margin: 0 auto;
    padding: 16px 12px 40px;
}

.row {
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.razliv,
.fasov {
    margin-top: 0;
}

.fasov + .fasov {
    margin-top: 24px;
}

.fasov h2 {
    width: 100%;
    margin: 18px 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.card_beer {
    flex: 0 0 calc(33.333% - 6px);
    width: calc(33.333% - 6px);
    min-height: 188px;
    margin: 0;
    padding: 18px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid #e6e6e1;
    border-radius: 6px;
    color: var(--text);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.card_beer:hover {
    color: var(--text);
    border-color: #cecec7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-1px);
}

.card_beer > div > div {
    align-items: flex-start;
}

.card_beer > div > div > img {
    width: 88px;
    height: 88px;
    margin: 0 16px 0 0;
    object-fit: contain;
    flex: 0 0 88px;
}

.desc {
    min-width: 0;
    width: 100%;
}

.brewery {
    margin-bottom: 5px;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.beer {
    margin-bottom: 7px;
    overflow-wrap: anywhere;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.style {
    margin-bottom: 10px;
    color: #4f5257;
    font-size: 14px;
    line-height: 1.4;
}

.abv_ibu {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #3d4045;
    font-size: 13px;
}

.price_vol {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #ecece8;
    font-size: 14px;
}

.price_vol > div:last-child:not(:only-child),
.price_vol > div:only-child > div:last-child {
    font-weight: 600 !important;
}

.separator {
    width: min(300px, 80%);
    height: 1px;
    margin: 7px auto 0;
    background: linear-gradient(90deg, transparent, #bfbfb8, transparent);
}

a.anchor {
    position: relative;
    top: -90px;
    display: block;
    visibility: hidden;
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
        min-height: 0;
        padding: 10px 12px;
    }

    .menu-switch {
        grid-column: 1 / -1;
        min-height: 30px;
        margin: 0;
        padding: 0 2px 7px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        font-size: 13px;
    }

    .menu-switch::before {
        content: '←';
        margin-right: 7px;
    }

    .btn_raz,
    .btn_fas {
        width: 100%;
        min-width: 0;
        padding: 9px 8px;
        font-size: 13px;
        white-space: normal;
    }

    .btn_raz img,
    .btn_fas img {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .tabs_category {
        grid-column: 1 / 2;
        width: 100%;
        max-width: none;
        min-width: 0;
        font-size: 13px;
    }

    .filters {
        grid-column: 2 / 3;
        width: 100%;
        font-size: 13px;
    }

    .filters_menu {
        padding: 0 12px 10px;
    }

    .filters_menu form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tabs_fil_menu {
        width: 100%;
        font-size: 13px;
    }

    .container_beer {
        padding: 10px 7px 28px;
    }

    .row {
        gap: 6px;
    }

    .card_beer {
        flex-basis: 100%;
        width: 100%;
        min-height: 0;
        padding: 13px;
        border-radius: 5px;
    }

    .card_beer > div > div > img {
        width: 68px;
        height: 68px;
        margin-right: 12px;
        flex-basis: 68px;
    }

    .brewery {
        margin-bottom: 3px;
        font-size: 12px;
    }

    .beer {
        margin-bottom: 5px;
        font-size: 17px;
    }

    .style,
    .abv_ibu,
    .price_vol {
        font-size: 12px;
    }

    .price_vol [style*='font-size'] {
        font-size: 14px !important;
    }

    .style {
        margin-bottom: 7px;
    }

    .price_vol {
        margin-top: 9px;
        padding-top: 8px;
    }

    .fasov h2 {
        margin-top: 14px;
        font-size: 17px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .card_beer {
        flex-basis: calc(50% - 4px);
        width: calc(50% - 4px);
    }
}

@media (min-width: 1400px) {
    .card_beer {
        flex-basis: calc(33.333% - 6px);
        width: calc(33.333% - 6px);
    }
}

@media (max-width: 360px) {
    .btn_raz,
    .btn_fas {
        gap: 5px;
        font-size: 12px;
    }

    .card_beer > div > div > img {
        width: 58px;
        height: 58px;
        margin-right: 10px;
        flex-basis: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .menu,
    .card_beer,
    .btn_raz,
    .btn_fas {
        transition: none;
    }
}
