html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

#scroll-progress {
    position: fixed;
    left: 0;
    top: 0;
    height: 3px;
    width: 0;
    z-index: 120;
    background: linear-gradient(90deg, #b894dc, #76549b, #d4b169);
    pointer-events: none;
}

.site-header.scrolled {
    box-shadow: 0 8px 35px #52366e12;
    backdrop-filter: blur(18px);
}

.hero-copy>* {
    animation: soft-arrive .8s ease both;
}

.hero-copy> :nth-child(2) {
    animation-delay: .1s;
}

.hero-copy> :nth-child(3) {
    animation-delay: .2s;
}

.hero-copy> :nth-child(4) {
    animation-delay: .3s;
}

.hero-photo img {
    animation: editorial-arrive 1.2s ease both;
}

.motion-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready .reveal.visible {
    opacity: 1;
    transform: none;
}

.category-card img {
    transition: transform .45s ease, box-shadow .45s ease;
}

.category-card:hover img {
    transform: translateY(-7px);
    box-shadow: 0 18px 32px #76549b22;
}

.product-card {
    position: relative;
    transition: transform .3s ease, box-shadow .3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.quick-view-button {
    display: block;
    border: 0;
    border-radius: 0;
    width: 100%;
    background: #f4edf9;
    font-size: 11px;
    padding: 9px;
}

.fashion-marquee {
    overflow: hidden;
    margin-top: 45px;
    padding: 18px 0;
    background: #f1e9f7;
    color: #76549b;
    border-top: 1px solid #e5d8ee;
    border-bottom: 1px solid #e5d8ee;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: fashion-scroll 32s linear infinite;
}

.marquee-track span {
    font-family: Georgia, serif;
    letter-spacing: 3px;
    font-size: 17px;
    white-space: nowrap;
    padding-right: 24px;
}

.fashion-marquee:hover .marquee-track,
.fashion-marquee:focus-within .marquee-track {
    animation-play-state: paused;
}

#back-to-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 8px 25px #52366e30;
    font-size: 23px;
}

#back-to-top[hidden] {
    display: none;
}

#quick-view-dialog {
    width: min(900px, calc(100% - 30px));
    max-height: 88vh;
    border: 1px solid #e2d4ee;
    border-radius: 22px;
    padding: 32px;
    color: var(--ink);
    background: var(--ivory);
    box-shadow: 0 35px 100px #30283a50;
}

#quick-view-dialog[open] {
    animation: soft-arrive .25s ease;
}

#quick-view-dialog::backdrop {
    background: #30283a99;
    backdrop-filter: blur(6px);
}

#quick-view-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    display: flex;
    padding: 8px 14px;
    z-index: 2;
    background: white;
}

.quick-view-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
}

.quick-view-layout img {
    width: 100%;
    border-radius: 12px;
    max-height: 540px;
    object-fit: cover;
}

.quick-view-layout h2 {
    font-size: 34px;
}

.quick-view-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.quick-view-sizes span {
    border: 1px solid #d8c7e7;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 12px;
}

.contextual-agent {
    padding-top: 18px;
    text-align: right;
    color: var(--purple);
    font-size: 12px;
}

.agent-action-card {
    padding: 20px;
    margin: 16px 0;
    border: 1px solid #c2a2dc;
    border-radius: 14px;
    background: #faf5ff;
}

.agent-action-card p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.button,
button {
    position: relative;
    overflow: hidden;
}

@keyframes soft-arrive {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes editorial-arrive {
    from {
        opacity: .6;
        transform: scale(1.03);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fashion-scroll {
    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 650px) {
    .quick-view-layout {
        grid-template-columns: 1fr;
    }

    .quick-view-layout img {
        max-height: 350px;
        object-fit: contain;
    }

    #quick-view-dialog {
        padding: 18px;
    }

    .contextual-agent {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .motion-ready .reveal {
        opacity: 1;
        transform: none;
    }

    .marquee-track {
        width: auto;
        flex-wrap: wrap;
    }

    .marquee-track span {
        white-space: normal;
    }

    .marquee-track span[aria-hidden] {
        display: none;
    }
}
