/* ============================================================
   TISKNE.cz — site stylesheet
   Tiskárna Tiskne.cz, Domažlice. Design system: /DESIGN.md
   BEM, mobile-first. Sections:
    1 Fonts  2 Tokens  3 Base  4 A11y utilities  5 Layout
    6 Buttons & links  7 Header & nav  8 Hero  9 Home sections
   10 Product tiles & crop marks  11 Inner pages  12 Components
   13 Footer  14 Back-to-top & lightbox  15 Motion guard
   ============================================================ */

/* ---------- 1. Fonts: Montserrat variable, self-hosted (OFL) ---------- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/montserrat-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../assets/fonts/montserrat-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* metric-matched Arial so the swap does not reflow the page */
@font-face {
    font-family: 'Montserrat Fallback';
    src: local('Arial');
    size-adjust: 112.8%;
    ascent-override: 85.8%;
    descent-override: 22.3%;
    line-gap-override: 0%;
}

/* ---------- 2. Design tokens ---------- */
:root {
    /* Brand: process magenta from the logo. Contrast ratios on #FFF in DESIGN.md */
    --color-brand:        #E5097F;  /* logo magenta: fills, rules, marks. Never small text (4.49:1) */
    --color-brand-dark:   #B70765;  /* hover/pressed fill, white text 6.5:1 */
    --color-brand-light:  #FCE4F0;  /* magenta tint: hover wash, badges */
    --color-brand-fill:   #D6087A;  /* button fill behind white text, 5.03:1 */
    --color-brand-text:   #C8076F;  /* magenta text and links on paper, 5.65:1 */
    --color-yellow:       #FFED00;  /* process yellow: highlight on ink, focus on dark */
    --color-cyan:         #00A0E3;  /* process cyan: decoration only (2.94:1) */
    --color-ink:          #2B2A29;  /* text, 14.3:1 */
    --color-ink-soft:     #4A4948;  /* secondary text, 9:1 */
    --color-muted:        #6B6A67;  /* metadata, 5.4:1 (4.97 on paper) */
    --color-line:         #E6E4E1;  /* hairlines, card borders (decorative) */
    --color-line-strong:  #8A8885;  /* input borders, 3.5:1 */
    --color-surface:      #F7F5F2;  /* paper: tinted section and panel ground */
    --color-surface-2:    #FFFFFF;  /* sheet: page ground */
    --color-footer:       #2B2A29;
    --color-footer-link:  #C9C7C4;  /* 8.5:1 on ink */

    /* Status (text colour on white / on its tint) */
    --color-success:      #1F7A4D;  --color-success-bg: #E8F4EC;  /* 5.3 / 4.7 */
    --color-warning:      #8A5300;  --color-warning-bg: #FFF6D6;  /* 6.3 / 5.9 */
    --color-error:        #B42318;  --color-error-bg:   #FDECEA;  /* 6.6 / 5.8 */
    --color-info:         #00739F;  --color-info-bg:    #E5F4FB;  /* 5.3 / 4.7 */

    /* Typography: one family, fluid scale (~1.25 ratio) */
    --font-sans: 'Montserrat', 'Montserrat Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --fs-xs:   0.75rem;
    --fs-sm:   0.875rem;
    --fs-base: 1rem;
    --fs-md:   1.125rem;
    --fs-lg:   clamp(1.25rem, 1.1rem + 0.5vw, 1.375rem);
    --fs-xl:   clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
    --fs-2xl:  clamp(2rem, 1.55rem + 1.9vw, 2.75rem);
    --fs-3xl:  clamp(2.25rem, 1.45rem + 3.4vw, 3.5rem);
    --lh-tight: 1.1;
    --lh-snug:  1.3;
    --lh-body:  1.6;

    /* Spacing (4px base) */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;
    --sp-9: 6rem;
    --section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);

    /* Layout */
    --container:     1200px;
    --measure:       760px;     /* prose column, ~75ch */
    --header-offset: 8rem;      /* sticky header height, for anchor jumps */

    /* Shape */
    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-pill: 999px;

    /* Depth: warm ink shadows, always offset + blurred */
    --shadow-sm:  0 1px 3px rgba(43,42,41,0.08);
    --shadow-md:  0 6px 18px rgba(43,42,41,0.10);
    --shadow-lg:  0 10px 24px -10px rgba(43,42,41,0.45);

    /* Focus */
    --focus-color:  var(--color-brand-text);
    --focus-width:  3px;
    --focus-offset: 3px;

    /* Crop marks (product tiles, price box) */
    --crop-len:   8px;
    --crop-gap:   4px;
    --crop-color: var(--color-ink);

    /* Motion */
    --dur-fast:    150ms;
    --dur-base:    200ms;
    --dur-slow:    300ms;
    --dur-enter:   600ms;
    --ease-out:    cubic-bezier(.16, 1, .3, 1);
    --ease-in-out: cubic-bezier(.65, 0, .35, 1);
    --transition:  var(--dur-base) var(--ease-out);
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-offset);
    -webkit-text-size-adjust: 100%;
    accent-color: var(--color-brand-fill);
    scrollbar-color: #c9c7c4 transparent;
}
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.55;
    color: var(--color-ink);
    background: var(--color-surface-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
::selection { background: var(--color-brand-light); color: var(--color-ink); }
/* phone numbers and e-mail addresses never break mid-number */
:where(a[href^="tel:"], a[href^="mailto:"]) { white-space: nowrap; }

/* ---------- 4. Accessibility utilities ---------- */
:focus-visible {
    outline: var(--focus-width) solid var(--focus-color);
    outline-offset: var(--focus-offset);
}
/* dark and magenta grounds switch the ring to process yellow */
.topbar, .contact, .site-footer, .back-to-top, .lightbox, .skip-link { --focus-color: var(--color-yellow); }

.skip-link {
    position: absolute;
    left: var(--sp-4);
    top: var(--sp-2);
    z-index: 100;
    padding: var(--sp-3) var(--sp-5);
    background: var(--color-ink);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.visually-hidden:not(:focus):not(:active) {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- 5. Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--sp-4);
}
@media (min-width: 768px) {
    .container { padding-inline: var(--sp-6); }
}

/* colour bar: the press control strip under every section and page title */
.section-title, .page h1 { position: relative; padding-bottom: var(--sp-4); }
.section-title::after, .page h1::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 72px; height: 4px;
    background: linear-gradient(90deg,
        var(--color-brand) 0 55%, var(--color-cyan) 55% 70%,
        var(--color-yellow) 70% 85%, var(--color-ink) 85% 100%);
}
.section-title {
    font-size: var(--fs-2xl);
    font-weight: 700;
    line-height: var(--lh-tight);
    color: var(--color-ink);
    text-align: center;
    margin-bottom: var(--sp-7);
}
.section-title::after { left: 50%; transform: translateX(-50%); }
.section-title--light { color: #fff; }
.section-title--light::after { background: var(--color-yellow); }

/* ---------- 6. Buttons & links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 48px;
    padding: 0.85rem 2rem;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: var(--fs-base);
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    transition: transform var(--transition), background-color var(--transition), color var(--transition),
        border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-brand-fill); color: #fff; box-shadow: var(--shadow-lg); }
.btn--primary:hover { background: var(--color-brand-dark); transform: translateY(-2px); }
.btn--secondary { border-color: var(--color-ink); color: var(--color-ink); background: transparent; }
.btn--secondary:hover { background: var(--color-ink); color: #fff; }
.btn--ghost { color: var(--color-brand-text); padding-inline: var(--sp-4); }
.btn--ghost:hover { background: var(--color-brand-light); }
.btn--sm { min-height: 40px; padding: 0.5rem 1.25rem; font-size: var(--fs-sm); }
.btn--block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
    background: var(--color-line);
    border-color: transparent;
    color: var(--color-muted);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

/* links inside running text are underlined: magenta vs ink alone is only 2.5:1 */
.link, .page p a:not([class]) {
    color: var(--color-brand-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.link:hover, .page p a:not([class]):hover { text-decoration-thickness: 2px; }

/* ---------- 7. Header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: var(--shadow-sm); }

/* the inset lives on the dark band itself, so the text never sits flush against its edge */
.topbar { background: var(--color-ink); color: #fff; font-size: var(--fs-sm); padding-block: var(--sp-2); }
.topbar__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.topbar__contact, .topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: center;
    justify-content: center;
}
.topbar__link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: 24px;
    color: #fff;
    opacity: 0.92;
}
.topbar__link:hover { color: var(--color-yellow); opacity: 1; }
.topbar__icon { width: 14px; height: 14px; filter: brightness(0) invert(1); }
.topbar__follow { opacity: 0.7; }
.topbar__social { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; }
.topbar__social img { width: 18px; height: 18px; filter: brightness(0) invert(1); transition: filter var(--transition); }
.topbar__social:hover img { filter: none; }
.topbar__short { display: none; }

@media (min-width: 992px) {
    .topbar__inner { flex-direction: row; justify-content: space-between; }
    .topbar__contact, .topbar__actions { justify-content: flex-start; }
}
@media (max-width: 767px) {
    /* one row on phones: primary phone left, cart + login right */
    .topbar__secondary { display: none; }
    .topbar__inner { flex-direction: row; justify-content: space-between; align-items: center; gap: var(--sp-3); }
    .topbar__contact, .topbar__actions { flex-wrap: nowrap; gap: var(--sp-4); }
    .topbar__long { display: none; }
    .topbar__short { display: inline; }
    .topbar__link { min-height: 32px; white-space: nowrap; }
}
@media (max-width: 359px) {
    .topbar__actions { gap: var(--sp-3); }
    .topbar__inner { gap: var(--sp-2); }
}

.navbar { padding-block: var(--sp-4); }
.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
}
.navbar__brand img { height: 36px; width: auto; }
@media (min-width: 768px) { .navbar__brand img { height: 44px; } }

.navbar__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 44px; min-height: 44px;
    padding: 8px;
}
.navbar__toggle span {
    width: 26px; height: 3px;
    background: var(--color-ink);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.navbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* phones: the menu folds down under the header */
.navbar__nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;  /* a closed drawer must not hold tab stops */
    transition: max-height var(--dur-slow) var(--ease-in-out), visibility 0s linear var(--dur-slow);
}
.navbar__nav.is-open { max-height: 80vh; overflow-y: auto; visibility: visible; transition-delay: 0s; }
.navbar__nav > ul {
    display: flex;
    flex-direction: column;
    padding: var(--sp-4);
    gap: var(--sp-2);
}
.navbar__nav a {
    display: block;
    padding: var(--sp-3) var(--sp-4);
    font-weight: 600;
    border-radius: var(--radius-sm);
}
.navbar__nav a:hover { background: var(--color-brand-light); color: var(--color-brand-text); }
.navbar__nav a[aria-current="page"] { color: var(--color-brand-text); }
.submenu { display: flex; flex-direction: column; padding-left: var(--sp-4); }
.submenu a { font-weight: 500; padding-block: var(--sp-2); font-size: var(--fs-sm); }

