:root {
    --accent: #ef5b2a;
    --soft: #fff0e9;
    --ink: #17211f;
    --muted: #66736f;
    --line: #e4ebe8;
    --surface: #fff;
    --page: #f7f9f8;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font:
        500 15px/1.5 Manrope,
        system-ui,
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.shell {
    width: min(1180px, 100%);
    margin: auto;
    min-height: 100vh;
    background: var(--surface);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 34px);
    background: #fffffff2;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    background: var(--accent);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
}

.brand-copy strong {
    display: block;
    font-size: 0.95rem;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.7rem;
}

.top-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 11px;
    min-width: 42px;
    height: 42px;
    padding: 0 13px;
}

.back-link {
    text-decoration: none;
    font-weight: 700;
    color: var(--muted);
    font-size: 0.85rem;
}

.hero {
    padding: 28px clamp(18px, 5vw, 52px) 34px;
    background: linear-gradient(135deg, var(--soft), #fff);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 25px;
    align-items: end;
}

.open {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #23865f;
    font-size: 0.78rem;
    font-weight: 800;
}

.open:before {
    content: "";
    width: 8px;
    height: 8px;
    background: #32b578;
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    margin: 10px 0;
}

.hero p {
    color: var(--muted);
    margin: 0;
}

.hero-art {
    width: clamp(100px, 20vw, 170px);
    aspect-ratio: 1;
    border-radius: 35%;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-size: clamp(3.5rem, 9vw, 6rem);
    transform: rotate(5deg);
    box-shadow: 0 22px 50px color-mix(in srgb, var(--accent) 28%, transparent);
}

.sector-wrap {
    padding: 20px clamp(16px, 4vw, 34px) 8px;
}

.sector-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 9px;
}

.sector-tabs,
.categories {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
}

.sector-tabs::-webkit-scrollbar,
.categories::-webkit-scrollbar {
    display: none;
}

.sector-btn,
.cat-btn {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 99px;
    padding: 10px 15px;
    font-weight: 700;
    color: var(--muted);
}

.sector-btn.active,
.cat-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.catalog {
    padding: 12px clamp(16px, 4vw, 34px) 120px;
}

.tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 18px 0;
}

.tools h2 {
    font-size: 1.45rem;
    margin: 0;
}

.search {
    position: relative;
    max-width: 300px;
    flex: 1;
}

.search input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px 12px 38px;
    outline: none;
    background: #fff;
}

.search:before {
    content: "⌕";
    position: absolute;
    left: 14px;
    top: 7px;
    font-size: 1.35rem;
    color: var(--muted);
}

.categories {
    margin-bottom: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.card {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
    min-width: 0;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px #29443e12;
}

.visual {
    aspect-ratio: 1.2;
    background: var(--product-color);
    display: grid;
    place-items: center;
    position: relative;
    font-size: 4.5rem;
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #fff;
    color: var(--accent);
    padding: 6px 9px;
    border-radius: 99px;
    font-size: 0.67rem;
    font-weight: 800;
    box-shadow: 0 4px 14px #0001;
}

.card-body {
    padding: 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.category {
    color: var(--accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
}

.card h3 {
    font-size: 1rem;
    line-height: 1.3;
    margin: 7px 0;
}

.card p {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.price {
    font-size: 1.08rem;
    font-weight: 800;
}

.add {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1.35rem;
}

.empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 50px;
    color: var(--muted);
}

.floating-cart {
    position: fixed;
    z-index: 25;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(550px, calc(100% - 28px));
    border: 0;
    border-radius: 17px;
    background: #17211f;
    color: white;
    padding: 14px 18px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 18px 48px #10211e50;
}

.floating-cart.show {
    display: flex;
}

.floating-cart span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.count {
    background: var(--accent);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: #10211e80;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
}

.sheet-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.sheet {
    position: fixed;
    z-index: 41;
    background: #fff;
    right: 0;
    top: 0;
    height: 100%;
    width: min(480px, 100%);
    transform: translateX(100%);
    transition: 0.28s;
    display: flex;
    flex-direction: column;
    box-shadow: -25px 0 60px #0002;
}

.sheet.show {
    transform: none;
}

.sheet-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sheet-head h2 {
    margin: 0;
    font-size: 1.25rem;
}

.close {
    border: 0;
    background: #eef2f0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
}

.sheet-content {
    overflow: auto;
    padding: 20px;
    flex: 1;
}

.product-summary {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.mini-visual {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    flex: 0 0 auto;
}

.product-summary h3 {
    margin: 4px 0;
}

.product-summary p {
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0;
}

.option-group {
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

.option-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 800;
}

.required {
    font-size: 0.65rem;
    color: var(--accent);
    background: var(--soft);
    padding: 4px 7px;
    border-radius: 99px;
}

.choices {
    display: grid;
    gap: 9px;
}

.choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--soft);
}

.choice input {
    accent-color: var(--accent);
}

.swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swatch {
    border: 2px solid #fff;
    outline: 1px solid var(--line);
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.swatch.active {
    outline: 3px solid var(--accent);
}

.size-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-btn {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    min-width: 46px;
    padding: 10px;
}

.size-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.sheet-footer {
    padding: 15px 20px max(15px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
}

.primary {
    width: 100%;
    border: 0;
    background: var(--accent);
    color: #fff;
    padding: 15px;
    border-radius: 13px;
    font-weight: 800;
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.cart-row small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.remove {
    border: 0;
    background: none;
    color: #c44640;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 800;
    margin: 20px 0;
}

.demo-note {
    background: #fff8d9;
    color: #695615;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 680px) {
    .shell {
        width: 100%;
    }

    .topbar {
        height: 58px;
    }

    .back-link {
        display: none;
    }

    .brand-copy small {
        display: none;
    }

    .hero {
        padding: 22px 18px 28px;
    }

    .hero-art {
        width: 90px;
        border-radius: 28px;
    }

    .sector-wrap,
    .catalog {
        padding-left: 14px;
        padding-right: 14px;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .visual {
        font-size: 3.2rem;
    }

    .card-body {
        padding: 12px;
    }

    .card h3 {
        font-size: 0.9rem;
    }

    .card p {
        font-size: 0.72rem;
    }

    .price {
        font-size: 0.92rem;
    }

    .tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .search {
        max-width: none;
        width: 100%;
    }

    .sheet {
        top: auto;
        bottom: 0;
        height: auto;
        max-height: 92%;
        width: 100%;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
    }

    .sheet.show {
        transform: none;
    }

    .sheet-head:before {
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        transform: translateX(-50%);
        width: 42px;
        height: 4px;
        border-radius: 99px;
        background: #dce3e0;
    }

    .sheet-head {
        padding-top: 24px;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 370px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .visual {
        aspect-ratio: 1.7;
    }
}
