:root {
    --brand: #d1001f;
    --border: #e6e6e6;
    --muted: #666;
    --card: #fff;
    --bg: #fff;
    --fg: #111;
    --bg-headings: #f2f2f2;
    --shadow: 0 0.75rem 2rem rgba(0, 0, 0, .12);
    --max-width: 1200px;
    /* top-divisions - start */
    --bg-top: var(--bg-headings);
    --color-top-megaflex: #4b4b49;
    --color-top-razitka: #dc291e;
    --color-top-lasery: #00243D;
    --color-top-orientacni: #B8D476;
    --color-top-materialy: #2774B9;
    --color-top-blog: #CE4A20;
    --color-top-eshop: #A39E9E;
    /* top-divisions - end */
}

html,
body,
div,
p,
button,
a,
input,
select,
textarea {
    font-family: 'DaxPro', system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans', 'DejaVu Sans', Arial, sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--fg);
    background: var(--bg);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* #region - top divisions */
.topdivisions {
    padding: 0;
    max-width: none;
    background-color: var(--bg-top);
}

.topdivisions ul {
    margin: 0 auto;
    padding: 0.5rem 0 0 0;
    text-align: center;
}

.topdivisions li {
    display: inline-block;
    margin: 0;
}

.topdivisions li a {
    display: inline-block;
    border-bottom: 2px solid;
    font-family: "DaxPro";
    font-weight: 300;
    font-size: 0.75rem;
    line-height: normal;
    margin: 0;
    padding: 6px 10px;
    border-radius: 0.5rem 0.5rem 0 0;
    vertical-align: bottom;
    color: #666;
}

.topdivisions li.active a {
    font-weight: bold;
}

.topdivisions li:hover a {
    transition: all 0.5s ease;
    color: #fff;
}

#top-mega a {
    border-color: var(--color-top-megaflex);
}

#top-mega:hover a {
    background-color: var(--color-top-megaflex);
}

#top-raz a {
    border-color: var(--color-top-razitka);
}

#top-raz:hover a {
    background-color: var(--color-top-razitka);
}

#top-las a {
    border-color: var(--color-top-lasery);
}

#top-las:hover a {
    background-color: var(--color-top-lasery);
}

#top-tri a {
    border-color: var(--color-top-orientacni);
}

#top-tri:hover a {
    background-color: var(--color-top-orientacni);
}

#top-mat a {
    border-color: var(--color-top-materialy);
}

#top-mat:hover a {
    background-color: var(--color-top-materialy);
}

#top-blog a {
    border-color: var(--color-top-blog);
}

#top-blog:hover a {
    background-color: var(--color-top-blog);
}

#top-shop a {
    border-color: var(--color-top-eshop);
}

#top-shop:hover a {
    background-color: var(--color-top-eshop);
}

/* #endregion - top divisions */