/* disclosure buttons: only exist for scripted pages; without JS the panels stay plain links */
.sub-toggle, .search-toggle { display: none; }
.js .sub-toggle, .js .search-toggle {
    display: inline-grid;
    place-items: center;
    min-width: 44px; min-height: 44px;
    color: var(--color-ink);
    border-radius: var(--radius-sm);
}
.sub-toggle:hover, .search-toggle:hover { background: var(--color-brand-light); color: var(--color-brand-text); }
.sub-toggle:focus-visible, .search-toggle:focus-visible { outline-offset: -3px; }
.sub-toggle svg { transition: transform var(--transition); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-sub { display: flex; flex-wrap: wrap; align-items: center; }
.has-sub > a { flex: 1; }
.has-sub > .submenu, .has-sub > .mega { flex-basis: 100%; }
.js .has-sub:not(.is-open) > .submenu, .js .has-sub:not(.is-open) > .mega { display: none; }
.has-sub > a[aria-current="true"] { color: var(--color-brand-text); }

/* mega-menu panel (phones: accordion inside the drawer) */
.mega__inner { padding: 0 0 0 var(--sp-4); }
.mega__col { display: block; }
.mega__title {
    margin: var(--sp-3) 0 var(--sp-1) var(--sp-4);
    font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--color-muted);
}
.mega ul { display: block; }
.mega a { display: block; padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); font-weight: 500; }
.mega__name { display: block; font-weight: 600; }
.mega__hint { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--color-muted); }
.mega a:hover .mega__hint { color: var(--color-brand-text); }
.mega a[aria-current="page"] .mega__name { color: var(--color-brand-text); }
.mega__all { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-5); margin: var(--sp-2) 0; }
.mega__all a { font-weight: 700; color: var(--color-brand-text); }
.mega__all a:first-child::after { content: ' \2192'; }
.mega__all a + a { font-weight: 600; color: var(--color-ink-soft); }

