/* ============================================================
                RAY STUDIO - SALE PAGE
============================================================ */


:root {

    --sale-background:
        #fffaf4;

    --sale-section:
        #f8f1e7;

    --sale-header:
        #eee0cd;

    --sale-dark:
        #38231c;

    --sale-heading:
        #4b3026;

    --sale-text:
        #70594e;

    --sale-accent:
        #a45c38;

    --sale-gold:
        #b68652;

    --sale-white:
        #ffffff;

    --sale-border:
        rgba(75, 48, 38, 0.14);

}


/* ============================================================
                GENERAL
============================================================ */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    margin: 0;

    overflow-x: hidden;

    color:
        var(--sale-text);

    background:
        var(--sale-background);

    font-family:
        "Poppins",
        sans-serif;

}


button,
a {

    font-family:
        "Poppins",
        sans-serif;

}


/* ============================================================
                ANNOUNCEMENT BAR
============================================================ */

.sale-announcement-bar {

    position: relative;

    z-index: 40;

    width: 100%;

    height: 34px;

    overflow: hidden;

    color:
        var(--sale-heading);

    background:
        var(--sale-header);

    border-top:
        1px solid
        rgba(75, 48, 38, 0.06);

    border-bottom:
        1px solid
        rgba(75, 48, 38, 0.08);

}


/* ============================================================
                INFINITE MARQUEE
============================================================ */

.sale-marquee {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    overflow: hidden;

}


.sale-marquee-track {

    width: max-content;

    display: flex;

    animation:
        saleMarquee
        26s linear infinite;

}


.sale-marquee-group {

    width: 100vw;

    min-width: 100vw;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-around;

    gap: 28px;

    padding: 0 24px;

}


.sale-marquee-group span {

    white-space: nowrap;

    color:
        var(--sale-heading);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 2.4px;

}


.sale-marquee-group i {

    color:
        var(--sale-accent);

    font-size: 5px;

}


@keyframes saleMarquee {

    from {

        transform:
            translateX(-50%);

    }

    to {

        transform:
            translateX(0);

    }

}


/* ============================================================
                TEXT-ONLY HERO
============================================================ */

.sale-hero {

    position: relative;

    isolation: isolate;

    width: 100%;

    min-height:
        calc(100vh - 34px);

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(182, 134, 82, 0.12),
            transparent 34%
        ),
        radial-gradient(
            circle at 82% 76%,
            rgba(164, 92, 56, 0.09),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #fffaf4 0%,
            #f5e9da 50%,
            #ead9c5 100%
        );

}


/* ============================================================
                HERO DECORATION
============================================================ */

.sale-hero-decoration {

    position: absolute;

    inset: 0;

    z-index: -1;

    overflow: hidden;

    pointer-events: none;

}


.sale-shape {

    position: absolute;

    border-radius: 50%;

    border:
        1px solid
        rgba(164, 92, 56, 0.11);

}


.sale-shape-one {

    width: 540px;

    height: 540px;

    top: -260px;

    left: -170px;

}


.sale-shape-two {

    width: 760px;

    height: 760px;

    right: -340px;

    bottom: -390px;

}


.sale-shape-three {

    width: 250px;

    height: 250px;

    right: 13%;

    top: 20%;

    border-color:
        rgba(182, 134, 82, 0.13);

}


.sale-floating-mark {

    position: absolute;

    color:
        rgba(182, 134, 82, 0.45);

    font-size: 13px;

    animation:
        saleFloatMark
        4s ease-in-out infinite;

}


.sale-floating-mark-one {

    left: 12%;

    bottom: 21%;

}


.sale-floating-mark-two {

    right: 14%;

    top: 24%;

    animation-delay:
        1.1s;

}


@keyframes saleFloatMark {

    0%,
    100% {

        opacity: 0.35;

        transform:
            translateY(0)
            rotate(0deg);

    }

    50% {

        opacity: 0.85;

        transform:
            translateY(-8px)
            rotate(15deg);

    }

}


/* ============================================================
                HERO CONTENT
============================================================ */

.sale-hero-content {

    width: 100%;

    max-width: 1000px;

    padding:
        80px
        30px
        110px;

    text-align: center;

}


