/* The homepage header lives directly on the hero image. */
body.home .header {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    color: #594744;
    background: transparent;
    box-shadow: none;
}

body.home .header.qoy-header--sticky {
    position: fixed;
    top: 0;
    height: 92px;
    background: rgba(246, 241, 235, .96);
    box-shadow: 0 8px 28px rgba(73, 57, 51, .09);
    backdrop-filter: blur(14px);
    transform: translateY(-110%);
    transition: transform .28s ease, background-color .28s ease, box-shadow .28s ease;
}

body.home .header.qoy-header--sticky.qoy-header--visible {
    transform: translateY(0);
}

body.home .header.qoy-header--sticky .logo,
body.home .header.qoy-header--sticky .logo img:first-child,
body.home .header.qoy-header--sticky .logo img:last-child {
    width: 142px;
}

body.admin-bar.home .header.qoy-header--sticky {
    top: 32px;
}

.home .qoy-sale-hero {
    position: relative;
    height: clamp(650px, 51vw, 880px);
    overflow: hidden;
    background: #e9e6e6;
}

.qoy-sale-hero picture {
    display: block;
    width: 100%;
    height: 100%;
}

.qoy-sale-hero picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.qoy-sale-hero .hero-copy {
    position: absolute;
    top: clamp(154px, 18%, 188px);
    right: auto;
    bottom: auto;
    left: max(48px, 7vw);
    color: #594744;
    text-align: left;
    transform: none;
}

.qoy-sale-hero .hero-copy p {
    margin: 0 0 18px;
    font-size: 11px;
    letter-spacing: .2em;
}

.qoy-sale-hero .hero-copy h1 {
    margin: 0 0 28px;
    font-size: clamp(74px, 7vw, 112px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: -.04em;
}

.qoy-sale-hero .hero-copy h1 span {
    display: block;
    margin-bottom: 10px;
    font-size: .4em;
    letter-spacing: 0;
}

.qoy-sale-hero .light-button {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 13px 24px;
    gap: 30px;
    border: 1px solid #86706d;
    border-radius: 2px;
    background: #86706d;
    color: #fff;
    font-size: 11px;
    letter-spacing: .06em;
}

.qoy-sale-hero .light-button:hover {
    background: #6f5b58;
}

.qoy-sale-hero .light-button:focus-visible {
    outline: 2px solid #594744;
    outline-offset: 4px;
}

/* Dense, slanted carousel from the original second-screen concept. */
.qoy-home-collections {
    width: min(1296px, calc(100% - 48px));
    margin: 72px auto 0;
}

.qoy-home-collections__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    width: min(1248px, calc(100% - 48px));
    margin: 0 auto 22px;
    gap: 24px;
}

.qoy-home-collections__head small {
    display: block;
    margin-bottom: 7px;
    color: #8b9094;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.qoy-home-collections__head h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
}

.qoy-home-collections__head p {
    max-width: 330px;
    margin: 0;
    color: #8b9094;
    font-size: 11px;
    line-height: 1.5;
    text-align: right;
}

.qoy-home-collections__track {
    display: flex;
    align-items: flex-start;
    height: 438px;
    margin: 0;
    padding: 0 34px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.qoy-home-collections__track::-webkit-scrollbar {
    display: none;
}

.qoy-home-collection {
    position: relative;
    isolation: isolate;
    display: block;
    flex: 0 0 220px;
    height: 438px;
    min-width: 0;
    margin-left: -29px;
    overflow: hidden;
    clip-path: polygon(17% 0, 100% 0, 83% 100%, 0 100%);
    background: #ece9e7;
    color: #fff;
    scroll-snap-align: start;
}

.qoy-home-collection:first-child {
    margin-left: 0;
}

.qoy-home-collection:nth-child(even) {
    height: 414px;
    margin-top: 24px;
}

.qoy-home-collection:nth-child(3n) {
    flex-basis: 238px;
}

.qoy-home-collection::after {
    position: absolute;
    z-index: 1;
    inset: 38% 0 0;
    background: linear-gradient(transparent, rgba(48, 38, 34, .66));
    content: "";
    pointer-events: none;
}

.qoy-home-collection__image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.qoy-home-collection__image img {
    position: absolute;
    top: 0;
    left: -14%;
    width: 128%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform .7s cubic-bezier(.2, .75, .25, 1), filter .35s ease;
}

.qoy-home-collection:hover .qoy-home-collection__image img,
.qoy-home-collection:focus-visible .qoy-home-collection__image img {
    transform: scale(1.045);
}

.qoy-home-collection:focus-visible {
    z-index: 3;
    outline: 2px solid #fff;
    outline-offset: -6px;
}

.qoy-home-collection__count {
    position: absolute;
    z-index: 2;
    top: 22px;
    right: 34px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: 10px;
    letter-spacing: .11em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .65);
}