/* search: phones get an icon button that opens a full-width row under the header */
.search-toggle { margin-left: auto; }
.search {
    position: absolute; inset: 100% 0 auto 0;
    display: none;
    padding: var(--sp-3) var(--sp-4) var(--sp-4);
    background: #fff;
    box-shadow: var(--shadow-md);
}
.search.is-open { display: block; }
.search input {
    width: 100%;
    height: 44px;
    padding: 10px 48px 10px 14px;
    font: inherit; font-size: var(--fs-base);
    color: var(--color-ink);
    background: #fff;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-sm);
    appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--color-muted); opacity: 1; }
.search__submit {
    position: absolute; right: var(--sp-4); top: var(--sp-3);
    display: grid; place-items: center;
    width: 44px; height: 44px;
    color: var(--color-ink-soft);
    border-radius: var(--radius-sm);
}
.search__submit:hover { color: var(--color-brand-text); }
.search__list {
    margin-top: var(--sp-2);
    max-height: 50vh; overflow-y: auto;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-sm);
}
.search__list[hidden] { display: none; }
.search__list li { border-bottom: 1px solid var(--color-line); }
.search__list li:last-child { border-bottom: 0; }
.search__list a { display: block; padding: var(--sp-3) var(--sp-4); }
.search__title { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--color-ink); }
.search__desc {
    display: block; margin-top: 2px;
    font-size: var(--fs-xs); color: var(--color-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search__list [aria-selected="true"] { background: var(--color-brand-light); box-shadow: inset 3px 0 0 var(--color-brand); }
.search__empty { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); color: var(--color-ink-soft); }
/* the same field inside page content (404): in flow, not the header's dropdown row */
.search.search--page { position: relative; inset: auto; display: block; flex: none; max-width: 28rem; margin-block: var(--sp-5); padding: 0; background: transparent; box-shadow: none; }
.search--page input { height: 48px; }
.search--page .search__submit { right: 0; top: 2px; }
.search--page .search__list { position: absolute; inset: 100% 0 auto 0; z-index: 5; width: auto; box-shadow: var(--shadow-md); }

@media (min-width: 992px) {
    .navbar { position: relative; }
    .navbar__toggle, .js .search-toggle { display: none; }
    .navbar__nav {
        position: static;
        max-height: none;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        visibility: visible;
        margin-left: auto;
    }
    .navbar__nav > ul { flex-direction: row; padding: 0; gap: 0; }
    .navbar__nav > ul > li { position: relative; }
    .navbar__nav > ul > li.has-mega { position: static; }
    .navbar__nav > ul > li > a { position: relative; padding-inline: var(--sp-3); white-space: nowrap; }
    .navbar__nav > ul > li > a[aria-current="page"]::after {
        content: ''; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: 4px;
        height: 2px; background: var(--color-brand);
    }
    .has-sub { flex-wrap: nowrap; }
    .has-sub > a { flex: none; }
    .js .sub-toggle { min-width: 28px; min-height: 40px; margin-left: 0; }
    .navbar__nav > ul > li > a:has(+ .sub-toggle) { padding-right: var(--sp-1); }

    /* dropdown */
    .submenu {
        display: none;
        position: absolute; top: 100%; left: 0; z-index: 60;
        min-width: 260px;
        padding: var(--sp-2);
        background: #fff;
        border: 1px solid var(--color-line);
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-md);
    }
    /* mega-menu: the e-shop opens as a full-width, grouped panel under the header */
    .mega {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
        background: #fff;
        border-top: 1px solid var(--color-line);
        box-shadow: var(--shadow-md);
        max-height: calc(100vh - var(--header-offset));  /* short windows scroll the panel instead of clipping it */
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    /* Tiskoviny | Velkoformát | Vazba + Speciální | Příležitosti (two columns) */
    .mega__inner {
        display: grid;
        grid-template-columns: 1.3fr 1fr 1fr 2fr;
        gap: var(--sp-4) var(--sp-5);
        padding: var(--sp-5) var(--sp-5) var(--sp-4);
    }
    .mega__title {
        margin: 0 0 var(--sp-2);
        padding: 0 var(--sp-3) var(--sp-2);
        border-bottom: 2px solid var(--color-brand);
        width: fit-content;
        color: var(--color-ink);
    }
    .mega__col { display: grid; align-content: start; gap: var(--sp-5); }
    .mega__group--wide ul { columns: 2; column-gap: var(--sp-4); }
    .mega__group--wide li { break-inside: avoid; }
    .mega a { padding: 6px var(--sp-3); line-height: var(--lh-snug); }
    .mega__all { grid-column: 1 / -1; margin: 0; padding-top: var(--sp-3); border-top: 1px solid var(--color-line); }
    .mega__all a { display: inline-block; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    /* narrow desktops: tighter gutters, names only (hints wrap into 2-3 lines in ~150px columns) */
    .mega__inner { gap: var(--sp-4); padding-inline: var(--sp-3); }
    .mega a { padding-inline: var(--sp-2); }
    .mega__title { padding-inline: var(--sp-2); }
    .mega .mega__hint { display: none; }
}
@media (min-width: 992px) {
    /* no JS: open on hover / keyboard focus. With JS the disclosure button decides (layout.js adds hover). */
    html:not(.js) .has-sub:hover > .submenu, html:not(.js) .has-sub:focus-within > .submenu { display: flex; }
    html:not(.js) .has-sub:hover > .mega, html:not(.js) .has-sub:focus-within > .mega { display: block; }
    .js .has-sub.is-open > .submenu { display: flex; }
    .js .has-sub.is-open > .mega { display: block; }

    .search {
        position: relative; inset: auto;
        display: block;
        flex: 0 0 150px;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }
    .search input { height: 40px; }
    .search__submit { right: 0; top: 0; width: 40px; height: 40px; }
    .search__list {
        position: absolute; top: calc(100% + var(--sp-1)); right: 0; z-index: 70;
        width: 380px; max-height: 70vh;
        margin-top: 0;
        box-shadow: var(--shadow-md);
    }
}
@media (min-width: 1100px) { .search { flex-basis: 190px; } }
@media (min-width: 1200px) { .search { flex-basis: 240px; } }

/* ---------- 8. Hero ---------- */
/* The one Persuade moment: the offer first (value line, "Spočítat cenu", shortcuts, the production
   promise), a printer's-marks sheet beside it on desktop. Paper ground; no photo, so LCP is text. */
.hero { background: var(--color-surface); border-bottom: 1px solid var(--color-line); }
.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-5);
    padding-block: var(--sp-5) var(--sp-6);
}
.hero__title {
    position: relative;
    padding-bottom: var(--sp-4);
    margin-bottom: var(--sp-3);
    font-size: clamp(1.625rem, 0.9rem + 3.6vw, 3.5rem);
    font-weight: 800;
    line-height: var(--lh-tight);
    letter-spacing: -0.01em;
}
/* the control strip sits under the title, as under every page title */
.hero__title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 72px; height: 4px;
    background: linear-gradient(90deg,
        var(--color-brand) 0 55%, var(--color-cyan) 55% 70%,
        var(--color-yellow) 70% 85%, var(--color-ink) 85% 100%);
}
.hero__lede { font-size: var(--fs-md); color: var(--color-ink-soft); max-width: 36ch; margin-bottom: var(--sp-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.hero__cta { flex: 1 1 100%; }
.hero__secondary { display: none; }
.hero__promise { font-size: var(--fs-sm); color: var(--color-ink-soft); max-width: 52ch; }
.hero__art { display: none; width: 100%; max-width: 480px; height: auto; justify-self: center; }

/* shortcut tiles: compact chips on phones, icon-on-top tiles from 992px */
.hero__all { margin-top: var(--sp-3); font-size: var(--fs-sm); font-weight: 600; }
.hero__quick-label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-muted); margin-bottom: var(--sp-2); }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.quick .product-card { flex-direction: row; align-items: center; height: 100%; min-height: 56px; text-align: left; }
.quick__icon { flex: none; width: 48px; height: 48px; margin: var(--sp-1) 0 var(--sp-1) var(--sp-2); padding: 6px; background: var(--color-brand-light); border-radius: var(--radius-sm); }
.quick .product-card__title { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); font-weight: 700; overflow-wrap: break-word; }
@media (max-width: 359px) {  /* 320px: keep "Reklamní" and "Diplomky" whole */
    .quick__icon { width: 36px; height: 36px; margin-left: var(--sp-1); padding: 4px; }
    .quick .product-card__title { padding-inline: var(--sp-2); }
}
@media (min-width: 600px) {
    .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
    .hero__cta { flex: 0 0 auto; }
    .hero__secondary { display: inline-flex; }
}
@media (min-width: 768px) {
    .hero__inner { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: var(--sp-6) var(--sp-7); padding-block: var(--sp-7); }
    .hero__title { font-size: var(--fs-3xl); }
    .hero__lede { font-size: var(--fs-lg); }
    .hero__art { display: block; }
    .hero__quick { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
    .quick { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .quick .product-card { flex-direction: column; justify-content: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2) var(--sp-3); text-align: center; min-height: 0; }
    .quick__icon { width: 64px; height: 64px; margin: 0; padding: 8px; }
    .quick .product-card__title { padding: 0; }
}

/* Price on request (Knihárna V4/V7/V8): no calculator, a contact box in its place */
.pdp-quote { margin-block: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-left: 4px solid var(--color-brand); background: var(--color-surface-2); border-radius: 8px; }
.pdp-quote p { margin: 0 0 var(--sp-3); }
.pdp-quote p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- 8b. Seasonal hero ---------- */
/* Switched by site/partials/season.txt (build-partials). Christmas = the Instagram "Kalendáře 2027" post: kinari
   paper, a magenta bauble on a thread carrying the year, a vertical "Dárek pod stromeček" column, one plain brand rule.
   Inert while the default hero is stamped. */
.hero:has(.hero__season) { background: #F4F1EA; overflow: hidden; }
.season__art { overflow: visible; }  /* the thread runs up to the top edge of the hero */
.hero__season .season__column,
.hero__season .season__kind { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--color-muted); }
.hero__season .season__column { margin-bottom: var(--sp-3); }
.hero__season .season__title { margin-bottom: var(--sp-4); }
.hero__season .season__title::after { width: 72px; height: 3px; background: var(--color-brand); }
.hero__season .season__sub { display: block; margin-top: var(--sp-2); font-size: var(--fs-lg); font-weight: 500; letter-spacing: 0; color: var(--color-ink-soft); }
.hero__season .season__kind { margin-bottom: var(--sp-4); }
.season__year { font: 600 46px var(--font-sans); letter-spacing: 12px; }
.season__swing { transform-box: view-box; transform-origin: 300px -600px; animation: season-sway 7s ease-in-out infinite alternate; }
@keyframes season-sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
@media (prefers-reduced-motion: reduce) { .season__swing { animation: none; } }
@media (max-width: 767px) {
    /* phones: the default hero hides its art; the bauble stays, hanging in the top-right corner, sized to the screen
       (~164 px on a 390 px iPhone, 134 px at 320). The ball sits in the art's right ~70 %, so the text keeps clear of that. */
    .hero__inner:has(.hero__season) { position: relative; --bauble: clamp(128px, 42vw, 176px); }
    .hero__inner .season__art { display: block; position: absolute; top: 0; right: var(--sp-4); width: var(--bauble); height: auto; }
    .hero__season .season__column { padding-right: calc(var(--bauble) * .72); }
}
@media (min-width: 768px) {
    /* the column runs down the left edge, as in the post */
    .hero__season { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--sp-5); }
    .hero__season > * { grid-column: 2; }
    .hero__season .season__column { grid-column: 1; grid-row: 1 / span 5; margin: 0; writing-mode: vertical-rl; letter-spacing: .32em; color: var(--color-ink); }
    .hero__season .season__sub { font-size: var(--fs-xl); }
}