/* ============================================================
                RAY STUDIO LETTER ANIMATION
============================================================ */

.sale-brand-animation {

    display: flex;

    align-items: center;

    justify-content: center;

    color:
        var(--sale-accent);

    font-size:
        clamp(
            10px,
            1vw,
            14px
        );

    font-weight: 600;

    letter-spacing: 5px;

}


.sale-brand-animation span {

    display: inline-block;

    opacity: 0;

    transform:
        translateY(-24px)
        rotate(-4deg);

    animation:
        saleBrandReveal
        0.7s ease forwards;

    animation-delay:
        var(--letter-delay);

}


.sale-brand-space {

    width: 15px;

}


@keyframes saleBrandReveal {

    to {

        opacity: 1;

        transform:
            translateY(0)
            rotate(0deg);

    }

}


/* ============================================================
                HERO EYEBROW
============================================================ */

.sale-hero-eyebrow {

    margin-top: 28px;

    color:
        var(--sale-text);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 4px;

    opacity: 0;

    transform:
        translateY(14px);

    animation:
        saleFadeUp
        0.75s ease
        0.88s forwards;

}


/* ============================================================
                HERO TITLE
============================================================ */

.sale-hero h1 {

    margin-top: 16px;

    color:
        var(--sale-dark);

    font-family:
        "Cormorant Garamond",
        serif;

    font-size:
        clamp(
            70px,
            10vw,
            145px
        );

    font-weight: 700;

    line-height: 0.78;

    opacity: 0;

    transform:
        translateY(34px);

    animation:
        saleFadeUp
        1s ease
        1.02s forwards;

}


.sale-hero h1 span {

    display: block;

    margin-top: 18px;

    color:
        var(--sale-accent);

    font-style: italic;

    font-weight: 500;

}


/* ============================================================
                DISCOUNT
============================================================ */

.sale-hero-discount {

    margin-top: 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 17px;

    opacity: 0;

    transform:
        translateY(20px);

    animation:
        saleFadeUp
        0.85s ease
        1.28s forwards;

}


.sale-hero-discount span {

    color:
        var(--sale-heading);

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 3px;

}


.sale-hero-discount strong {

    color:
        var(--sale-dark);

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 48px;

    font-weight: 700;

}


/* ============================================================
                HERO DESCRIPTION
============================================================ */

.sale-hero-description {

    max-width: 560px;

    margin:
        22px auto 0;

    color:
        var(--sale-text);

    font-size: 11px;

    line-height: 1.85;

    opacity: 0;

    transform:
        translateY(16px);

    animation:
        saleFadeUp
        0.8s ease
        1.48s forwards;

}


/* ============================================================
                HERO THREAD
============================================================ */

.sale-hero-thread {

    width: 100%;

    max-width: 340px;

    margin:
        30px auto 0;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 14px;

    color:
        var(--sale-accent);

    opacity: 0;

    animation:
        saleFadeUp
        0.8s ease
        1.68s forwards;

}


.sale-hero-thread span {

    flex: 1;

    height: 1px;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(164, 92, 56, 0.55)
        );

}


.sale-hero-thread span:last-child {

    background:
        linear-gradient(
            to left,
            transparent,
            rgba(164, 92, 56, 0.55)
        );

}


.sale-hero-thread i {

    font-size: 13px;

    animation:
        saleScissorTilt
        2.4s ease-in-out infinite;

}


@keyframes saleScissorTilt {

    0%,
    100% {

        transform:
            rotate(-8deg);

    }

    50% {

        transform:
            rotate(8deg);

    }

}


/* ============================================================
                SCROLL INDICATOR
============================================================ */

.sale-scroll-indicator {

    position: absolute;

    left: 50%;

    bottom: 28px;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;

    color:
        var(--sale-heading);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 2px;

    text-decoration: none;

    transform:
        translateX(-50%);

}


.sale-scroll-indicator i {

    color:
        var(--sale-accent);

    animation:
        saleScrollBounce
        1.8s ease-in-out infinite;

}


/* ============================================================
                HERO KEYFRAMES
============================================================ */

