:root {
    color-scheme: light;
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #17191d;
    --muted: #626a76;
    --line: #dfe3ea;
    --accent: #d0414d;
    --webhallen-blue: #0055a6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.top {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

h1 {
    margin: 0;
    font-size: 40px;
}

h1 .site-title,
h1 .site-title:link,
h1 .site-title:visited,
h1 .site-title:active {
    color: var(--text);
    text-decoration: none;
    transition: color .15s ease;
}

h1 .site-title span {
    color: inherit;
    transition: color .15s ease;
}

h1 .site-title:hover {
    color: var(--text);
}

h1 .site-title:hover span {
    color: var(--webhallen-blue);
}

.lede {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--muted);
}

.filters {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr .7fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

select,
button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}

select {
    width: 100%;
    background: #fff;
    padding: 0 10px;
}

button {
    cursor: pointer;
    border-color: var(--text);
    background: var(--text);
    color: #fff;
    padding: 0 18px;
    font-weight: 800;
    transition: background .15s ease, border-color .15s ease;
}

button:hover,
button:focus-visible {
    border-color: var(--webhallen-blue);
    background: var(--webhallen-blue);
}

.notice {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
}

.notice.error {
    border-color: #f2b8bf;
    background: #fff0f2;
    color: #9d1b2a;
}

.products {
    display: grid;
    gap: 10px;
}

.product {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 150px 120px;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.product img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.product-main {
    min-width: 0;
}

.product-main a {
    display: block;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.product-main a:hover {
    text-decoration: underline;
}

.product-main span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-stock {
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
}

.product-price {
    font-size: 20px;
    font-weight: 900;
    text-align: right;
}

@media (max-width: 840px) {
    .top,
    .filters {
        display: block;
    }

    .product {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 8px 12px;
        align-items: start;
    }

    .product img {
        grid-row: 1 / span 3;
        width: 64px;
        height: 64px;
    }

    .product-main,
    .product-stock,
    .product-price {
        grid-column: 2;
        min-width: 0;
    }

    .product-main span {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }

    .filters label,
    .filters button {
        margin-top: 12px;
    }

    .product-stock,
    .product-price {
        text-align: left;
    }

    h1 {
        font-size: 32px;
    }
}