/* ---------- 9. Home sections ---------- */
/* Home */
.band { padding-block: var(--section-y); background: var(--color-surface-2); }
.band--paper { background: var(--color-surface); }
.section-title--left { text-align: left; margin-bottom: var(--sp-5); }
.section-title--left::after { left: 0; transform: none; }
/* "Jak to funguje": an ordered sequence of steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-6) var(--sp-5); }
@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { border-top: 2px solid var(--color-line); padding-top: var(--sp-4); }
.step__num {
    display: block; font-size: var(--fs-xl); font-weight: 800; line-height: 1;
    color: var(--color-brand-text); margin-bottom: var(--sp-3); font-variant-numeric: tabular-nums;
}
.step__title { font-size: var(--fs-md); font-weight: 700; margin-bottom: var(--sp-2); }
.step__text { font-size: var(--fs-sm); color: var(--color-ink-soft); line-height: var(--lh-body); }
.step__text a { color: var(--color-brand-text); text-decoration: underline; text-underline-offset: 3px; }
/* the active step of a checkout flow */
.step[aria-current="step"] { border-top-color: var(--color-brand); }

/* walk-in shop: copy beside an address card that carries permanent crop marks (it is the "printed piece") */
.shop { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 768px) { .shop { grid-template-columns: 1.2fr 0.8fr; gap: var(--sp-8); } }
.shop__copy > p + p { margin-top: var(--sp-3); }
.shop__copy { max-width: var(--measure); }
.why { margin: 0 0 var(--sp-5); }
.why > div { padding-block: var(--sp-3); border-top: 1px solid var(--color-line); }
.why > div:last-child { border-bottom: 1px solid var(--color-line); }
.why dt { font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-snug); }
.why dd { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); color: var(--color-ink-soft); }
.shop__card {
    font-style: normal;
    display: grid; gap: var(--sp-3);
    margin: var(--sp-3);
    padding: var(--sp-5);
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
}
.shop__name { font-size: var(--fs-lg); font-weight: 800; }
.shop__addr { font-size: var(--fs-md); font-weight: 600; }
.shop__hours { margin: 0; font-size: var(--fs-sm); }
.shop__hours dt { font-weight: 700; }
.shop__hours dd { margin: 0; color: var(--color-ink-soft); }
.shop__phones { font-size: var(--fs-sm); }
.shop__phones a { text-decoration: underline; text-underline-offset: 3px; }
.shop__map { justify-self: start; }
.shop a:not(.btn) { color: var(--color-brand-text); }

