/*
 * Deliberate, documented deviations from the old stylesheet (all.css stays untouched).
 * See docs/differences.md.
 */

/* The old pages declared lang="en", so Cyrillic rendered with the default glyph shapes.
   The new pages declare the real language; keep the familiar shapes by disabling the
   Bulgarian localized forms (locl) of Montserrat. */
html {
    font-feature-settings: "locl" 0;
}

/* WebKit (Safari) ignores the rule above and shapes Cyrillic by the page language; this keeps the
   same glyph shapes there too. Other engines ignore the property. */
html {
    -webkit-locale: "en";
}

/* The header menu stays on one line at every width. The old stylesheet let it wrap into two lines
   and out of its band in two ranges: 769-1000 px (16 px text does not fit) and above ~2100 px (the
   2vw gaps grow while the 8vw offsets shrink the menu). Everywhere else nothing changes. */
@media only screen and (min-width: 769px) and (max-width: 1000px) {
    /* Scales smoothly up to exactly the old 16 px at 1000 px. */
    .header .main-menu > li {
        margin-left: 1.2vw;
    }
    .header .main-menu a {
        font-size: calc(4px + 1.2vw);
    }
}
@media only screen and (min-width: 1921px) {
    /* Frozen at their 1920 px values (2vw and 8vw of 1920). */
    .header .main-menu > li {
        margin-left: 38.4px;
    }
    .inner-page .header .logo {
        margin-left: 153.6px;
    }
    .inner-page .header .nav-bar {
        width: calc(100% - 124px - 153.6px);
    }
}

/* Two faults inherited from the old stylesheet, fixed where they show and nowhere else:
   - in a narrow desktop window (up to 767 px) the closed mobile menu showed through the page,
     because its clipping rule only applied to devices whose screen is that narrow (phones);
   - a long word in a product card (German "PFERDEKAISERDÖRRFLEISCH") ran out of the card and
     scrolled the page sideways at 800-900 px. */
@media only screen and (max-width: 767px) {
    /* 767, not 768: at exactly 768 px the old stylesheet shows the desktop header. */
    .header .nav-bar {
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}
/* The product list never widens the page: a name longer than its card (German
   "PFERDEKAISERDÖRRFLEISCH" at 800-900 px) is cut at the list's edge instead of adding a sideways
   scroll. The cards themselves look exactly as before. */
.products-wrapper {
    overflow-x: clip;
}