header {
    background-color: var(--bg-headings);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

body>div,
main,
.contactWrap {
    max-width: var(--max-width);
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 1rem;
}

main {
    flex: 1;
}

footer {
    background-color: var(--bg-headings);
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding: 2rem;
}

a {
    color: #000;
    text-decoration: none
}

a:hover {
    color: var(--brand)
}


.siteTop {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(0.5rem, 1vw + 0.3rem, 1rem);
    align-items: center;
}

.logoBlock {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.logoBlock img {
    width: 180px;
    max-width: 40vw;
    height: auto;
    display: block;
}

.tagline {
    text-transform: uppercase;
    font-weight: 500;
    font-size: clamp(1rem, calc(1vw + 0.8rem), 1.5rem);
    letter-spacing: .3px;
    line-height: 1;
    margin-top: 4px;
    color: rgba(0, 0, 0, .5);
}

.topLinks {
    justify-self: end;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.topLinks a {
    text-align: end;
    padding: 6px 0.5rem;
    border-radius: 0.5rem;
    font-size: clamp(0.8rem, calc(1vw + 0.6rem), 1.2rem);
}

.searchBar {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem 8px 1rem;
    display: flex;
    justify-content: flex-end;
}

.searchBar input {
    width: 22rem;
    max-width: 55vw;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.filters.wrap {}

.filtersGrid {
    display: flex;
    flex-wrap: wrap;
    /* display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr; */
    gap: 0.75rem;
    align-items: start;
}

.msel {
    position: relative;
    display: block;
    flex: auto;
    max-width: 30vw;
    min-width: fit-content;
}

.msel-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
}

.msel-btn .lbl {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

.msel-btn .sel {
    color: var(--muted);
    font-size: 0.75rem;
    /* white-space: nowrap; */
}

.msel.open .msel-panel {
    display: block;
}

.msel-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 10px;
    box-shadow: var(--shadow);
    max-height: 320px;
    overflow: auto;
    z-index: 20;
}

.msel-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.msel-actions .act {
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.msel-actions .act-search {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.msel-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.msel-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.filtersTools {
    display: flex;
    align-items: center;
    justify-content: end;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0 1rem 1rem 1rem;
    color: #666;
    font-size: 0.75rem;
}

#counter {
    font-size: 0.85rem;
}

select#sort {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.btn {
    padding: 8px 0.75rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.btnPrimary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.infoBlock {
    max-width: var(--max-width);
    color: #666;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 300;
}

.infoBlock p {
    margin: 6px 0;
}

.resultsLabel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.favLabel,
.foundLabel {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #444;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem
}

.card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    /* overflow: hidden; */
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px)
}

.card:focus-within {
    outline: 2px solid rgba(209, 0, 31, .8)
}

.thumb {
    /* width: 100%; */
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: hidden; */
    padding: 0.75rem;
    border-radius: 0.75rem;
}

.thumbInner {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f6f6;
    padding: 0.75rem;
}

.thumb img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: 120px;
    mix-blend-mode: multiply;
}

.content {
    padding: 0 0.75rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.code {
    font-size: 11px;
    color: #777;
}

.name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
}

.sub {
    font-size: 0.75rem;
    color: #777;
    text-transform: lowercase;
}

.row {
    font-size: 0.75rem;
    color: #555;
    display: flex;
    gap: 0.37em;
    flex-wrap: wrap;
}

.pill {
    font-size: 11px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 2px 8px
}

.notes {
    font-size: 0.75rem;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
}

.empty {
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    padding: 24px;
    text-align: center;
    color: #999;
    margin-top: 8px;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    z-index: 50;
    padding: 1rem;
    overflow: auto;
    max-width: 100vw;
    max-height: 100vh;
}

.modal.open {
    display: flex;
}

.sheet {
    /* width: 100%; */
    max-width: 740px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.sheetHead {
    display: flex;
    flex-direction: column;
    /* display: grid;
    grid-template-columns: 240px 1fr; */
    gap: 14px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.sheetImg {
    text-align-last: center;
    /* display: flex;
    align-items: center;
    justify-content: center; */
    overflow: hidden;
    border-radius: 0.75rem;
    /* border: 1px solid var(--border); */
    /* padding: 0.75rem; */
    background: #fff;
}

.sheetImg img {
    max-width: 100%;
    max-height: 50vh;
}

.sheetInfo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sheetCode {
    font-size: 0.75rem;
    color: #777;
}

.sheetName {
    font-size: 18px;
    font-weight: 800;
}

.sheetSub {
    font-size: 13px;
    color: #666;
}

.price {
    font-size: 14px;
    color: #111;
    font-weight: 700;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    background: #fafafa;
}

.sheetBody {
    padding: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.sheetActions {
    padding: 0.75rem 14px 14px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: end;
}

.sheetActions>*:first-child {
    margin-right: auto;
}

.btnGhost {
    background: #fff;
    border-color: var(--border);
}

.closePill {
    position: absolute;
    top: 10px;
    right: 1rem;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.contactWrap {
    /* max-width: var(--max-width); */
    /* margin: 0 auto; */
    /* padding: 1rem; */
    color: #666;
    font-size: 0.8rem;
    line-height: 1.5;
}


.contactCols {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

@media (max-width: 1020px) {
    .filtersGrid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .topLinks {
        gap: 0;
    }

    .sheetImg img {
        max-height: 40vh;
    }

    .filtersGrid {
        grid-template-columns: 1fr 1fr;
    }

    .searchBar {
        justify-content: center;
    }

    .msel {
        max-width: 100vw;
    }
}

/* #region - fonts */
/* DaxPro (Megaflex own font) */
/* - konverze OTF / TTF do woff2 : https://fontsource.org/tools/converter */
@font-face {
    font-family: "DaxPro";
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/DaxPro-Light.woff2') format('woff2');
}

@font-face {
    font-family: "DaxPro";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/DaxPro-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'DaxPro';
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    src: url('/fonts/DaxPro-Medium.woff2') format('woff2');
}
/* #endregion - fonts */