/* services teaser: three whole-card links */
.services { display: grid; gap: var(--sp-4); }
@media (min-width: 768px) { .services { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }
.service {
    display: grid; grid-template-columns: 96px 1fr; column-gap: var(--sp-4); align-content: start;
    padding: var(--sp-4);
    background: var(--color-surface-2);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.service:hover { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.service picture { grid-row: span 3; }
.service img { width: 96px; height: 72px; object-fit: contain; background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius-sm); }
.service__title { font-size: var(--fs-md); font-weight: 700; line-height: var(--lh-snug); }
.service__text { font-size: var(--fs-sm); color: var(--color-ink-soft); margin-top: var(--sp-1); }
.service__more { margin-top: var(--sp-2); font-size: var(--fs-sm); font-weight: 700; color: var(--color-brand-text); }
.service__more::after { content: ' \2192'; }
.service:hover .service__more { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) {
    .service { grid-template-columns: 1fr; row-gap: var(--sp-1); }
    .service picture { grid-row: auto; margin-bottom: var(--sp-3); }
    .service img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
}

.faq { margin-inline: auto; }

/* contact band */
.contact {
    background: linear-gradient(135deg, var(--color-brand-fill) 0%, var(--color-brand-dark) 100%);
    color: #fff;
    padding-block: var(--section-y);
    position: relative;
    overflow: hidden;
}
.contact::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(255,237,0,0.18), transparent 50%);
}
.contact .container { position: relative; }
.contact__grid { display: grid; gap: var(--sp-5); max-width: 860px; margin-inline: auto; }
@media (min-width: 768px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact__cta { text-align: center; margin-top: var(--sp-6); }
.btn--light { background: #fff; color: var(--color-ink); }
.btn--light:hover { background: var(--color-yellow); transform: translateY(-2px); }
.contact-card {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: var(--radius-md);
    color: #fff;
    white-space: normal; /* the card is a tel:/mailto: link; only the number itself stays unbroken */
    transition: background-color var(--transition), transform var(--transition);
}
.contact-card:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.contact-card__icon { width: 52px; height: 52px; flex-shrink: 0; background: #fff; border-radius: var(--radius-md); padding: 10px; }
.contact-card__big { display: block; font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; }
.contact-card__small { display: block; font-size: var(--fs-sm); }
@media (max-width: 359px) {
    .contact-card { padding: var(--sp-4); gap: var(--sp-3); }
    .contact-card__icon { width: 44px; height: 44px; padding: 8px; }
    .contact-card__big { font-size: var(--fs-md); }
}

/* client logos */
.trust__title { text-align: center; font-size: var(--fs-md); font-weight: 600; color: var(--color-muted); margin-bottom: var(--sp-6); }
.trust__logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-5); align-items: center; max-width: 760px; margin-inline: auto; }
.trust__logo { display: grid; place-items: center; padding: var(--sp-3); }
.trust__logo img {
    max-height: 48px; width: auto;
    filter: grayscale(1);
    opacity: 0.65;
    transition: filter var(--transition), opacity var(--transition);
}
.trust__logo:hover img { filter: none; opacity: 1; }

/* ---------- 10. Product tiles & crop marks ---------- */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    text-align: center;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.product-card > picture > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0;
}
.product-card__title {
    padding: var(--sp-4);
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: var(--lh-snug);
    color: var(--color-ink);
    transition: color var(--transition);
}
.product-card:hover .product-card__title { color: var(--color-brand-text); }
.product-card__text { padding: 0 var(--sp-3) var(--sp-3); font-size: var(--fs-sm); color: var(--color-muted); }

/* crop marks: eight hairline ticks just outside the trim box. A tile shows them on hover,
   as if marked up for the guillotine; the price box and .crop-marks show them always. */
.product-card::after, .price-box::after, .crop-marks::after {
    --o: calc(var(--crop-len) + var(--crop-gap));
    --t: linear-gradient(var(--crop-color), var(--crop-color));
    content: '';
    position: absolute;
    inset: calc(-1 * var(--o));
    pointer-events: none;
    background:
        var(--t) left 0 top var(--o) / var(--crop-len) 1px,
        var(--t) left var(--o) top 0 / 1px var(--crop-len),
        var(--t) right 0 top var(--o) / var(--crop-len) 1px,
        var(--t) right var(--o) top 0 / 1px var(--crop-len),
        var(--t) left 0 bottom var(--o) / var(--crop-len) 1px,
        var(--t) left var(--o) bottom 0 / 1px var(--crop-len),
        var(--t) right 0 bottom var(--o) / var(--crop-len) 1px,
        var(--t) right var(--o) bottom 0 / 1px var(--crop-len);
    background-repeat: no-repeat;
}
.product-card::after {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.product-card:hover::after, .product-card:focus-visible::after { opacity: 1; transform: none; }
.crop-marks { position: relative; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-block: var(--sp-6); }
@media (min-width: 768px)  { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.page .product-card__title { margin: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4); font-size: var(--fs-base); line-height: 1.35; }

/* product-card entrance (js/main.js): cards are visible by default; the class is added only as a
   card is about to scroll into view, so a missed observer or a fast scroll never leaves one hidden */
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } }
.is-entering { animation: card-in var(--dur-enter) var(--ease-out) var(--enter-delay, 0ms) backwards; }

