/* Skořápka eshopu — hlavička, navigace, patička a mřížka výpisu.
   Renderuje se staticky, takže se nesmí spoléhat na nic, co dodá až MudBlazor:
   tyhle styly musí fungovat samy o sobě, ještě než se stáhne WebAssembly.

   Barvy zrcadlí EshopTheme.cs (Client/Theme). Když se mění tam, měň i tady. */

:root {
    --ink: #1a2129;
    --ink-soft: #5b6b78;
    --paper: #f7f5f2;
    --surface: #ffffff;
    --line: #e2ded8;
    --steel: #12181d;
    --steel-soft: #2a343d;
    --brass: #9a6a28;
    --brass-bright: #d6a657;
    --ok: #2f6b4f;
    --warn: #9a6a28;
    --gone: #a32c2c;

    --shell: min(1280px, 100% - 2rem);
    --sans: 'IBM Plex Sans', 'Segoe UI', sans-serif;
    --condensed: 'IBM Plex Sans Condensed', 'IBM Plex Sans', 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', 'Cascadia Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.shop {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- hlavička ---------------------------------------------------------- */

.shop-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--steel);
    color: var(--paper);
}

.shop-header__inner {
    width: var(--shell);
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
}

.shop-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -.01em;
}

.shop-brand:hover {
    text-decoration: none;
}

/* Čepel: úzký klín s mosaznou ostřím. Značka bez obrázku, aby se nic nedonačítalo. */
.shop-brand__mark {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--brass-bright) 0 48%, var(--paper) 48% 100%);
    clip-path: polygon(0 100%, 72% 0, 100% 22%, 28% 100%);
}

.shop-search {
    display: flex;
    align-items: stretch;
    max-width: 32rem;
}

.shop-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: .5rem .7rem;
    font: inherit;
    font-size: .95rem;
    color: var(--paper);
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--steel-soft);
    border-right: 0;
}

.shop-search input::placeholder {
    color: rgba(247, 245, 242, .5);
}

.shop-search input:focus {
    outline: 2px solid var(--brass-bright);
    outline-offset: -2px;
}

.shop-search button {
    padding: .5rem .9rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--steel);
    background: var(--brass-bright);
    border: 1px solid var(--brass-bright);
    cursor: pointer;
}

.shop-account {
    display: flex;
    gap: 1rem;
    font-size: .9rem;
    white-space: nowrap;
}

/* ---- navigace kategorií ------------------------------------------------ */

.shop-nav {
    border-top: 1px solid var(--steel-soft);
    background: rgba(0, 0, 0, .25);
}

.shop-nav__list {
    width: var(--shell);
    margin-inline: auto;
    padding: 0;
    list-style: none;
    display: flex;
    gap: .25rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.shop-nav__item {
    position: relative;
    flex: 0 0 auto;
}

.shop-nav__link {
    display: inline-flex;
    align-items: baseline;
    gap: .4rem;
    padding: .6rem .85rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
}

.shop-nav__link:hover {
    text-decoration: none;
    border-bottom-color: var(--brass-bright);
}

.shop-nav__count {
    font-family: var(--mono);
    font-size: .7rem;
    color: rgba(247, 245, 242, .45);
}

/* Podkategorie na dotykovém zařízení nemají hover — proto jen doplněk pro myš. */
.shop-nav__sub {
    display: none;
}

@media (hover: hover) and (min-width: 48rem) {
    .shop-nav__sub {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 14rem;
        margin: 0;
        padding: .35rem 0;
        list-style: none;
        background: var(--steel);
        border: 1px solid var(--steel-soft);
    }

    .shop-nav__item:hover .shop-nav__sub,
    .shop-nav__item:focus-within .shop-nav__sub {
        display: block;
    }

    .shop-nav__sub a {
        display: block;
        padding: .35rem .85rem;
        font-size: .9rem;
    }
}

/* ---- obsah a patička --------------------------------------------------- */

.shop-main {
    flex: 1 1 auto;
    width: var(--shell);
    margin-inline: auto;
    padding-block: 1.75rem 3rem;
}

.shop-footer {
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.shop-footer__inner {
    width: var(--shell);
    margin-inline: auto;
    padding-block: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 2rem;
    justify-content: space-between;
}

.shop-footer__note {
    margin: 0;
    font-size: .85rem;
    color: var(--ink-soft);
}

/* ---- mobil ------------------------------------------------------------- */

@media (max-width: 47.99rem) {
    .shop-header__inner {
        grid-template-columns: 1fr auto;
        row-gap: .5rem;
        padding-block: .5rem;
    }

    .shop-search {
        grid-column: 1 / -1;
        grid-row: 2;
        max-width: none;
    }

    .shop-main {
        padding-block: 1.25rem 2.5rem;
    }
}

/* ---- chybová lišta Blazoru --------------------------------------------- */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: .8rem 1.25rem;
    color: var(--paper);
    background: var(--gone);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, .3);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .5rem;
    right: .75rem;
    cursor: pointer;
}
