﻿:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #e5e7eb;
    --radius: 18px;
    --shadow: 0 8px 30px rgba(2,6,23,.08);
}

* {
    box-sizing: border-box
}

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    -webkit-tap-highlight-color: transparent
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px
}

header {
    display: flex;
    gap: 10px;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(245,247,251,.85);
    backdrop-filter: blur(8px);
    padding: 10px 0;
    z-index: 30
}

    header img {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        object-fit: cover
    }

    header .title {
        font-weight: 800
    }

.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px
}

@media (min-width:760px) {
    .cat-grid {
        grid-template-columns: 1fr 1fr 1fr
    }
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--accent);
    box-shadow: var(--shadow);
    cursor: pointer
}

.media {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block
}

.badge {
    position: absolute;
    inset: auto 10px 10px 10px;
    background: rgba(15,23,42,.72);
    color: #fff;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
	font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
	text-transform: uppercase;
    gap: 10px
}

.count {
    font-size: 12px;
    opacity: .9;
	display: none;
}

.subwrap {
    display: none
}

    .subwrap.show {
        display: block
    }

.backline {
    display: none;
    align-items: center;
    gap: 10px;
    margin: 10px 0
}

    .backline.show {
        display: flex;
        flex-wrap: wrap
    }

.backbtn {
    border: 1px solid var(--accent);
    background: var(--card);
    border-radius: 12px;
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer
}

.crumb {
    font-weight: 800;
    color: var(--muted)
}

    .crumb b {
        color: #0f172a
    }

.substicky {
    position: sticky;
    top: 64px;
    z-index: 20;
    padding: 6px 0 8px;
    background: linear-gradient(180deg, rgba(245,247,251,.96), rgba(245,247,251,0.88) 70%, rgba(245,247,251,0) 100%);
    backdrop-filter: blur(6px)
}

.subtitle {
    font-weight: 800;
    color: var(--muted);
    margin: 2px 2px 8px
}

.sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

@media (min-width:760px) {
    .sub-grid {
        grid-template-columns: 1fr 1fr 1fr
    }
}

.sub-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--accent);
    box-shadow: var(--shadow);
    cursor: pointer
}

.sub-media {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block
}

.sub-name {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: rgba(15,23,42,.78);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: .3px
}

.sub-card.active {
    outline: 3px solid #0f172a
}

.chipbar {
    display: none;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px
}

.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--accent);
    background: var(--card);
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
    box-shadow: var(--shadow);
    cursor: pointer
}

    .chip img {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid var(--accent)
    }

    .chip.active {
        background: #0f172a;
        color: #fff
    }

.chipbar::-webkit-scrollbar {
    display: none
}

.toggle-view {
    border: none;
    background: transparent;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    margin-left: 6px;
    text-decoration: underline
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px
}

.item {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow)
}

.thumb {
    width: 100%;
    height: 140px;
    border-radius: 14px;
    background: #eef0f4;
    border: 1px solid var(--accent);
    object-fit: cover
}

.item h3 {
    margin: 0 0 6px
}

.price {
    margin-top: 4px;
    font-weight: 800
}

@media (min-width:780px) {
    .item {
        grid-template-columns: 1fr 220px
    }

    .thumb {
        height: 160px
    }
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50
}

    .modal.show {
        display: flex
    }

.sheet {
    max-width: 920px;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    position: relative
}

@media (min-width:760px) {
    .sheet {
        grid-template-columns: 1.1fr .9fr
    }
}

.sheet-media {
    width: 100%;
    height: 320px;
    object-fit: cover;
    background: #f3f4f6
}

.sheet-body {
    padding: 18px
}

.sheet-title {
    margin: 0 0 8px;
    font-size: 22px
}

.sheet-price {
    font-weight: 800;
    font-size: 20px
}

.sheet-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fff;
    border: 1px solid var(--accent);
    border-radius: 50%;
    height: 40px;
    width: 40px;
    font-size: 20px;
    cursor: pointer
}

.hidden {
    display: none !important
}

.chip img {
    display: none !important
}