/* ---------- 11. Inner pages ---------- */
.page { padding-block: var(--sp-6) var(--sp-8); }
.page h1 {
    font-size: var(--fs-2xl);
    line-height: 1.15;
    margin-bottom: var(--sp-5);
}
.page h2 { font-size: var(--fs-lg); line-height: 1.25; margin: var(--sp-7) 0 var(--sp-3); }
.page p, .page ul { max-width: var(--measure); line-height: 1.7; margin-bottom: var(--sp-4); }
.page ul { list-style: disc; padding-left: var(--sp-5); }
.page ul li + li { margin-top: var(--sp-1); }
.page > h1 + p { font-size: var(--fs-md); color: var(--color-ink-soft); max-width: 62ch; }
.page a:not(.product-card):not(.btn) { color: var(--color-brand-text); text-underline-offset: 3px; }

/* production terms: consecutive notes read as one quiet panel */
.page .note {
    max-width: var(--measure);
    background: var(--color-surface);
    color: var(--color-ink-soft);
    line-height: var(--lh-body);
    border-radius: var(--radius-md);
    padding: var(--sp-4) var(--sp-5);
    margin-top: var(--sp-5);
}
.page .note + .note { margin-top: calc(-1 * var(--sp-3)); border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 0; }
.page .note:has(+ .note) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: var(--sp-3); }
.placeholder-note { background: var(--color-brand-light); border: 1px solid #f6b9d8; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm); }

/* breadcrumb: works with inline text + "›" or with an <ol> */
.breadcrumb { font-size: var(--fs-sm); color: var(--color-muted); margin-bottom: var(--sp-5); }
.breadcrumb a { color: var(--color-brand-text); text-decoration: underline; text-underline-offset: 3px; padding-block: 3px; }
.breadcrumb a:hover { text-decoration-thickness: 2px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: '›'; margin-right: var(--sp-2); color: var(--color-muted); }
.breadcrumb [aria-current="page"] { color: var(--color-ink); font-weight: 600; }

/* product galleries: framed, equal-height tiles; every photo stays whole */
.gallery { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-block: var(--sp-6); }
.gallery > a {
    display: grid; place-items: center;
    max-width: 100%;
    padding: var(--sp-2);
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    cursor: zoom-in;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.gallery > a:hover { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.gallery img { height: 160px; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.gallery--big img { height: auto; max-height: 520px; }
@media (max-width: 599px) { .gallery img { height: 136px; } .gallery--big img { height: auto; } }

/* the calculator embed is a shadow root: style it through its custom properties */
.calc-slot {
    margin-block: var(--sp-5);
    --printengine-accent: var(--color-brand-text);  /* the embed's fallback link is text: pure brand is 4.49:1 */
    --printengine-muted: var(--color-muted);
    --printengine-font: var(--font-sans);
}

/* kontakt page: the four facts as tiles */
.contact-tiles { display: grid; gap: var(--sp-4); max-width: 960px; margin-top: var(--sp-5); }
@media (min-width: 768px) { .contact-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .contact-tiles { grid-template-columns: repeat(3, 1fr); } }
.contact-tile { border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: var(--sp-5); background: #fff; }
.page .contact-tile h2 { margin: 0 0 var(--sp-3); font-size: var(--fs-md); }
.contact-tile p { margin: 0; }
.contact-tile a { font-weight: 600; }
@media (min-width: 992px) { .contact-tile--store { grid-column: span 2; } }
.contact-tile--store p + p { margin-top: var(--sp-3); }
.contact-tile--wide { grid-column: 1 / -1; background: var(--color-surface); border-color: transparent; }
.contact-tile--wide p { color: var(--color-ink-soft); font-size: var(--fs-sm); }

/* ---------- 12. Components (shop UI: forms, badges, alerts, tabs, FAQ, tables, price box) ---------- */

/* forms */
.field { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-5); max-width: 32rem; }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-ink); }
.label__opt { font-weight: 500; color: var(--color-muted); }
.input, .select, .textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.625rem 0.875rem;
    background: #fff;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    line-height: 1.4;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.textarea { min-height: 7.5rem; resize: vertical; }
.select {
    appearance: none;
    padding-right: 2.5rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232B2A29' stroke-width='1.6'/%3E%3C/svg%3E") right 0.875rem center / 12px 8px no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--color-muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--color-ink-soft); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--color-brand-text); outline-offset: 1px; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--color-error); box-shadow: inset 0 0 0 1px var(--color-error); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--color-surface); color: var(--color-muted); border-color: var(--color-line); cursor: not-allowed; }
.field__hint { font-size: var(--fs-sm); color: var(--color-muted); }
.field__error { font-size: var(--fs-sm); font-weight: 600; color: var(--color-error); }
.check { display: flex; align-items: flex-start; gap: var(--sp-3); min-height: 24px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }

/* badges */
.badge {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-xs);
    background: var(--color-brand-light); color: var(--color-brand-text);
    font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
    letter-spacing: 0.04em; text-transform: uppercase;
    white-space: nowrap;
}
.badge--ink     { background: var(--color-ink); color: #fff; }
.badge--yellow  { background: var(--color-yellow); color: var(--color-ink); }
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge--error   { background: var(--color-error-bg); color: var(--color-error); }

/* alerts: tinted panel, status colour in the title, ink body */
.alert {
    --alert-c: var(--color-info);
    --alert-bg: var(--color-info-bg);
    max-width: var(--measure);
    padding: var(--sp-4) var(--sp-5);
    margin-block: var(--sp-4);
    background: var(--alert-bg);
    border: 1px solid color-mix(in srgb, var(--alert-c) 30%, transparent);
    border-radius: var(--radius-md);
    color: var(--color-ink);
    font-size: var(--fs-sm);
    line-height: var(--lh-body);
}
.alert__title { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-base); font-weight: 700; color: var(--alert-c); }
.alert--success { --alert-c: var(--color-success); --alert-bg: var(--color-success-bg); }
.alert--warning { --alert-c: var(--color-warning); --alert-bg: var(--color-warning-bg); }
.alert--error   { --alert-c: var(--color-error);   --alert-bg: var(--color-error-bg); }

/* tabs (role="tablist" > button role="tab" aria-selected) */
.tabs__list {
    display: flex; gap: var(--sp-1);
    border-bottom: 1px solid var(--color-line);
    overflow-x: auto;
    scrollbar-width: thin;
}
.tabs__tab {
    flex-shrink: 0;
    min-height: 44px;
    padding: var(--sp-3) var(--sp-4);
    font-weight: 600;
    color: var(--color-ink-soft);
    box-shadow: inset 0 -3px 0 transparent;
    transition: color var(--transition), box-shadow var(--transition);
}
.tabs__tab:hover { color: var(--color-brand-text); }
.tabs__tab[aria-selected="true"] { color: var(--color-ink); box-shadow: inset 0 -3px 0 var(--color-brand); }
.tabs__panel { padding-block: var(--sp-5); }
.page .tabs__panel > h3 { margin: 0 0 var(--sp-3); font-size: var(--fs-md); }
.tabs__panel .bind-list { margin-bottom: var(--sp-3); }

/* accordion / FAQ: native <details> */
.accordion { max-width: var(--measure); border-top: 1px solid var(--color-line); }
.accordion__item { border-bottom: 1px solid var(--color-line); }
.accordion__summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
    min-height: 48px;
    padding: var(--sp-4) 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after {
    content: '';
    width: 10px; height: 10px; flex-shrink: 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform var(--transition);
}
.accordion__item[open] > .accordion__summary::after { transform: translateY(2px) rotate(-135deg); }
.accordion__summary:hover { color: var(--color-brand-text); }
.accordion__body { padding-bottom: var(--sp-5); color: var(--color-ink-soft); line-height: var(--lh-body); }

/* data tables (price lists, order lines) */
.table-wrap { max-width: 100%; overflow-x: auto; margin-block: var(--sp-5); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-line); }
.table thead th { background: var(--color-surface); font-weight: 600; color: var(--color-ink); border-bottom-color: var(--color-line-strong); }
.table tbody tr:hover { background: color-mix(in srgb, var(--color-brand-light) 45%, transparent); }
.table .num { text-align: right; white-space: nowrap; }

/* price box: the quote, set like a proof sheet with crop marks */
.price-box {
    position: relative;
    display: grid; gap: var(--sp-2);
    max-width: 24rem;
    margin: calc(var(--crop-len) + var(--crop-gap) + var(--sp-2));
    padding: var(--sp-5);
    background: #fff;
    border: 1px solid var(--color-line);
    font-variant-numeric: tabular-nums;
}
.price-box__label { font-size: var(--fs-sm); font-weight: 600; color: var(--color-muted); }
.price-box__value { font-size: var(--fs-2xl); font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.01em; color: var(--color-ink); }
.price-box__vat { font-size: var(--fs-sm); color: var(--color-ink-soft); }
.price-box__cta { margin-top: var(--sp-3); }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--color-footer); color: var(--color-footer-link); font-size: var(--fs-sm); }
.site-footer__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); padding-block: var(--sp-7); }
@media (min-width: 600px) { .site-footer__inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .site-footer__inner { grid-template-columns: repeat(5, 1fr); } }
.site-footer__heading {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--fs-xs);
    margin-bottom: var(--sp-4);
}
.site-footer__list li + li { margin-top: var(--sp-2); }
.site-footer__list a, .site-footer__text a { display: inline-block; padding-block: 2px; }
.site-footer__list a:hover, .site-footer__text a:hover, .site-footer__bottom a:hover { color: var(--color-yellow); }
.site-footer__text { margin-bottom: var(--sp-3); line-height: 1.7; }
.site-footer__text strong { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-block: var(--sp-4); font-size: var(--fs-xs); }
.site-footer__bottom-inner { display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; text-align: center; }
.site-footer__bottom a { color: var(--color-footer-link); text-decoration: underline; }
@media (min-width: 768px) {
    .site-footer__bottom-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
@media (max-width: 767px) {
    /* bigger tap targets on phones */
    .site-footer__list li + li { margin-top: 0; }
    .site-footer__list a, .site-footer__text a { padding-block: 10px; }
}

/* ---------- 14. Back-to-top & lightbox ---------- */
.back-to-top {
    position: fixed;
    right: var(--sp-4);
    bottom: var(--sp-4);
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--color-brand-fill);
    color: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity var(--transition), transform var(--transition), background-color var(--transition);
    z-index: 40;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--color-brand-dark); }

