.top-five-products {
    background: #f9dce6;
    color: #3a1e28;
    overflow: hidden;
    padding: 50px 0 62px;
}

.top-five-products .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.top-five-products__header {
    margin: 0 auto 30px;
    max-width: 1320px;
    padding: 0 32px;
}

.top-five-products__eyebrow {
    color: #a24565;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    margin: 0 0 9px;
    text-transform: uppercase;
}

.top-five-products__header h2 {
    color: #5a2238;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(34px, 3.4vw, 52px);
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 0.98;
    margin: 0;
    text-wrap: balance;
}

.top-five-products__header h2.top-five-products__title-sweep {
    color: #e85c8b;
    text-shadow: 0 5px 22px rgba(232, 92, 139, 0.14);
}

.top-five-products__title-sweep-char {
    color: rgb(
        calc(232 + (var(--top-five-products-title-brightness, 0) * 23)),
        calc(92 + (var(--top-five-products-title-brightness, 0) * 145)),
        calc(139 + (var(--top-five-products-title-brightness, 0) * 116))
    );
    text-shadow: 0 0 calc(4px + (var(--top-five-products-title-brightness, 0) * 14px)) rgba(255, 170, 204, 0.82);
}

.top-five-products--animated .top-five-products__eyebrow {
    animation: top-five-products-fade-up 520ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.top-five-products--animated .top-five-products__header h2 {
    animation: top-five-products-title-reveal 780ms cubic-bezier(0.16, 0.84, 0.28, 1) 110ms both;
    transform-origin: left bottom;
}

@keyframes top-five-products-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

@keyframes top-five-products-title-reveal {
    from {
        clip-path: inset(0 0 100% 0);
        opacity: 0;
        transform: translateY(38px) scale(0.98);
    }

    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.top-five-products__carousel {
    position: relative;
}

.top-five-products__controls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 0 32px 14px;
}

.top-five-products__controls button {
    align-items: center;
    background: transparent;
    border: 1px solid rgba(232, 209, 157, 0.56);
    border-radius: 50%;
    color: #ead4a1;
    cursor: pointer;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    padding: 0;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    width: 42px;
}

.top-five-products__controls button:hover:not(:disabled) {
    background: #ead4a1;
    border-color: #ead4a1;
    color: #22211c;
}

.top-five-products__controls button:disabled {
    border-color: rgba(248, 240, 218, 0.14);
    color: rgba(248, 240, 218, 0.24);
    cursor: default;
}

.top-five-products__controls svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
    width: 25px;
}

@media (min-width: 768px) {
    .top-five-products__controls {
        bottom: 26px;
        display: block;
        inset-inline: 0;
        margin: 0;
        pointer-events: none;
        position: absolute;
        top: 0;
        z-index: 20;
    }

    .top-five-products__controls button {
        background: rgba(34, 33, 28, 0.96) !important;
        border-color: #ead4a1 !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
        color: #fffaf0 !important;
        opacity: 1;
        pointer-events: auto !important;
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%);
        visibility: visible !important;
    }

    .top-five-products__controls button:first-child {
        left: clamp(16px, 2vw, 36px) !important;
    }

    .top-five-products__controls button:last-child {
        right: clamp(16px, 2vw, 36px) !important;
    }

    .top-five-products__carousel:hover .top-five-products__controls button:not(:disabled),
    .top-five-products__controls button:focus-visible {
        background: #ead4a1 !important;
        color: #22211c !important;
        transform: translateY(-50%) scale(1.08);
    }
}

.top-five-products__track {
    display: grid;
    gap: 0;
    grid-auto-columns: 465px;
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 0 26px 45px;
    scroll-padding-inline: 45px;
    scroll-snap-type: inline mandatory;
    scrollbar-color: #d8bf88 #39372e;
    scrollbar-width: thin;
}

.top-five-products__item {
    min-height: 550px;
    padding-left: 80px;
    position: relative;
    scroll-snap-align: start;
}

.top-five-products--animated .top-five-products__item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 460ms ease, transform 640ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.top-five-products--animated .top-five-products__item:nth-child(2) {
    transition-delay: 65ms;
}

.top-five-products--animated .top-five-products__item:nth-child(3) {
    transition-delay: 130ms;
}

