@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap");

:root {
    color-scheme: light;
    font-family:
        "Cairo",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    color: #171722;
    background: #fff;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}
button:focus-visible {
    outline: 2px solid #8c631b;
    outline-offset: -3px;
    border-radius: 5px;
}

.menu {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background: #fff;
}

header {
    max-width: 520px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px clamp(12px, 3.5vw, 20px) 16px;
    text-align: center;
}
.restaurant-logo {
    display: block;
    width: clamp(72px, 18vw, 96px);
    height: clamp(72px, 18vw, 96px);
    object-fit: contain;
}
h1 {
    margin: 0;
    font-size: clamp(19px, 5vw, 24px);
    font-weight: 700;
    line-height: 1.4;
}
nav {
    display: flex;
    max-width: 520px;
    margin-inline: auto;
    padding-inline: clamp(12px, 3.5vw, 20px);
    border-bottom: 1px solid #dad8de;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
nav button {
    flex: 1 0 auto;
    position: relative;
    min-height: 57px;
    padding: 0 12px;
    font-size: clamp(14px, 3.6vw, 16px);
    white-space: nowrap;
}
nav button:last-child {
    flex: 1.45 0 auto;
}
nav button[aria-pressed="true"] {
    font-weight: 700;
    color: #805a16;
}
nav button[aria-pressed="true"]::after {
    position: absolute;
    content: "";
    height: 4px;
    inset: auto 7% -1px;
    border-radius: 6px 6px 0 0;
    background: #9c711f;
}

#dishes {
    display: grid;
    max-width: 520px;
    margin-inline: auto;
    gap: 16px;
    padding: clamp(26px, 8vw, 43px) clamp(12px, 3.5vw, 20px) 28px;
}
.category-dishes {
    display: grid;
    gap: 16px;
}
.category-dishes[hidden] {
    display: none;
}
.dish {
    display: flex;
    justify-content: space-between;
    gap: clamp(10px, 3vw, 16px);
    background: #f8f7fb;
    border: 1px solid #eeedf2;
    border-radius: 16px;
    padding: clamp(12px, 3.5vw, 16px);
    box-shadow: 0 2px 4px #1b12200e;
}
.dish > div {
    flex: 1;
    min-width: 0;
}
.dish h2 {
    margin: 4px 0 0;
    font-size: clamp(15px, 4.1vw, 21px);
    line-height: 1.45;
}
.price {
    margin: 16px 0 0;
    font-size: clamp(17px, 4.5vw, 22px);
    font-weight: 700;
}
.photo {
    display: block;
    width: clamp(88px, 30%, 132px);
    flex: 0 0 clamp(88px, 30%, 132px);
    aspect-ratio: 1.2;
    object-fit: cover;
    border-radius: 11px;
    align-self: start;
}
.photo[data-image-viewer-trigger] {
    cursor: zoom-in;
}
.photo:focus-visible {
    outline: 3px solid #9c711f;
    outline-offset: 3px;
}
.image-viewer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: clamp(16px, 5vw, 48px);
    border: 0;
    background: transparent;
    overflow: hidden;
}
.image-viewer:not([open]) {
    display: none;
}
.image-viewer::backdrop {
    background: rgb(12 10 14 / 90%);
}
.image-viewer__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}
.image-viewer__close {
    position: absolute;
    inset-block-start: max(12px, env(safe-area-inset-top));
    inset-inline-end: max(12px, env(safe-area-inset-left));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgb(255 255 255 / 55%);
    border-radius: 50%;
    color: #fff;
    background: rgb(20 18 22 / 72%);
    font-size: 30px;
    line-height: 1;
    z-index: 1;
}
.image-viewer__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.placeholder {
    display: grid;
    place-items: center;
    color: #b9b8bf;
    background: #eeedf1;
}
.placeholder svg {
    width: 35%;
    max-width: 40px;
}
.empty {
    margin: 12px 0;
    text-align: center;
    color: #5e5868;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    max-width: 520px;
    margin: 0 auto;
    padding: 1rem 1rem 1.5rem;
    color: #6c6872;
    font-size: 0.82rem;
    text-align: center;
}

.site-footer a {
    color: #4267b2;
    text-decoration: none;
}

.developer-credit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.developer-credit__icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    text-decoration: underline;
}