html.lightbox-open { overflow: hidden; }
.lightbox {
    border: 0; padding: 0; margin: 0;
    width: 100vw; height: 100dvh; max-width: none; max-height: none;
    background: rgba(20, 19, 18, 0.92);
    color: #fff;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__figure {
    margin: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 64px 72px 48px; gap: var(--sp-3);
}
.lightbox__img {
    max-width: 100%; max-height: calc(100dvh - 140px);
    object-fit: contain; background: #fff; border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox__caption { font-size: var(--fs-sm); text-align: center; opacity: 0.9; }
.lightbox__btn {
    position: absolute; border: 0; cursor: pointer;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,0.14); color: #fff;
    font-size: 32px; line-height: 1; display: grid; place-items: center;
    transition: background-color var(--dur-fast) ease;
}
.lightbox__btn:hover { background: rgba(255,255,255,0.28); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; top: 24px; left: 20px; font-size: var(--fs-sm); opacity: 0.85; }
.lightbox--single .lightbox__prev, .lightbox--single .lightbox__next { display: none; }
@media (max-width: 600px) {
    .lightbox__figure { padding: 60px 8px 72px; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; transform: none; }
    .lightbox__prev { left: calc(50% - 60px); }
    .lightbox__next { right: calc(50% - 60px); }
}

/* ---------- Product page ----------
   One pattern for every product page (<main class="container page pdp">): head (breadcrumb, h1, value line,
   key facts) -> configurator or "Poptat" block -> two-column know/data and options/FAQ rows -> related tiles.
   Reuses .accordion, .note, .btn, .tiles/.product-card; tokens only. */
.pdp .breadcrumb { margin-bottom: var(--sp-3); }
.pdp h1 { margin-bottom: var(--sp-3); }
.pdp .pdp-lede { max-width: 62ch; margin-bottom: var(--sp-4); font-size: var(--fs-md); color: var(--color-ink-soft); }

