/* 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 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;
    align-items: center;
    gap: 1rem;
    font-size: .9rem;
    white-space: nowrap;
}

.cart-badge {
    display: inline-flex;
    align-items: baseline;
    gap: .35rem;
    font-size: .9rem;
    white-space: nowrap;
}

.cart-badge__count {
    font-family: var(--mono);
    font-size: .75rem;
    color: var(--brass-bright);
}

/* Set by wwwroot/js/cart.js after every write - an empty count means an empty cart. */
.cart-badge__count:empty {
    display: none;
}

/* ---- 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);
}

.shop-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.25rem;
    font-size: .85rem;
}

/* ---- souhlas s cookies ---------------------------------------------------- */

.consent {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 60rem;
    margin-inline: auto;
    padding: 1rem 1.25rem;
    color: #e8e4de;
    background: var(--steel);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
}

.consent[hidden] {
    display: none;
}

.consent__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
}

.consent__text {
    flex: 1 1 24rem;
    margin: 0;
    font-size: .88rem;
}

.consent__text a {
    color: var(--brass-bright);
}

.consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.consent__accept,
.consent__reject,
.consent__settings {
    padding: .5rem 1rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
}

/* Both choices look equally easy to pick - a dimmed "reject" would not be a free choice. */
.consent__accept {
    color: var(--steel);
    background: var(--brass-bright);
    border: 1px solid var(--brass-bright);
}

.consent__reject {
    color: var(--steel);
    background: #e8e4de;
    border: 1px solid #e8e4de;
}

.consent__settings {
    color: #e8e4de;
    background: transparent;
    border: 1px solid #e8e4de;
}

.consent__detail {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(232, 228, 222, .25);
}

.consent__detail[hidden] {
    display: none;
}

.consent__category label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.consent__category p {
    margin: .2rem 0 0 1.5rem;
    font-size: .85rem;
}

/* ---- náhled zákazníka ------------------------------------------------------ */

.preview-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem 1.5rem;
    padding: .7rem 1rem;
    font-size: .9rem;
    color: var(--steel);
    background: var(--brass-bright);
    box-shadow: 0 -.25rem 1rem rgba(0, 0, 0, .25);
}

.preview-bar form {
    margin: 0;
}

.preview-bar button {
    padding: .4rem .9rem;
    font-family: var(--condensed);
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--steel);
    border: 1px solid var(--steel);
    cursor: pointer;
}

/* Keeps the last line of the footer from hiding under the bar. */
body:has(.preview-bar) {
    padding-bottom: 4.5rem;
}

.shop-footer__identity {
    width: var(--shell);
    margin-inline: auto;
    padding-bottom: 1.5rem;
    font-size: .78rem;
    color: var(--ink-soft);
}

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

