 @import url("https://use.typekit.net/mbv2kdy.css");

 * {
     box-sizing: border-box;
     /* color: var(--color-grey); */
     /* border: 1px red solid; */
 }

 body {
     font-family: 'fertigo-pro', 'Markazi Text', serif;
 }

 html {
     scroll-behavior: smooth;
     font-size: 16px;
 }

 .justify {
     text-align: justify;
     hyphens: auto;
     -webkit-hyphens: auto;
     -moz-hyphens: auto;
     -ms-hyphens: auto;
 }

 /* Hero backdrop, measured off the Figma hero: white for the top two thirds, then a
    wash across the bottom that is lavender at the left and pink at the right. The white
    layer is painted over the colour layer and fades out, so the colour only shows low down. */
 .pink-gradient {
     background:
         linear-gradient(180deg, #FFF 0%, #FFF 67%, rgba(255, 255, 255, 0) 96%),
         linear-gradient(90deg, #E8E6F6 0%, #E8E6F6 28%, #F1E0DF 76%, #F1E0DF 100%);
 }

 .purple-orange-gradient {
     background: linear-gradient(90deg, #C2C9E8 0%, #E5DBE8 100%);
 }

 .purple-orange-gradient:hover {
     background: linear-gradient(90deg, #BC96E3 0%, #867EEA 99.98%);
 }

 .purple-orange-gradient-text {
     background: linear-gradient(90deg, #B5BDDE 0%, #CCC9E0 55%, #E5CFD4 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
     color: transparent;
 }

 [x-cloak] {
     display: none !important;
 }

 @keyframes hero-in {
     from {
         opacity: 0;
         transform: scale(0.9);
     }

     to {
         opacity: 1;
         transform: none;
     }
 }

 /* No fill mode on purpose: if animations never run, the element just stays visible. */
 .hero-in {
     animation: hero-in 0.9s cubic-bezier(0.4, 0, 0.2, 1);
 }

 @media (prefers-reduced-motion: reduce) {
     .hero-in {
         animation: none;
     }
 }

/* How far down the sticky shop sidebar pins. It has to clear the search header, and that header
   is two different heights, so the offset is a variable the header itself sets: `.header-condensed`
   lands on <html> whenever the header is in its condensed state. A constant offset would either
   sit under the expanded header — hiding "Filter By" for the first 120px of scroll — or float
   58 below the condensed one. */
:root {
    --shop-sticky-top: 152px;
}

@media (min-width: 1024px) {
    .header-condensed {
        --shop-sticky-top: 96px;
    }
}

/* Sticky search header, condensed state.
   Alpine adds `.is-scrolled` to the header once the page has scrolled; these rules are here
   rather than in the Blade because a state class has to out-specify Tailwind's own
   `lg:pt-[0.917%]` / `lg:w-[11.5%]` utilities, and because the condensed state only applies
   from `lg` up — the stacked mobile header is already short. */
/* The condense animates. It only does so smoothly because the header is `fixed` from `lg`
   (see the note in the Blade): out of flow, animating its padding and the logo's width
   re-lays out the header's own subtree and nothing else. While it was in flow the same
   transition re-laid out every section below it on every frame, and the browser kept
   adjusting the scroll offset to compensate — that was the judder. */
.header-search {
    transition: box-shadow 200ms ease;
}

.header-search .header-row {
    transition: padding 300ms ease;
}

.header-search .header-logo img {
    transition: width 300ms ease;
}

.header-search.is-scrolled {
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.06);
}

@media (min-width: 1024px) {
    .header-search.is-scrolled .header-row {
        padding-top: 0.35%;
        padding-bottom: 0.35%;
    }

    /* The image shrinks inside the anchor, not the anchor itself: the row is nowrap, so
       narrowing the logo's slot would drag the search field and the account/cart block left
       with it. Keeping the slot at 11.5% holds both on their design x. */
    .header-search.is-scrolled .header-logo img {
        width: 59.1%;
    }
}

/* Dual-handle range slider for the shop's price facet: two native inputs stacked on one
   track, which needs no dependency. The inputs themselves are transparent and ignore the
   pointer so the lower one stays reachable — only the thumbs are interactive. */
.range-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-input:focus {
    outline: none;
}

.range-input::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 9999px;
    background: #fff;
    border: 2px solid var(--color-primary, #00aeab);
    cursor: pointer;
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
}

.range-input::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border: 2px solid var(--color-primary, #00aeab);
    border-radius: 9999px;
    background: #fff;
    cursor: pointer;
    pointer-events: auto;
}

/* Skeleton placeholders for the shop listing while it is being swapped in. A moving
   highlight over a grey block; the animation is dropped for anyone who asked for less
   motion, leaving the plain block. */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #eef0f3;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.65), transparent);
    animation: skeleton-sweep 1.3s ease-in-out infinite;
}

@keyframes skeleton-sweep {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton::after {
        animation: none;
    }
}

/* Thin scrollbars for the filters column and every list inside it. `scrollbar-width` is the
   standard property (Firefox, Chrome 121+); the WebKit pseudo-elements cover Safari and older
   Chrome. Those pseudo-elements opt the element out of overlay scrollbars, so the bar is
   always visible there rather than fading in — the reason this is a class on the few lists
   that need it rather than something global. */
.scrollbar-thin {
    scrollbar-width: thin;
    scrollbar-color: #d0d5db transparent;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #d0d5db;
    border-radius: 9999px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #b4bac2;
}

/* Feedback for the in-place cart and wishlist forms (`public/assets/js/index.js`), which change
   the page without reloading it. A header badge bumps when its number changes, and a heart
   beats once when pressed. With less motion asked for, the badge flashes instead of growing,
   and the heart's fill is the whole answer. */
@keyframes badge-bump {
    35% {
        transform: scale(1.4);
    }
}

@keyframes badge-flash {
    35% {
        filter: brightness(0.7);
    }
}

@keyframes heart-pop {
    30% {
        transform: scale(1.3);
    }

    60% {
        transform: scale(0.94);
    }
}

.badge-bump {
    animation: badge-bump 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.heart-pop {
    animation: heart-pop 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
    .badge-bump {
        animation-name: badge-flash;
    }

    .heart-pop {
        animation: none;
    }
}

/* View transitions. Between pages, the browser cross-fades. The same transitions run in place
   for the shop's listing swap and the cart's line changes; on the cart, a removed line shrinks
   away and the rest close up. Only for visitors who have not asked for less motion; the in-page
   ones check the same preference in `viewTransition()`. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

::view-transition-group(*) {
    animation-duration: 350ms;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cart-line-out {
    to {
        opacity: 0;
        transform: scale(0.96);
    }
}

::view-transition-old(.cart-line):only-child {
    animation: cart-line-out 200ms ease-in both;
}

/* The order confirmation's tick: the ring draws, then the check. Both strokes have
   `pathLength="1"`, so a dash of 1 is the whole stroke whatever its real length. The resting
   state is drawn and `backwards` only holds the start through the delay, so if the animation
   never runs the tick is simply there. */
@keyframes tick-draw {
    from {
        stroke-dashoffset: 1;
    }
}

.tick-draw circle,
.tick-draw path {
    stroke-dasharray: 1;
    animation: tick-draw 500ms cubic-bezier(0.65, 0, 0.35, 1) 150ms backwards;
}

.tick-draw path {
    animation-delay: 550ms;
    animation-duration: 350ms;
}

@media (prefers-reduced-motion: reduce) {
    .tick-draw circle,
    .tick-draw path {
        animation: none;
    }
}

/* The home page testimonials' avatar. A move swings the new one in along an arc and the old one
   out the other way: each turns about a pivot well below itself, so it travels a curve and comes
   up into the centre, fading in as it arrives. The child turns back by the same angle, so the
   picture stays upright on the way. `--direction` is 1 for next and -1 for back, set by the
   section; the arc is mirrored in Arabic, where next comes from the left. With less motion asked
   for the angle is zero, which leaves the cross-fade. */
.testimonial-avatar {
    --swing: calc(var(--direction, 1) * 50deg);
    transform-origin: 50% 360%;
}

[dir='rtl'] .testimonial-avatar {
    --swing: calc(var(--direction, 1) * -50deg);
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-avatar,
    [dir='rtl'] .testimonial-avatar {
        --swing: 0deg;
    }
}

@keyframes testimonial-swing-in {
    from {
        opacity: 0;
        transform: rotate(var(--swing));
    }
}

@keyframes testimonial-upright-in {
    from {
        transform: rotate(calc(var(--swing) * -1));
    }
}

@keyframes testimonial-swing-out {
    to {
        opacity: 0;
        transform: rotate(calc(var(--swing) * -1));
    }
}

@keyframes testimonial-upright-out {
    to {
        transform: rotate(var(--swing));
    }
}

.testimonial-avatar.is-entering {
    animation: testimonial-swing-in 700ms cubic-bezier(0.33, 1, 0.68, 1);
}

.testimonial-avatar.is-entering > * {
    animation: testimonial-upright-in 700ms cubic-bezier(0.33, 1, 0.68, 1);
}

/* `forwards`, so the old avatar stays gone once it has left rather than snapping back into the
   centre until the next move hides it. */
.testimonial-avatar.is-leaving {
    animation: testimonial-swing-out 600ms cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

.testimonial-avatar.is-leaving > * {
    animation: testimonial-upright-out 600ms cubic-bezier(0.45, 0, 0.55, 1) forwards;
}