.qoy-home-collection__meta {
    position: absolute;
    z-index: 2;
    right: 34px;
    bottom: 24px;
    left: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px 12px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .65);
}

.qoy-home-collection__meta strong {
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qoy-home-collection__meta small {
    grid-column: 1;
    overflow: hidden;
    font-size: 10px;
    letter-spacing: .02em;
    opacity: .94;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qoy-home-collection__meta i {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 20px;
    font-style: normal;
}

.qoy-home-collections__controls {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1248px, calc(100% - 48px));
    min-height: 48px;
    margin: 14px auto 0;
    color: #8b9094;
    font-size: 11px;
}

.qoy-home-collections__controls::before {
    position: absolute;
    top: 0;
    right: 104px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #86706d 0 32%, #ded8d5 32% 100%);
    content: "";
}

.qoy-home-collections__controls > div {
    display: flex;
    gap: 8px;
}

.qoy-home-collections__controls button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--brown);
    font-size: 20px;
    cursor: pointer;
}

.qoy-home-collections__controls button:hover {
    border-color: var(--brown);
}

.qoy-home-collections__controls button:disabled {
    opacity: .3;
    cursor: default;
}

.qoy-home-catalog {
    margin-top: 64px;
}

.qoy-home-catalog .catalog-hub {
    margin-bottom: 0;
}

.qoy-home-catalog .catalog-section-heading h2 {
    font-size: 28px;
}

@media (max-width: 1000px) {
    .qoy-home-collections__track {
        width: calc(100vw - 12px);
        margin-left: calc((100vw - min(1296px, calc(100vw - 48px))) / -2);
        padding: 0 15px;
    }

    .qoy-home-collection {
        flex-basis: 228px;
        margin-left: -22px;
    }

    .qoy-home-collection:nth-child(3n) {
        flex-basis: 238px;
    }
}

@media (max-width: 700px) {
    body.home .header {
        position: absolute;
        top: 0;
        background: transparent;
        box-shadow: none;
    }

    body.home .header.qoy-header--sticky {
        position: fixed;
        height: 72px;
        background: rgba(246, 241, 235, .97);
        box-shadow: 0 7px 24px rgba(73, 57, 51, .1);
    }

    body.home .header.qoy-header--sticky .logo,
    body.home .header.qoy-header--sticky .logo img:first-child,
    body.home .header.qoy-header--sticky .logo img:last-child {
        width: 92px;
    }

    body.home .main-nav.open {
        background: rgba(255, 255, 255, .97);
    }

    .home .qoy-sale-hero {
        height: min(760px, 100svh);
        min-height: 540px;
    }

    .qoy-sale-hero picture img {
        object-position: center 52%;
    }

    .qoy-sale-hero .hero-copy {
        top: 104px;
        right: 24px;
        left: 24px;
        text-align: center;
    }

    .qoy-sale-hero .hero-copy p {
        margin-bottom: 14px;
        font-size: 9px;
    }

    .qoy-sale-hero .hero-copy h1 {
        margin-bottom: 20px;
        font-size: 66px;
    }

    .qoy-sale-hero .hero-copy h1 span {
        margin-bottom: 6px;
        font-size: 27px;
    }

    .qoy-sale-hero .light-button {
        min-height: 42px;
        padding: 10px 18px;
        font-size: 10px;
    }

    .qoy-home-collections {
        width: calc(100% - 30px);
        margin-top: 44px;
    }

    .qoy-home-collections__head {
        width: 100%;
        margin-bottom: 17px;
    }

    .qoy-home-collections__head h2,
    .qoy-home-catalog .catalog-section-heading h2 {
        font-size: 23px;
    }

    .qoy-home-collections__head p {
        display: none;
    }

    .qoy-home-collections__track {
        width: calc(100vw - 7px);
        height: 430px;
        margin-left: -15px;
    }

    .qoy-home-collection,
    .qoy-home-collection:nth-child(3n) {
        flex: 0 0 228px;
        height: 430px;
    }

    .qoy-home-collection:nth-child(even) {
        height: 408px;
        margin-top: 22px;
    }

    .qoy-home-collection__count {
        right: 30px;
    }

    .qoy-home-collection__meta {
        right: 30px;
        left: 30px;
    }

    .qoy-home-collections__controls {
        width: 100%;
        margin-top: 10px;
    }

    .qoy-home-collections__controls::before {
        right: 100px;
    }

    .qoy-home-catalog {
        margin-top: 48px;
    }
}

@media (max-width: 782px) {
    body.admin-bar.home .header.qoy-header--sticky {
        top: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.home .header.qoy-header--sticky {
        transition: none;
    }

    .qoy-home-collections__track {
        scroll-behavior: auto;
    }

    .qoy-home-collection__image img {
        transition: none;
    }
}