/* key facts: label + value pairs, hairline-topped; one column on phones, as many columns as fit from 992px (auto-fit, so 4 or 5 facts never orphan one) */
.pdp-facts { display: grid; margin: 0 0 var(--sp-5); }
.pdp-facts > div {
    display: grid; grid-template-columns: 6rem 1fr; gap: var(--sp-3); align-content: start;
    padding: var(--sp-2) 0;
    border-top: 1px solid var(--color-line);
    font-size: var(--fs-sm); line-height: var(--lh-snug);
}
.pdp-facts dt { font-weight: 700; color: var(--color-ink); }
.pdp-facts dd { margin: 0; color: var(--color-ink-soft); }
@media (min-width: 992px) {
    .pdp-facts { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); column-gap: var(--sp-5); }
    .pdp-facts > div { grid-template-columns: 1fr; gap: var(--sp-1); align-content: start; padding: var(--sp-3) 0 0; }
}

/* configurator: the embed sits right under the facts; several embeds get their own h2 */
.pdp-config { margin-bottom: var(--sp-5); }
.pdp-config .calc-slot { margin-block: var(--sp-3) var(--sp-6); }
.pdp-config h2 { margin-top: var(--sp-6); }
.pdp-config > h2:first-child { margin-top: 0; }

/* no configurator: the quote request takes its place */
.pdp-cta { max-width: var(--measure); margin-bottom: var(--sp-5); padding: var(--sp-5); background: var(--color-surface); border-radius: var(--radius-md); }
.pdp .pdp-cta h2 { margin-top: 0; }
.pdp-cta__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: 0; }

/* rows: know + data, options + FAQ side by side from 992px */
.pdp-row { display: grid; gap: 0 var(--sp-7); }
@media (min-width: 992px) { .pdp-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } }
.pdp-row > section > h2:first-child, .pdp-gallery > h2, .pdp-bindings > h2, .pdp-services > h2, .pdp-related-wrap > h2, .pdp-config > h2, .pdp-discontinued > h2 { margin-top: var(--sp-7); }
.pdp h3 { margin: var(--sp-5) 0 var(--sp-2); font-size: var(--fs-md); line-height: var(--lh-snug); }
.pdp-row .accordion { max-width: none; }
.pdp-know > ul:first-of-type { margin-top: 0; }

/* data box: a quiet panel, not a card; template links wrap into two columns when there are many */
.pdp-data { margin-top: var(--sp-7); padding: var(--sp-5); background: var(--color-surface); border-radius: var(--radius-md); }
.pdp-row > .pdp-data h2 { margin-top: 0; }
.pdp-data p:last-child { margin-bottom: 0; }
.pdp-data__list { columns: 2 14rem; column-gap: var(--sp-5); list-style: none; padding-left: 0; }
.pdp-data__list li { break-inside: avoid; }
.pdp-data__list a { text-decoration: underline; text-underline-offset: 3px; }
.pdp-data__size { color: var(--color-muted); font-size: var(--fs-sm); white-space: nowrap; }

/* related products: a stacked list on phones, three tiles from 600px */
.pdp-related { grid-template-columns: 1fr; margin-top: var(--sp-4); }
.pdp-related .product-card { flex-direction: row; align-items: center; text-align: left; }
.pdp-related .product-card > picture { flex: 0 0 38%; }
.pdp-related .product-card > picture > img { border-bottom: 0; border-right: 1px solid var(--color-line); border-radius: calc(var(--radius-md) - 1px) 0 0 calc(var(--radius-md) - 1px); }
@media (min-width: 600px) {
    .pdp-related { grid-template-columns: repeat(3, 1fr); }
    .pdp-related .product-card { flex-direction: column; text-align: center; }
    .pdp-related .product-card > picture { flex: none; }
    .pdp-related .product-card > picture > img { border-right: 0; border-bottom: 1px solid var(--color-line); border-radius: calc(var(--radius-md) - 1px) calc(var(--radius-md) - 1px) 0 0; }
}
.pdp-bindings .tiles { margin-block: var(--sp-4); }
@media (min-width: 992px) { .pdp-bindings .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }  /* up to 5 bindings + Diplomové práce in one row (kniharna: V1, V2, Diplomové práce) */

/* fotografie: format presets (real radios in fieldsets; js/fotografie.js reveals the section and remounts the embed) */
.photo-sizes { margin-bottom: var(--sp-5); }
.photo-sizes > h2 { margin-top: var(--sp-6); }
.photo-sizes__lede { max-width: 62ch; color: var(--color-ink-soft); }
.photo-group { min-width: 0; margin: 0 0 var(--sp-4); padding: 0; border: 0; }
.photo-group > legend { padding: 0; margin-bottom: var(--sp-2); font-weight: 700; }
.photo-group > legend span { font-weight: 400; color: var(--color-muted); font-size: var(--fs-sm); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--sp-2); }
.photo-size {
    display: grid; grid-template-columns: auto 1fr; column-gap: var(--sp-2); align-items: center;
    min-height: 48px; padding: var(--sp-2) var(--sp-3);
    background: #fff; border: 1px solid var(--color-line-strong); border-radius: var(--radius-md);
    cursor: pointer; line-height: var(--lh-snug);
    transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.photo-size input { grid-row: span 2; width: 20px; height: 20px; margin: 0; }
.photo-size__name { font-weight: 600; font-size: var(--fs-sm); }
.photo-size__dim { grid-column: 2; font-size: var(--fs-xs); color: var(--color-muted); }
.photo-size:hover { border-color: var(--color-ink-soft); background: var(--color-surface); }
.photo-size:has(input:checked) { border-color: var(--color-brand-text); background: var(--color-brand-light); box-shadow: inset 0 0 0 1px var(--color-brand-text); }
.photo-size:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); }
.photo-custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 14rem)); gap: 0 var(--sp-4); align-items: end; margin-top: var(--sp-3); }
.photo-custom[hidden] { display: none; }
.photo-custom .field { margin-bottom: var(--sp-3); }
.photo-custom .btn { margin-bottom: var(--sp-3); }
.photo-custom .field__error { grid-column: 1 / -1; margin: 0; }
.photo-custom .field__error:empty { display: none; }
.photo-hint { max-width: 62ch; margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-sm); color: var(--color-ink-soft); }
.photo-hint:empty { display: none; }
.photo-jump { margin: 0; font-size: var(--fs-sm); font-weight: 600; }

/* ---------- 15. Motion guard: keep colour feedback, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .btn:hover, .btn:active, .contact-card:hover,
    .back-to-top, .back-to-top.is-visible, .product-card::after { transform: none; }
    .is-entering { animation: none; }
}