.top-five-products--animated .top-five-products__item:nth-child(4) {
    transition-delay: 195ms;
}

.top-five-products--animated .top-five-products__item:nth-child(5) {
    transition-delay: 260ms;
}

.top-five-products--animated .top-five-products__item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.top-five-products__rank {
    color: #ead4a1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 180px;
    font-weight: 300;
    left: 0;
    letter-spacing: -0.1em;
    line-height: 0.78;
    pointer-events: none;
    position: absolute;
    text-shadow: 0 2px 0 #11110f;
    top: 215px;
    z-index: 2;
    -webkit-text-stroke: 2px #11110f;
}

.top-five-products--animated .top-five-products__rank {
    opacity: 0;
    transform: translate3d(-16px, 24px, 0) scale(0.58);
    transform-origin: center;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__rank {
    animation: top-five-products-rank-reveal 760ms cubic-bezier(0.16, 0.84, 0.28, 1) 150ms both;
}

@keyframes top-five-products-rank-reveal {
    0% {
        opacity: 0;
        transform: translate3d(-16px, 24px, 0) scale(0.58);
    }

    68% {
        opacity: 1;
        transform: translate3d(2px, -3px, 0) scale(1.07);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.top-five-products__card {
    background: #d8b86e;
    background-image: linear-gradient(112deg, #9b7028 0%, #e5c873 17%, #fff0ad 32%, #bd8c35 48%, #f7dfa0 64%, #aa7628 82%, #e8c96d 100%);
    background-size: 220% 100%;
    border: 1px solid transparent;
    border-radius: 20px;
    box-sizing: border-box;
    min-height: 550px;
    overflow: hidden;
    padding: 0 0 23px;
    position: relative;
    transition: box-shadow 220ms ease, transform 220ms ease;
    z-index: 1;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__card {
    animation: top-five-products-metal-sheen 9s ease-in-out 1.2s infinite;
}

@keyframes top-five-products-metal-sheen {
    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-five-products--animated .top-five-products__item.is-visible .top-five-products__card {
        animation: none;
    }
}

.top-five-products__card:hover {
    box-shadow: 0 12px 28px rgba(80, 48, 12, 0.18);
    transform: translateY(-5px);
}

.top-five-products__card--cat-outside {
    overflow: visible;
}

.top-five-products__cat {
    filter: drop-shadow(0 6px 7px rgba(84, 35, 55, 0.2));
    height: 64px;
    pointer-events: none;
    position: absolute;
    right: 12px;
    top: 10px;
    transform-origin: 72% 75%;
    width: 64px;
    z-index: 3;
}

.top-five-products__cat[data-top-five-cat-style="full"] {
    --top-five-products-cat-walk-distance: -310px;
    height: 102px;
    right: -4px;
    top: 7px;
    transform-origin: 50% 100%;
    width: 79px;
}

.top-five-products__cat[data-top-five-cat-type="chubby"][data-top-five-cat-style="full"] {
    height: 110px;
    right: -10px;
    width: 94px;
}

.top-five-products__cat[data-top-five-cat-type="chubby"][data-top-five-cat-style="face"] {
    height: 70px;
    right: 8px;
    width: 70px;
}

.top-five-products__cat[data-top-five-cat-placement="outside"] {
    right: -8px;
    top: -58px;
}

.top-five-products__cat[data-top-five-cat-style="face"][data-top-five-cat-placement="outside"] {
    top: -42px;
}

.top-five-products__cat svg {
    display: block;
    height: 100%;
    width: 100%;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat[data-top-five-cat-movement="float"] {
    animation: top-five-products-cat-float 2.8s ease-in-out 1.1s infinite;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat[data-top-five-cat-movement="walk"] {
    animation: top-five-products-cat-walk 8s linear 1s infinite;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat:not([data-top-five-cat-movement="still"]) .top-five-products__cat-paw {
    animation: top-five-products-cat-wave 1.15s ease-in-out 1.5s infinite;
    transform-box: fill-box;
    transform-origin: 20% 85%;
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat[data-top-five-cat-movement="beckon"] .top-five-products__cat-paw {
    animation: top-five-products-cat-beckon 820ms ease-in-out 1s infinite;
    transform-box: fill-box;
    transform-origin: 15% 90%;
}

@keyframes top-five-products-cat-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    45% {
        transform: translateY(-5px) rotate(-3deg);
    }

    70% {
        transform: translateY(-2px) rotate(2deg);
    }
}

@keyframes top-five-products-cat-wave {
    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-17deg);
    }
}

@keyframes top-five-products-cat-beckon {
    0%,
    100% {
        transform: rotate(8deg);
    }

    50% {
        transform: rotate(-32deg);
    }
}

@keyframes top-five-products-cat-walk {
    0% {
        transform: translateX(0) translateY(0) scaleX(-1);
    }

    48% {
        transform: translateX(var(--top-five-products-cat-walk-distance)) translateY(-3px) scaleX(-1);
    }

    50% {
        transform: translateX(var(--top-five-products-cat-walk-distance)) translateY(-3px) scaleX(1);
    }

    98%,
    100% {
        transform: translateX(0) translateY(0) scaleX(1);
    }
}

.top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat:not([data-top-five-cat-movement="still"]) .top-five-products__cat-tail {
    animation: top-five-products-cat-tail 420ms ease-in-out infinite alternate;
    transform-box: fill-box;
    transform-origin: 10% 75%;
}

@keyframes top-five-products-cat-tail {
    from { transform: rotate(-9deg); }
    to { transform: rotate(10deg); }
}

.top-five-products__image {
    display: block;
    overflow: hidden;
}

.top-five-products__image img {
    aspect-ratio: 1 / 1;
    border-radius: 19px 19px 0 0;
    display: block;
    height: auto;
    object-fit: cover;
    transition: transform 360ms ease;
    width: 100%;
}

.top-five-products__card:hover .top-five-products__image img {
    transform: scale(1.035);
}

.top-five-products__content {
    padding: 20px 20px 0;
}

.top-five-products__brand {
    color: #4d2f0f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 22px 0 0;
    text-transform: uppercase;
}

.top-five-products__content h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
    margin: 0;
}

.top-five-products__content h3 a {
    color: #2d1b0b;
    text-decoration: none;
}

.top-five-products__content h3 a:hover {
    color: #6d203f;
}

.top-five-products__price {
    align-items: baseline;
    color: #ffffff;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    gap: 8px;
    margin: 22px 0 0;
    text-shadow: 0 1px 1px rgba(45, 27, 11, 0.65);
}

.top-five-products__original-price {
    color: rgb(77 47 15 / 78%);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .top-five-products {
        padding: 38px 0 48px;
    }

    .top-five-products__header {
        margin-bottom: 24px;
        padding: 0 20px;
    }

    .top-five-products__track {
        grid-auto-columns: minmax(340px, 92vw);
        padding-left: 18px;
        scroll-padding-inline: 18px;
    }

    .top-five-products__controls {
        margin: 0 20px 12px;
    }

    .top-five-products__item {
        min-height: 0;
        padding-left: 24px;
    }

    .top-five-products__rank {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 108px;
        left: -2px;
        top: 165px;
        -webkit-text-stroke-width: 1.5px;
    }

    .top-five-products__card {
        border-radius: 17px;
        min-height: 0;
        padding: 0 0 19px;
    }

    .top-five-products__cat[data-top-five-cat-style="full"] {
        --top-five-products-cat-walk-distance: -220px;
    }

    .top-five-products__content {
        padding: 16px 15px 0;
    }

    .top-five-products__card,
    .top-five-products__content {
        min-width: 0;
    }

    .top-five-products__content h3 {
        font-size: 19px;
        line-height: 1.18;
    }

    .top-five-products__content h3 a {
        display: block;
        overflow-wrap: anywhere;
    }

    .top-five-products__price {
        flex-wrap: wrap;
        row-gap: 3px;
    }

    .top-five-products__brand {
        margin-top: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .top-five-products--animated .top-five-products__eyebrow,
    .top-five-products--animated .top-five-products__header h2,
    .top-five-products__header h2.top-five-products__title-sweep,
    .top-five-products--animated .top-five-products__item,
    .top-five-products--animated .top-five-products__rank,
    .top-five-products--animated .top-five-products__item.is-visible .top-five-products__rank,
    .top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat,
    .top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat-paw,
    .top-five-products--animated .top-five-products__item.is-visible .top-five-products__cat-tail,
    .top-five-products__card,
    .top-five-products__image img {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }
}