@keyframes saleFadeUp {

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


@keyframes saleScrollBounce {

    0%,
    100% {

        transform:
            translateY(0);

    }

    50% {

        transform:
            translateY(6px);

    }

}


/* ============================================================
                PRODUCTS SECTION
============================================================ */

.products-section {

    width: 100%;

    padding:
        76px
        7%
        70px;

    background:
        var(--sale-section);

}


/* ============================================================
                SELECTED FOR YOU
============================================================ */

.section-heading {

    width: 100%;

    max-width: 900px;

    margin:
        0 auto
        54px;

    text-align: center;

}


.sale-heading-copy {

    width: 100%;

    max-width: 760px;

    margin:
        0 auto;

}


.sale-heading-kicker {

    margin-bottom: 12px;

    color:
        var(--sale-accent);

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 3px;

    opacity: 0;

    transition:
        opacity 0.6s ease;

}


.section-heading h2 {

    color:
        var(--sale-dark);

    font-family:
        "Cormorant Garamond",
        serif;

    font-size:
        clamp(
            48px,
            6vw,
            72px
        );

    font-weight: 700;

    line-height: 0.95;

    opacity: 0;

    transition:
        opacity 0.75s ease 0.08s;

}


.sale-heading-message {

    max-width: 620px;

    margin:
        18px auto 0;

    color:
        var(--sale-text);

    font-size: 11px;

    line-height: 1.85;

    opacity: 0;

    transition:
        opacity 0.75s ease 0.18s;

}


/* ============================================================
                THREAD + SCISSORS ANIMATION
============================================================ */

.sale-thread-animation {

    width: 100%;

    max-width: 500px;

    margin:
        30px auto 0;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 14px;

    opacity: 0;

    transition:
        opacity 0.6s ease 0.28s;

}


.sale-thread-star {

    color:
        var(--sale-gold);

    font-size: 11px;

    opacity: 0.5;

    animation:
        saleStarPulse
        2.4s ease-in-out infinite;

}


.sale-thread-track {

    position: relative;

    flex: 1;

    height: 28px;

    display: flex;

    align-items: center;

}


.sale-thread-line {

    position: absolute;

    left: 0;

    right: 0;

    height: 1px;

    background:
        repeating-linear-gradient(
            to right,
            rgba(164, 92, 56, 0.75) 0,
            rgba(164, 92, 56, 0.75) 7px,
            transparent 7px,
            transparent 12px
        );

    transform:
        scaleX(0);

    transform-origin:
        left center;

    transition:
        transform 1.2s ease 0.36s;

}


.sale-thread-scissors {

    position: absolute;

    left: 0;

    top: 50%;

    color:
        var(--sale-accent);

    font-size: 18px;

    opacity: 0;

    transform:
        translate(
            -50%,
            -50%
        )
        rotate(-4deg);

}


/* ============================================================
                HEADING VISIBLE
============================================================ */

.sale-heading-visible
.sale-heading-kicker,

.sale-heading-visible h2,

.sale-heading-visible
.sale-heading-message {

    opacity: 1;

}


.sale-heading-visible
.sale-thread-animation {

    opacity: 1;

}


.sale-heading-visible
.sale-thread-line {

    transform:
        scaleX(1);

}


.sale-heading-visible
.sale-thread-scissors {

    animation:
        saleScissorsTravel
        2.7s ease-in-out
        0.55s forwards;

}


/* ============================================================
                SELECTED HEADING KEYFRAMES
============================================================ */

@keyframes saleScissorsTravel {

    0% {

        left: 0;

        opacity: 0;

    }

    10% {

        opacity: 1;

    }

    88% {

        opacity: 1;

    }

    100% {

        left: 100%;

        opacity: 0;

    }

}


@keyframes saleStarPulse {

    0%,
    100% {

        opacity: 0.32;

        transform:
            scale(0.92);

    }

    50% {

        opacity: 0.9;

        transform:
            scale(1.15);

    }

}


/* ============================================================
                PRODUCT GRID
============================================================ */

.product-grid {

    width: 100%;

    max-width: 1500px;

    margin:
        0 auto;

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    align-items: start;

    gap:
        28px
        22px;

}


/* ============================================================
        STOP PRODUCT CARD SHAKING - SALE PAGE ONLY
============================================================ */

.products-section
.product-card {

    opacity: 1 !important;

    position: relative;

    transform: none !important;

    animation: none !important;

    will-change: auto !important;

    backface-visibility: hidden;

}


.products-section
.product-card:hover {

    transform: none !important;

}


.products-section
.product-card img {

    transform: scale(1) !important;

    animation: none !important;

    transition:
        transform 0.45s ease !important;

}


.products-section
.product-card:hover img {

    transform: scale(1.055) !important;

}


/* Keep only safe non-layout transitions */

.products-section
.product-card {

    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease !important;

}


/* ============================================================
                CRAFT SECTION FULL WIDTH
============================================================ */

.product-grid
.craft-animation-section {

    grid-column:
        1 / -1 !important;

    width: 100%;

    max-width: none;

}


/* ============================================================
                NO PRODUCTS
============================================================ */

.no-products-message {

    grid-column:
        1 / -1;

    padding:
        75px
        20px;

    text-align: center;

}


.no-products-message i {

    margin-bottom: 14px;

    color:
        var(--sale-accent);

    font-size: 35px;

}


.no-products-message h3 {

    color:
        var(--sale-dark);

    font-family:
        "Cormorant Garamond",
        serif;

    font-size: 30px;

}


.no-products-message p {

    margin-top: 7px;

    font-size: 12px;

}


/* ============================================================
                TABLET
============================================================ */

@media screen and (max-width: 1050px) {


    .product-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

    }


}


