[hidden] {
    display: none !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font: 15px Arial,sans-serif;
    background: #f8f4fc;
    color: #211331;
}

button,input,select,textarea {
    font: inherit;
}

button,a {
    cursor: pointer;
}

button {
    border: 0;
    border-radius: 9px;
    padding: 11px 18px;
    background: #8318b8;
    color: white;
    font-weight: bold;
}

button:hover {
    background: #a02bda;
}

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

header {
    background: #230b3d;
    color: white;
}

.wrap {
    max-width: 1380px;
    margin: auto;
    padding: 0 24px;
}

.top {
    background: #401064;
    font-size: 13px;
}

.top .wrap,.main,.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}

.top a {
    margin-left: 18px;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    font-style: italic;
    white-space: nowrap;
}

.search {
    display: flex;
    flex: 1;
    max-width: 700px;
}

.search input {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 9px 0 0 9px;
}

.search button {
    border-radius: 0 9px 9px 0;
}

.nav {
    overflow: auto;
    white-space: nowrap;
    justify-content: space-between;
}

.nav a {
    padding: 10px 16px;
    border-radius: 30px;
}

.nav a.active,.nav a:hover {
    background: #8217b8;
}

.hero {
    min-height: 355px;
    display: grid;
    place-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center,#5d168b,#1c0735);
}

.hero:before,.hero:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32%;
    background-size: cover;
    background-position: center;
}

.hero:before {
    left: 0;
    background-image: linear-gradient(90deg,transparent 60%,#350c56),url(../images/hero-01.jpg);
}

.hero:after {
    right: 0;
    background-image: linear-gradient(270deg,transparent 60%,#350c56),url(../images/hero-02.jpg);
}

.hero-content {
    z-index: 1;
    max-width: 650px;
    padding: 30px 12px;
}

.hero h1 {
    font-size: clamp(30px,4vw,60px);
    font-style: italic;
    margin: 0;
    text-shadow: 0 4px 12px #10001f;
}

.hero h2 {
    font-size: clamp(19px,2.5vw,32px);
    margin: 15px 0;
    background: linear-gradient(90deg,transparent,#9225d0,transparent);
    padding: 8px;
}

.hero button {
    box-shadow: 0 0 18px #d46aff;
    border: 1px solid #e4a4ff;
    font-size: 19px;
}

.benefits {
    background: #eadcf8;
}

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

.benefits small {
    display: block;
    margin-top: 5px;
}

.section-title {
    border-left: 6px solid #8318b8;
    padding-left: 12px;
    margin: 24px 0 14px;
}

.cats,.products {
    display: grid;
    gap: 12px;
}

.cats {
    grid-template-columns: repeat(7,1fr);
}

.cats button {
    background: #ede2fa;
    color: #30134c;
    min-height: 84px;
    box-shadow: 0 2px 4px #d8c9e7;
}

.cats button:hover,.cats button.active {
    background: #8318b8;
    color: white;
}

.cats span {
    display: block;
    font-size: 26px;
    margin-bottom: 6px;
}

.products {
    grid-template-columns: repeat(4,1fr);
}

.product {
    background: white;
    border: 1px solid #e6d9ef;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 3px 8px #32134c0b;
}

.product img {
    width: 35%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
}

.product h3 {
    font-size: 16px;
    margin: 5px 0;
    cursor: pointer;
}

.product p {
    margin: 6px 0;
}

.price {
    color: #75139e;
    font-weight: bold;
}

.product button {
    padding: 8px 12px;
    width: 100%;
}

.stars {
    color: #e9a018;
}

footer {
    margin-top: 35px;
    background: #230b3d;
    color: white;
    padding: 30px 0;
}

footer a {
    display: inline-block;
    margin: 8px 18px 8px 0;
}

dialog {
    border: 0;
    border-radius: 16px;
    width: min(560px,94vw);
    padding: 24px;
    box-shadow: 0 12px 60px #0005;
}

dialog::backdrop {
    background: #160822aa;
}

.close {
    float: right;
    background: #eee;
    color: #32134c;
    padding: 7px 12px;
}

.field {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #d9c9e6;
    border-radius: 8px;
    margin: 10px 0;
}

.cartrow {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.cartrow strong {
    flex: 1;
}

.cartrow button {
    padding: 6px 10px;
}

.muted {
    color: #796a85;
}

.notice {
    padding: 12px;
    background: #f1e5fc;
    border-radius: 8px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.toolbar select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

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

    .cats {
        grid-template-columns: repeat(4,1fr);
    }

    .main {
        flex-wrap: wrap;
    }

    .search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .hero:before,.hero:after {
        opacity: .45;
    }

    .top .wrap {
        flex-wrap: wrap;
        gap: 8px;
    }

}

@media(max-width:550px) {
    .wrap {
        padding-inline: 12px;
    }

    .logo {
        font-size: 20px;
    }

    .products {
        grid-template-columns: 1fr;
    }

    .cats {
        grid-template-columns: repeat(3,1fr);
    }

    .benefits .wrap {
        grid-template-columns: repeat(2,1fr);
    }

    .hero {
        min-height: 300px;
    }

    .top a {
        margin-left: 8px;
    }

    .nav {
        gap: 4px;
    }

    .hero-content {
        padding: 20px;
    }

    .product img {
        max-width: 100px;
    }

}