@media (max-width: 47.99rem) {
    .shop-header__inner {
        grid-template-columns: 1fr auto 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;
}

/* ---- formuláře účtu ----------------------------------------------------- */

/* Přihlášení a změna hesla se renderují staticky, takže se nesmí spoléhat na
   MudBlazor — ten na těchhle stránkách vůbec neběží. */

.auth {
    max-width: 26rem;
    margin: 2rem auto;
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
}

.auth__title {
    margin: 0 0 .35rem;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 1.6rem;
}

.auth__lead {
    margin: 0 0 1.5rem;
    font-size: .9rem;
    color: var(--ink-soft);
}

.auth__field {
    margin-bottom: 1rem;
}

.auth__label {
    display: block;
    margin-bottom: .3rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.auth__input {
    width: 100%;
    padding: .55rem .7rem;
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
}

.auth__input:focus {
    outline: 2px solid var(--brass);
    outline-offset: -2px;
}

/* Neplatné pole dostane rámeček navíc — samotná hláška pod polem se na delším
   formuláři snadno přehlédne. */
.auth__input.invalid {
    border-color: var(--gone);
}

.auth__check {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.auth__submit {
    width: 100%;
    padding: .6rem 1rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--steel);
    background: var(--brass-bright);
    border: 1px solid var(--brass-bright);
    cursor: pointer;
}

.auth__submit:hover {
    background: var(--brass);
    border-color: var(--brass);
    color: var(--paper);
}

.auth__error {
    display: block;
    margin-top: .3rem;
    font-size: .85rem;
    color: var(--gone);
}

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

.auth__note a {
    text-decoration: underline;
}

.status {
    margin: 0 0 1.25rem;
    padding: .6rem .8rem;
    font-size: .9rem;
    border-left: 3px solid;
}

.status--ok {
    color: var(--ok);
    background: rgba(47, 107, 79, .08);
    border-color: var(--ok);
}

.status--error {
    color: var(--gone);
    background: rgba(163, 44, 44, .08);
    border-color: var(--gone);
}

/* Dvě pole vedle sebe (jméno a příjmení, město a PSČ) — na úzkém displeji pod sebou. */
.auth__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.auth__hint {
    display: block;
    margin-top: .3rem;
    font-size: .8rem;
    color: var(--ink-soft);
}

.auth__subtitle {
    margin: 1.5rem 0 .75rem;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Tlačítka Google / Facebook pod formulářem — zobrazí se jen při nastavených klíčích. */
.auth__external {
    margin-top: 1.5rem;
}

.auth__divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
}

.auth__divider::before,
.auth__divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

.auth__provider {
    display: block;
    width: 100%;
    margin-bottom: .6rem;
    padding: .55rem 1rem;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    cursor: pointer;
}

.auth__provider:hover {
    border-color: var(--ink-soft);
}

/* Odkaz vzhledem tlačítka („Přidat adresu“). */
.auth__submit--link {
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

.auth__submit--danger {
    color: #fff;
    background: var(--gone);
    border-color: var(--gone);
}

.auth__submit--danger:hover {
    background: var(--gone);
    border-color: var(--gone);
    color: #fff;
    filter: brightness(.9);
}

@media (max-width: 34rem) {
    .auth__row {
        grid-template-columns: 1fr;
    }
}

/* ---- zákaznický účet ---------------------------------------------------- */

.account {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    margin: 2rem 0;
}

.account__nav {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-family: var(--condensed);
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.account__nav a,
.account__logout {
    display: block;
    width: 100%;
    padding: .5rem .75rem;
    font: inherit;
    text-align: left;
    color: var(--ink);
    background: none;
    border: 0;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.account__nav a:hover,
.account__logout:hover {
    background: var(--surface);
}

.account__nav a.active {
    border-left-color: var(--brass-bright);
    background: var(--surface);
}

.account__logout {
    margin-top: .75rem;
    color: var(--ink-soft);
}

/* Karta v účtu je širší než přihlašovací formulář a nemá vlastní okraje — ty dává mřížka. */
.account-panel {
    max-width: 42rem;
    margin: 0;
}

.address-list {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.address-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-bottom: .75rem;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--line);
}

.address-card__body {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    font-size: .9rem;
}

.address-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
}

.address-card__tags:empty {
    display: none;
}

.address-card__tag {
    padding: .1rem .5rem;
    font-size: .75rem;
    color: var(--ok);
    background: rgba(47, 107, 79, .1);
}

.address-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    font-size: .85rem;
}

.address-card__actions a,
.address-card__actions button {
    padding: 0;
    font: inherit;
    color: var(--ink);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

.address-card__actions .address-card__danger {
    color: var(--gone);
}

/* Řádek seznamu oblíbených: obrázek, údaje o zboží a akce vedle sebe. */
.wishlist-item {
    align-items: center;
}

.wishlist-item img {
    flex: 0 0 auto;
    object-fit: cover;
}

.wishlist-item__body {
    flex: 1 1 auto;
}

.wishlist-item__watch {
    display: flex;
    flex: 1 0 100%;
    flex-direction: column;
    gap: .4rem;
    padding-top: .6rem;
    font-size: .85rem;
    border-top: 1px solid var(--line);
}

.wishlist-item__watch form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin: 0;
}

.wishlist-item__watch button {
    padding: 0;
    font: inherit;
    color: var(--ink);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

.wishlist-item__price {
    width: 7rem;
    padding: .25rem .4rem;
    font: inherit;
    background: var(--paper);
    border: 1px solid var(--line);
}

.wishlist-item__sent {
    color: var(--ink-soft);
}

.wishlist-item--unavailable img,
.wishlist-item--unavailable .wishlist-item__body {
    opacity: .6;
}

@media (max-width: 46rem) {
    .account {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .account__nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .account__nav a,
    .account__logout {
        width: auto;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .account__nav a.active {
        border-bottom-color: var(--brass-bright);
    }

    .account__logout {
        margin-top: 0;
    }
}

/* ---- chybové a informační stránky --------------------------------------- */

.page-message {
    max-width: 40rem;
    margin: 2rem auto;
}

.page-message h1 {
    margin: 0 0 .75rem;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 1.75rem;
}

.page-message__id code {
    font-family: var(--mono);
    font-size: .85em;
}

/* ---- právní stránky ------------------------------------------------------ */

/* Delší souvislý text než kdekoli jinde na webu, takže se řádek drží na šířce,
   která se dá číst bez ztrácení řádků. */
.legal {
    max-width: 44rem;
    margin: 2rem auto 3rem;
}

.legal h1 {
    margin: 0 0 .75rem;
    font-family: var(--condensed);
    font-weight: 700;
    font-size: 1.75rem;
}

.legal h2 {
    margin: 2rem 0 .6rem;
    font-family: var(--condensed);
    font-weight: 600;
    font-size: 1.15rem;
}

/* MudBlazor nuluje odsazení odstavců a seznamů pro celý dokument, takže si je
   souvislý text musí nastavit sám. */
.legal p,
.legal li {
    line-height: 1.65;
}

.legal p {
    margin: 0 0 .9rem;
}

.legal ul,
.legal ol {
    margin: 0 0 .9rem;
    padding-left: 1.25rem;
}

.legal li {
    margin-bottom: .35rem;
}

.legal__lead {
    color: var(--ink-soft);
}

.legal__facts {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: .4rem 1rem;
    margin: 0 0 1rem;
}

.legal__facts dt {
    font-family: var(--condensed);
    font-weight: 600;
    color: var(--ink-soft);
}

.legal__facts dd {
    margin: 0;
}

/* Formulář k vytištění nebo zkopírování do e-mailu - tečkované linky drží tvar
   jen v neproporcionálním písmu. */
.legal__form {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: .8rem;
    line-height: 1.7;
    white-space: pre-wrap;
    background: var(--surface);
    border: 1px solid var(--line);
}

/* Místo, kam teprve přijde skutečný text. Musí být vidět na první pohled,
   aby podmínky nikdo nepustil do ostrého prodeje nedopsané. */
.legal__todo {
    padding: .6rem .9rem;
    color: var(--warn);
    background: rgba(176, 129, 63, .08);
    border-left: 3px solid var(--warn);
}

@media (max-width: 35rem) {
    .legal__facts {
        grid-template-columns: 1fr;
        gap: 0 0;
    }

    .legal__facts dt {
        margin-top: .6rem;
    }
}