/* ============================================================
                MOBILE
============================================================ */

@media screen and (max-width: 700px) {


    .sale-announcement-bar {

        height:
            30px;

    }


    .sale-marquee-group {

        width:
            100vw;

        min-width:
            100vw;

        gap:
            14px;

        padding:
            0 10px;

    }


    .sale-marquee-group span {

        font-size:
            7px;

        letter-spacing:
            1.4px;

    }


    .sale-hero {

        min-height:
            calc(100svh - 30px);

    }


    .sale-hero-content {

        padding:
            60px
            22px
            95px;

    }


    .sale-brand-animation {

        font-size:
            9px;

        letter-spacing:
            3px;

    }


    .sale-brand-space {

        width:
            8px;

    }


    .sale-hero-eyebrow {

        margin-top:
            22px;

        font-size:
            7px;

        letter-spacing:
            2.5px;

    }


    .sale-hero h1 {

        font-size:
            clamp(
                62px,
                19vw,
                94px
            );

    }


    .sale-hero-discount {

        margin-top:
            34px;

        gap:
            10px;

    }


    .sale-hero-discount span {

        font-size:
            7px;

        letter-spacing:
            2px;

    }


    .sale-hero-discount strong {

        font-size:
            38px;

    }


    .sale-hero-description {

        max-width:
            340px;

        font-size:
            10px;

    }


    .sale-shape-one {

        width:
            330px;

        height:
            330px;

    }


    .sale-shape-two {

        width:
            470px;

        height:
            470px;

    }


    .sale-shape-three {

        width:
            175px;

        height:
            175px;

        right:
            -45px;

    }


    .products-section {

        padding:
            56px
            12px
            50px;

    }


    .section-heading {

        margin-bottom:
            42px;

    }


    .section-heading h2 {

        font-size:
            48px;

    }


    .sale-heading-message {

        max-width:
            360px;

        font-size:
            10px;

    }


    .sale-thread-animation {

        max-width:
            310px;

    }


}


/* ============================================================
                SMALL MOBILE
============================================================ */

@media screen and (max-width: 550px) {


    .product-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            17px
            9px;

    }


}


/* ============================================================
                REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {


    .sale-marquee-track,
    .sale-brand-animation span,
    .sale-floating-mark,
    .sale-scroll-indicator i,
    .sale-hero-thread i,
    .sale-thread-star,
    .sale-thread-scissors {

        animation:
            none !important;

    }


    .sale-heading-kicker,
    .section-heading h2,
    .sale-heading-message,
    .sale-thread-animation,
    .sale-thread-line {

        transition:
            none !important;

    }


}