:root {
    --ink: #281b1d;
    --wine: #7f2631;
    --paper: #f8f4ee;
    --line: #e2d8cd;
    --muted: #756965
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.5 "DM Sans", sans-serif
}

button {
    font: inherit;
    cursor: pointer
}

img {
    display: block;
    width: 100%
}

.shell {
    width: min(1180px, calc(100% - 40px));
    margin: auto
}

.site-header {
    background: #fbf8f3;
    border-bottom: 1px solid var(--line)
}

.header-content {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.brand {
    display: flex;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
    font-family: "Playfair Display", serif;
    font-size: 25px;
    line-height: 1
}

.brand small {
    margin-top: 7px;
    color: var(--muted);
    font: 600 8px/1 "DM Sans", sans-serif;
    letter-spacing: .18em
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap
}

.header-tools b {
    color: var(--wine)
}

.search-trigger {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--wine)
}

.search-trigger svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8
}

.hero {
    background: #eee3d6
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px
}

.hero-copy {
    align-self: center;
    padding: 60px 8% 60px 0
}

.eyebrow {
    margin: 0 0 13px;
    color: var(--wine);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em
}

.hero h1,
.catalog h1,
.pieces h2 {
    font-family: "Playfair Display", serif;
    font-weight: 500;
    letter-spacing: -.045em
}

.hero h1 {
    margin: 0;
    font-size: clamp(3rem, 5.5vw, 5rem);
    line-height: .97
}

.hero-copy>p:not(.eyebrow) {
    max-width: 360px;
    margin: 22px 0;
    color: #554745
}

.benefits {
    display: flex;
    gap: 15px;
    margin-top: 35px
}

.benefits>div {
    display: flex;
    gap: 8px;
    flex: 1;
    align-items: flex-start;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25
}

.benefits svg {
    flex: 0 0 19px;
    width: 19px;
    fill: none;
    stroke: var(--wine);
    stroke-width: 1.5
}

.benefits small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 400
}

.hero-image {
    height: 500px;
    overflow: hidden
}

.hero-image img {
    height: 100%;
    object-fit: cover
}

.pieces {
    padding: 64px 0 58px;
    background: #fbf8f3
}

.pieces-head {
    text-align: center
}

.pieces h2 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1
}

.pieces-head>p:last-child {
    margin: 12px 0 28px;
    color: var(--muted);
    font-size: 13px
}

.category-carousel {
    position: relative
}

.category-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px 2px 14px;
    scroll-snap-type: x proximity;
    scrollbar-width: none
}

.category-track::-webkit-scrollbar {
    display: none
}

.category-card {
    display: flex;
    flex: 0 0 138px;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--ink);
    scroll-snap-align: start;
    text-align: center
}

.category-card img {
    width: 138px;
    height: 160px;
    overflow: hidden;
    border-radius: 14px;
    object-fit: cover;
    transition: transform .25s
}

.category-card:hover img,
.category-card:focus-visible img {
    transform: translateY(-3px)
}

.category-card:focus-visible {
    outline: 2px solid var(--wine);
    outline-offset: 4px;
    border-radius: 14px
}

.category-card span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2
}

.carousel-arrow {
    position: absolute;
    top: 65px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #fffc;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--wine)
}

.carousel-arrow:first-child {
    left: -16px
}

.carousel-arrow:last-child {
    right: -16px
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 5px
}

.carousel-dots:after {
    content: "•  ○  ○";
    color: var(--wine);
    font-size: 15px;
    letter-spacing: 3px
}

.catalog {
    padding: 65px 0 90px
}

.back-home {
    display: inline-block;
    margin-bottom: 34px;
    color: var(--wine);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none
}

.catalog-head {
    margin-bottom: 30px
}

.catalog h1 {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1
}

.catalog-head p:last-child {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 12px
}

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

.product-image {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    background: #fff;
    border: 0
}

.product-image img {
    height: 100%;
    object-fit: contain
}

.product-image span {
    position: absolute;
    top: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 6px;
    background: #fffb;
    color: var(--wine);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase
}

.product-card>div {
    padding: 10px 1px
}

.product-card small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase
}

.product-card strong {
    color: var(--wine);
    font-size: 15px
}

.load-more {
    display: block;
    margin: 38px auto 0;
    padding: 12px 22px;
    background: transparent;
    border: 1px solid var(--ink);
    font-size: 12px;
    font-weight: 700
}

.site-footer {
    padding: 28px 0;
    background: var(--ink)
}

.site-footer .brand {
    color: #fff
}

.image-dialog {
    width: min(92vw, 680px);
    padding: 0;
    overflow: visible;
    background: #fff;
    border: 0
}

.image-dialog::backdrop {
    background: #281b1d99
}

.image-dialog img {
    max-height: 75vh;
    object-fit: contain;
    background: #fff
}

.image-dialog>div {
    padding: 14px 18px
}

.image-dialog p {
    margin: 0;
    color: var(--muted);
    font-size: 10px
}

.image-dialog strong {
    color: var(--wine)
}

.dialog-close {
    position: absolute;
    top: -13px;
    right: -13px;
    width: 32px;
    height: 32px;
    background: var(--ink);
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 22px
}

@media(min-width:680px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 30px 20px
    }
}

@media(min-width:1000px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}

@media(min-width:1250px) {
    .products-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 24px 14px
    }
}

@media(max-width:619px) {
    .shell {
        width: min(100% - 28px, 1180px)
    }

    .header-content {
        min-height: 64px
    }

    .brand {
        font-size: 22px
    }

    .header-tools {
        gap: 8px;
        font-size: 10px
    }

    .search-trigger {
        width: 30px;
        height: 30px
    }

    .hero-grid {
        grid-template-columns: 1fr
    }

    .hero-copy {
        padding: 52px 0 38px
    }

    .hero h1 {
        font-size: 3.15rem
    }

    .benefits {
        gap: 10px;
        margin-top: 28px
    }

    .benefits>div {
        font-size: 9px
    }

    .benefits small {
        font-size: 8px
    }

    .hero-image {
        height: 290px;
        margin: 0 -14px
    }

    .pieces {
        padding: 46px 0 42px
    }

    .pieces h2 {
        font-size: 2.3rem
    }

    .pieces-head>p:last-child {
        font-size: 12px
    }

    .category-track {
        gap: 12px
    }

    .category-card {
        flex-basis: 116px;
        gap: 8px
    }

    .category-card img {
        width: 116px;
        height: 138px;
        border-radius: 12px
    }

    .category-card span {
        font-size: 11px
    }

    .carousel-arrow {
        display: none
    }

    .catalog {
        padding: 40px 0 65px
    }

    .back-home {
        margin-bottom: 23px
    }

    .catalog h1 {
        font-size: 2.5rem
    }
}