/* ==========================================================================
   Face Shape Guide — trigger button + modal styles.
   Namespaced under .fshape-* / .btn-face-shape. Colours mirror the try-on
   modal (dark stage) so the two camera features look like one family, and the
   result card follows the theme's own light surface.
   ========================================================================== */

/* --- Trigger button ------------------------------------------------------- */
.btn-face-shape {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
    padding: 12px 18px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    --btn-drift: var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
    transition: background-position .9s cubic-bezier(.22, 1, .36, 1), color .4s ease, opacity .2s ease;
}

/* The fill itself is the theme's button drift (custom.css). */
.btn-face-shape:hover,
.btn-face-shape:focus-visible {
    color: var(--text-color-primary-bg, #fff);
}

.btn-face-shape:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-face-shape .fshape-icon {
    flex: 0 0 auto;
    display: block;
    width: 20px;
    height: 20px;
}

/* Category banner: the scanner stands in for the camera the button opens. */
.fshape-banner {
    --fshape-banner-bg: #111;
    --fshape-banner-glow: #33290a;
    --fshape-banner-ink: #fff;
    --fshape-banner-muted: #c9c9c9;
    --fshape-banner-accent: #ffc20e;
    --fshape-banner-on-accent: #111;
    --fshape-art: 130px;
    --fshape-scan: 34px;
    --fshape-glow-at: 50% 18%;
    display: grid;
    gap: 16px;
    margin: 20px 0 22px;
    padding: 22px;
    overflow: hidden;
    border-radius: 16px;
    background: radial-gradient(420px 260px at var(--fshape-glow-at), var(--fshape-banner-glow) 0, var(--fshape-banner-bg) 70%);
    color: var(--fshape-banner-ink);
}

.fshape-banner-copy {
    order: 1;
    min-width: 0;
}

.fshape-banner-kicker {
    margin: 0 0 6px;
    color: var(--fshape-banner-accent);
    font-size: 13px;
    font-weight: 700;
}

.fshape-banner-title {
    margin: 0 0 6px;
    color: inherit;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
}

.fshape-banner-text {
    margin: 0;
    color: var(--fshape-banner-muted);
    font-size: 15px;
    line-height: 1.7;
}

.fshape-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 16px;
}

.fshape-banner .btn-face-shape {
    flex: 1 1 100%;
    width: auto;
    min-height: 50px;
    margin-bottom: 0;
    --btn-drift: var(--fshape-banner-accent);
    --btn-drift-from: var(--btn-drift);
    --btn-drift-tone: color-mix(in srgb, var(--btn-drift) 72%, #fff);
    --btn-drift-stop: 70%;
    border-color: var(--fshape-banner-accent);
    border-radius: 12px;
    background-color: var(--fshape-banner-accent);
    color: var(--fshape-banner-on-accent);
    font-weight: 800;
    transition: background-position .9s cubic-bezier(.22, 1, .36, 1), transform .2s ease, box-shadow .2s ease;
}

.fshape-banner .btn-face-shape:focus-visible {
    color: var(--fshape-banner-on-accent);
    outline: 2px solid var(--fshape-banner-ink);
    outline-offset: 2px;
}

.fshape-banner-privacy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--fshape-banner-muted);
    font-size: 12.5px;
}

.fshape-banner-privacy svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fshape-banner-art {
    position: relative;
    width: var(--fshape-art);
    height: var(--fshape-art);
    margin-inline: auto;
}

.fshape-banner-face {
    display: block;
    width: 100%;
    height: 100%;
}

.fshape-banner-line,
.fshape-banner-glass {
    fill: none;
}

.fshape-banner-line {
    stroke: var(--fshape-banner-ink);
    stroke-width: 1.5;
    opacity: .9;
}

.fshape-banner-glass {
    stroke: var(--fshape-banner-accent);
    stroke-width: 2.4;
}

.fshape-banner-dot {
    fill: var(--fshape-banner-accent);
    animation: fshape-banner-dot 3s infinite;
}

.fshape-banner-dot:nth-of-type(2n) {
    animation-delay: .6s;
}

.fshape-banner-dot:nth-of-type(3n) {
    animation-delay: 1.2s;
}

.fshape-banner-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 0 solid var(--fshape-banner-accent);
}

.fshape-banner-corner--ts {
    top: 0;
    inset-inline-start: 0;
    border-block-start-width: 2.5px;
    border-inline-start-width: 2.5px;
    border-start-start-radius: 8px;
}

.fshape-banner-corner--te {
    top: 0;
    inset-inline-end: 0;
    border-block-start-width: 2.5px;
    border-inline-end-width: 2.5px;
    border-start-end-radius: 8px;
}

.fshape-banner-corner--bs {
    bottom: 0;
    inset-inline-start: 0;
    border-block-end-width: 2.5px;
    border-inline-start-width: 2.5px;
    border-end-start-radius: 8px;
}

.fshape-banner-corner--be {
    bottom: 0;
    inset-inline-end: 0;
    border-block-end-width: 2.5px;
    border-inline-end-width: 2.5px;
    border-end-end-radius: 8px;
}

.fshape-banner-scan {
    position: absolute;
    top: 0;
    inset-inline: 6px;
    height: var(--fshape-scan);
    border-bottom: 2px solid var(--fshape-banner-accent);
    background: linear-gradient(to bottom, transparent, rgba(255, 194, 14, .28));
    animation: fshape-banner-scan 3s ease-in-out infinite alternate;
}

@keyframes fshape-banner-scan {
    to {
        transform: translateY(calc(var(--fshape-art) - var(--fshape-scan)));
    }
}

@keyframes fshape-banner-dot {
    0%,
    100% {
        opacity: .25;
    }

    50% {
        opacity: 1;
    }
}

@media (hover: hover) {
    .fshape-banner .btn-face-shape:hover {
        color: var(--fshape-banner-on-accent);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 194, 14, .25);
    }
}

@media (min-width: 768px) {
    .fshape-banner {
        --fshape-art: 190px;
        --fshape-scan: 42px;
        --fshape-glow-at: 88% 50%;
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 24px;
        align-items: center;
        padding: 30px 40px;
    }

    .fshape-banner-copy {
        order: 0;
    }

    .fshape-banner--art-start .fshape-banner-copy {
        order: 1;
    }

    .fshape-banner--art-start {
        --fshape-glow-at: 12% 50%;
        grid-template-columns: 240px minmax(0, 1fr);
    }

    /* The glow sits behind the scanner, which swaps sides with the direction. */
    .rtl .fshape-banner {
        --fshape-glow-at: 12% 50%;
    }

    .rtl .fshape-banner--art-start {
        --fshape-glow-at: 88% 50%;
    }

    .fshape-banner-title {
        font-size: 30px;
    }

    .fshape-banner .btn-face-shape {
        flex: 0 0 auto;
        min-width: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fshape-banner-scan,
    .fshape-banner-dot {
        animation: none;
    }

    .fshape-banner .btn-face-shape {
        transition: none;
    }
}

/* --- Modal shell ------------------------------------------------------------
   Same family as the try-on popup (tryon.css): cream light look by default, a
   dark look from Layout settings > Face Shape Guide, and the store yellow as
   the accent. Every colour is a token on the root, so a merchant override or
   the dark look is one block. */
.fshape-root[hidden] {
    /* Beats the display:flex below; the [hidden] attribute alone loses to it. */
    display: none !important;
}

body.fshape-open {
    overflow: hidden;
}

.fshape-root {
    --fshape-accent: #FFC20E;
    --fshape-accent-soft: #FFF6DA;
    --fshape-bg: #FBF8F1;
    --fshape-surface: #fff;
    --fshape-surface-2: #f4f4f2;
    --fshape-ink: #111;
    --fshape-muted: #6b6b6b;
    --fshape-line: #e6e6e6;
    --fshape-cta-bg: #111;
    --fshape-cta-text: #fff;
    --fshape-cta-bub: var(--fshape-accent);
    --fshape-cta-bub-ink: #111;
    --fshape-alt-bg: #fff;
    --fshape-alt-hover: var(--fshape-accent-soft);
    --fshape-shape-bg: var(--fshape-accent-soft);
    --fshape-shape-ink: #111;
    --fshape-radius: 14px;
    position: fixed;
    inset: 0;
    /* Same layer as the try-on modal: only one camera modal is ever open. */
    z-index: 99990;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: rgba(0, 0, 0, .72);
}

.fshape-root--dark {
    --fshape-bg: #0d0d0d;
    --fshape-surface: #161616;
    --fshape-surface-2: #242424;
    --fshape-ink: #f3f3f3;
    --fshape-muted: #a3a3a3;
    --fshape-line: #2c2c2c;
    --fshape-cta-bg: var(--fshape-accent);
    --fshape-cta-text: #111;
    --fshape-cta-bub: #111;
    --fshape-cta-bub-ink: var(--fshape-accent);
    --fshape-alt-bg: transparent;
    --fshape-alt-hover: rgba(255, 194, 14, .08);
    --fshape-shape-bg: rgba(255, 194, 14, .14);
    --fshape-shape-ink: var(--fshape-accent);
}

.fshape-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--fshape-bg);
    color: var(--fshape-ink);
    outline: none;
    overflow: hidden;
}

/* Phones: full screen. Anything wider: one fixed-size dialog in the centre,
   the same size as the try-on. */
@media (min-width: 480px) {
    .fshape-root {
        align-items: center;
        padding: 24px;
    }

    .fshape-panel {
        width: var(--fshape-dialog-w, 420px);
        height: min(92vh, var(--fshape-dialog-h, 780px));
        border-radius: 20px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    }
}

.fshape-ic {
    display: inline-flex;
    flex: none;
    width: 20px;
    height: 20px;
}

.fshape-ic svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Header + steps --------------------------------------------------------- */
.fshape-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: var(--fshape-surface);
    border-bottom: 1px solid var(--fshape-line);
}

.fshape-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--fshape-ink);
}

.fshape-title-ic {
    color: var(--fshape-accent);
}

.fshape-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--fshape-surface-2);
    color: var(--fshape-ink);
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.fshape-close .fshape-ic {
    width: 18px;
    height: 18px;
}

.fshape-steps {
    display: flex;
    gap: 6px;
    padding: 10px 14px 0;
}

.fshape-step {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--fshape-line);
    transition: background-color .3s ease;
}

.fshape-step.is-done {
    background: var(--fshape-accent);
}

/* --- Stage ---------------------------------------------------------------- */
.fshape-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 12px 12px 0;
    border-radius: 18px;
    background: #000;
    overflow: hidden;
}

.fshape-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Mirror the front camera for a natural selfie view. */
    transform: scaleX(-1);
}

/* Scanner frame shown until a usable frame is found and while sampling. */
.fshape-guide {
    --fshape-guide-h: 60%;
    position: absolute;
    top: 46%;
    left: 50%;
    z-index: 2;
    width: 62%;
    height: var(--fshape-guide-h);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.fshape-guide.is-hidden {
    display: none;
}

.fshape-oval {
    position: absolute;
    inset: 8% 10%;
    border: 2px dashed rgba(255, 255, 255, .65);
    border-radius: 46% 46% 50% 50%;
}

.fshape-corner {
    position: absolute;
    width: 26px;
    height: 26px;
    border: 0 solid var(--fshape-accent);
}

.fshape-corner--ts {
    top: 0;
    inset-inline-start: 0;
    border-block-start-width: 3px;
    border-inline-start-width: 3px;
    border-start-start-radius: 10px;
}

.fshape-corner--te {
    top: 0;
    inset-inline-end: 0;
    border-block-start-width: 3px;
    border-inline-end-width: 3px;
    border-start-end-radius: 10px;
}

.fshape-corner--bs {
    bottom: 0;
    inset-inline-start: 0;
    border-block-end-width: 3px;
    border-inline-start-width: 3px;
    border-end-start-radius: 10px;
}

.fshape-corner--be {
    bottom: 0;
    inset-inline-end: 0;
    border-block-end-width: 3px;
    border-inline-end-width: 3px;
    border-end-end-radius: 10px;
}

/* The scan line only runs while samples are being taken. */
.fshape-scan {
    display: none;
    position: absolute;
    top: 0;
    inset-inline: 6px;
    height: 40px;
    border-bottom: 2px solid var(--fshape-accent);
    background: linear-gradient(to bottom, transparent, rgba(255, 194, 14, .3));
}

.fshape-panel.is-scanning .fshape-scan {
    display: block;
    animation: fshape-scan 2.4s ease-in-out infinite alternate;
}

@keyframes fshape-scan {
    from {
        top: 0;
    }

    to {
        top: calc(100% - 40px);
    }
}

/* Sampling progress, just above the status line. */
.fshape-progress {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 62px;
    z-index: 3;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
}

.fshape-progress.is-hidden {
    display: none;
}

.fshape-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 4px;
    background: var(--fshape-accent);
    transition: width .12s linear;
}

.fshape-status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    backdrop-filter: blur(3px);
}

.fshape-status.is-hidden {
    display: none;
}

.fshape-spinner {
    flex: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: var(--fshape-accent);
    border-radius: 50%;
    animation: fshape-spin .8s linear infinite;
}

@keyframes fshape-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Error / unsure cards (over the camera, so always dark) ---------------- */
.fshape-error,
.fshape-unsure {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    background: rgba(0, 0, 0, .9);
    text-align: center;
}

.fshape-error.is-hidden,
.fshape-unsure.is-hidden {
    display: none;
}

.fshape-error-title,
.fshape-unsure-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.fshape-error p,
.fshape-unsure p {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    line-height: 1.6;
}

.fshape-error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.fshape-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    --btn-drift: rgba(255, 255, 255, .14);
    --btn-drift-from: transparent;
    --btn-drift-tone: var(--btn-drift);
    --btn-drift-stop: 62%;
    background-color: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-position .9s cubic-bezier(.22, 1, .36, 1), border-color .18s ease, color .18s ease;
}

.fshape-btn--primary {
    --btn-drift: var(--fshape-accent);
    --btn-drift-from: var(--btn-drift);
    --btn-drift-tone: color-mix(in srgb, var(--btn-drift) 72%, #fff);
    --btn-drift-stop: 70%;
    border-color: var(--fshape-accent);
    background-color: var(--fshape-accent);
    color: #111;
}

/* --- Result ---------------------------------------------------------------- */
/* The result covers the camera box; the box drops its frame so the result
   reads as part of the panel, not as a card inside the camera. */
.fshape-panel.is-result .fshape-stage {
    margin: 0;
    border-radius: 0;
    background: var(--fshape-bg);
}

.fshape-result {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    background: var(--fshape-bg);
    color: var(--fshape-ink);
    text-align: start;
    /* Thin, arrowless scrollbar in the panel's own tones. */
    --fshape-scroll-thumb: color-mix(in srgb, var(--fshape-muted) 45%, transparent);
    scrollbar-width: thin;
    scrollbar-color: var(--fshape-scroll-thumb) transparent;
}

/* Safari and older Chromium, which ignore scrollbar-width / scrollbar-color. */
.fshape-result::-webkit-scrollbar {
    width: 4px;
}

.fshape-result::-webkit-scrollbar-track {
    background: transparent;
}

.fshape-result::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: var(--fshape-scroll-thumb);
}

.fshape-result.is-hidden {
    display: none;
}

/* The result scrolls; its blocks keep their height instead of shrinking. */
.fshape-result > * {
    flex-shrink: 0;
}

/* Verdict hero: always the dark card with the yellow shape, in both looks,
   so the answer reads as a confident headline. */
.fshape-hero {
    --fshape-hero-bg: #111;
    position: relative;
    padding: 18px 16px;
    padding-inline-end: 84px;
    border-radius: 18px;
    background: radial-gradient(180px 180px at 100% 0, rgba(255, 194, 14, .22), transparent 70%), var(--fshape-hero-bg);
    color: #fff;
    overflow: hidden;
}

.rtl .fshape-hero {
    background: radial-gradient(180px 180px at 0 0, rgba(255, 194, 14, .22), transparent 70%), var(--fshape-hero-bg);
}

.fshape-root--dark .fshape-hero {
    --fshape-hero-bg: #1c1c1c;
    border: 1px solid var(--fshape-line);
}

.fshape-shape-icon {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 194, 14, .16);
    color: var(--fshape-accent);
}

.fshape-shape-icon svg {
    width: 24px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 7;
    stroke-linejoin: round;
}

.fshape-eyebrow {
    margin: 0 0 2px;
    color: var(--fshape-accent);
    font-size: 12.5px;
    font-weight: 800;
}

.fshape-shape-name {
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.25;
    color: #fff;
}

.fshape-shape-note {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 13.5px;
    line-height: 1.6;
}

.fshape-shape-also {
    margin-top: 4px;
    color: rgba(255, 255, 255, .6);
    font-size: 12.5px;
}

/* --- Products row ------------------------------------------------------------ */
.fshape-products-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.fshape-products-head .fshape-section-title {
    margin-bottom: 8px;
}

.fshape-rail {
    display: flex;
    gap: 10px;
    margin: 0 -14px;
    padding: 2px 14px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    list-style: none;
}

.fshape-rail::-webkit-scrollbar {
    display: none;
}

.fshape-prod {
    display: flex;
    flex: 0 0 148px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--fshape-line);
    border-radius: var(--fshape-radius);
    background: var(--fshape-surface);
    scroll-snap-align: start;
}

.fshape-prod--ghost {
    height: 222px;
    background: linear-gradient(90deg, var(--fshape-surface-2) 25%, var(--fshape-surface) 50%, var(--fshape-surface-2) 75%) 0 0 / 200% 100%;
    animation: fshape-ghost 1.2s linear infinite;
}

@keyframes fshape-ghost {
    to {
        background-position: -200% 0;
    }
}

.fshape-prod-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 8px;
    color: var(--fshape-ink);
    text-decoration: none;
}

.fshape-prod-link:hover,
.fshape-prod-link:focus {
    color: var(--fshape-ink);
    text-decoration: none;
}

/* Same frame as the theme's product cards: ratio, fit and image background
   come from Layout settings via the product-cards-* classes on <body>. */
.fshape-prod-media {
    display: block;
    overflow: hidden;
    aspect-ratio: var(--product-card-aspect, 1 / 1);
    margin-bottom: 6px;
    background-color: var(--product-card-image-bg, var(--product-card-media-bg, var(--fshape-surface-2)));
}

.fshape-prod-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--product-card-fit, contain);
    mix-blend-mode: multiply;
}

/* Multiply over the dark surface would black the photo out. */
.fshape-root--dark .fshape-prod-img {
    mix-blend-mode: normal;
}

.fshape-prod-name {
    overflow: hidden;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fshape-prod-price {
    padding: 0 10px;
    font-size: 14px;
    font-weight: 900;
}

.fshape-prod-was {
    margin-inline-start: 4px;
    color: var(--fshape-muted);
    font-size: 11.5px;
    font-weight: 500;
}

.fshape-prod-btn {
    display: grid;
    place-items: center;
    height: 34px;
    margin: 0 8px 8px;
    border: 0;
    border-radius: 10px;
    --btn-drift: var(--fshape-cta-bg);
    background-color: var(--fshape-cta-bg);
    color: var(--fshape-cta-text);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: background-position .9s cubic-bezier(.22, 1, .36, 1), opacity .18s ease;
}

.fshape-prod-btn:hover,
.fshape-prod-btn:focus {
    color: var(--fshape-cta-text);
    text-decoration: none;
}

.fshape-prod-btn.is-busy {
    opacity: .6;
    cursor: progress;
}

.fshape-prod-btn.is-added {
    --btn-drift: var(--fshape-accent);
    background-color: var(--fshape-accent);
    color: #111;
}

/* --- Coupon + trust line ------------------------------------------------------ */
.fshape-coupon {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px dashed var(--fshape-accent);
    border-radius: var(--fshape-radius);
    background: var(--fshape-accent-soft);
    color: #111;
}

.fshape-root--dark .fshape-coupon {
    background: rgba(255, 194, 14, .1);
    color: var(--fshape-ink);
}

.fshape-coupon-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-size: 12.5px;
    line-height: 1.5;
}

.fshape-coupon-text b {
    font-size: 14.5px;
    font-weight: 900;
}

.fshape-coupon-code {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: var(--fshape-accent);
    font-family: inherit;
    cursor: pointer;
}

.fshape-coupon-value {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .06em;
    direction: ltr;
}

.fshape-coupon-state {
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    opacity: .8;
}

.fshape-coupon-code.is-copied .fshape-coupon-state {
    color: var(--fshape-accent);
    opacity: 1;
}

.fshape-proof {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: -4px 0 0;
    color: var(--fshape-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.fshape-proof .fshape-ic {
    width: 16px;
    height: 16px;
    color: var(--fshape-accent);
}

.fshape-section-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--fshape-ink);
}

.fshape-rec-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Suggestion rows: the try-on buy buttons (.tryon-cta / .tryon-alt). */
.fshape-act {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 9px 12px;
    border-radius: var(--fshape-radius);
    text-align: start;
    text-decoration: none;
    transition: background-position .9s cubic-bezier(.22, 1, .36, 1), border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.fshape-act--cta {
    --btn-drift: var(--fshape-cta-bg);
    border: 2px solid var(--fshape-cta-bg);
    background-color: var(--fshape-cta-bg);
    color: var(--fshape-cta-text);
}

/* Drifts from its own surface to the soft accent, not to a dark fill. */
.fshape-act--alt {
    --btn-drift: var(--fshape-alt-hover);
    --btn-drift-from: var(--fshape-alt-bg);
    --btn-drift-tone: var(--btn-drift);
    --btn-drift-stop: 62%;
    border: 1.5px solid var(--fshape-line);
    background-color: var(--fshape-alt-bg);
    color: var(--fshape-ink);
}

.fshape-act:hover,
.fshape-act:focus {
    text-decoration: none;
}

.fshape-act--cta:hover,
.fshape-act--cta:focus {
    color: var(--fshape-cta-text);
}

.fshape-act--alt:hover,
.fshape-act--alt:focus {
    color: var(--fshape-ink);
}

.fshape-act-bub {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.fshape-act-bub svg {
    width: 20px;
    height: 20px;
}

.fshape-act--cta .fshape-act-bub {
    background: var(--fshape-cta-bub);
    color: var(--fshape-cta-bub-ink);
}

.fshape-act--alt .fshape-act-bub {
    background: var(--fshape-surface-2);
    color: var(--fshape-ink);
}

.fshape-act-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.fshape-act-text b {
    font-size: 15px;
}

.fshape-act-text small {
    font-size: 12px;
    opacity: .75;
}

.fshape-act-go {
    transition: transform .18s ease;
}

/* The arrow drawing points left: flip it to point forward in LTR. */
html:not([dir="rtl"]) .fshape-act-go {
    transform: scaleX(-1);
}

/* --- Footer ---------------------------------------------------------------- */
.fshape-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.fshape-tips {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fshape-tip {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid var(--fshape-line);
    border-radius: 12px;
    background: var(--fshape-surface);
    color: var(--fshape-muted);
    font-size: 12px;
    text-align: center;
}

.fshape-tip .fshape-ic {
    width: 18px;
    height: 18px;
    color: var(--fshape-ink);
}

.fshape-footer-btn {
    --btn-drift: var(--fshape-alt-hover);
    --btn-drift-from: var(--fshape-alt-bg);
    width: 100%;
    border: 1.5px solid var(--fshape-line);
    border-radius: var(--fshape-radius);
    background-color: var(--fshape-alt-bg);
    color: var(--fshape-ink);
}

.fshape-result-links {
    display: none;
    justify-content: space-between;
    gap: 12px;
}

.fshape-text-link {
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--fshape-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.fshape-text-link[hidden] {
    display: none;
}

/* Result: the tips and the big button give way to the two links. */
.fshape-panel.is-result .fshape-tips,
.fshape-panel.is-result .fshape-footer-btn {
    display: none;
}

.fshape-panel.is-result .fshape-result-links {
    display: flex;
}

.fshape-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    color: var(--fshape-muted);
    font-size: 12px;
    text-align: center;
}

.fshape-privacy .fshape-ic {
    width: 14px;
    height: 14px;
}

/* --- Focus / hover ------------------------------------------------------------ */
.fshape-act:focus-visible,
.fshape-prod-link:focus-visible,
.fshape-prod-btn:focus-visible,
.fshape-coupon-code:focus-visible,
.fshape-close:focus-visible,
.fshape-btn:focus-visible,
.fshape-text-link:focus-visible {
    outline: 3px solid var(--fshape-accent);
    outline-offset: 2px;
}

@media (hover: hover) {
    .fshape-act--cta:hover {
        box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
        transform: translateY(-1px);
    }

    .fshape-act--cta:hover .fshape-act-bub {
        transform: rotate(-12deg);
    }

    .fshape-act--cta:hover .fshape-act-go {
        transform: translateX(-4px);
    }

    html:not([dir="rtl"]) .fshape-act--cta:hover .fshape-act-go {
        transform: scaleX(-1) translateX(-4px);
    }

    a.fshape-act--alt:hover {
        border-color: var(--fshape-accent);
    }

    a.fshape-act--alt:hover .fshape-act-bub,
    .fshape-close:hover {
        background: var(--fshape-accent);
        color: #111;
    }

    .fshape-footer-btn:hover {
        border-color: var(--fshape-accent);
    }

    .fshape-text-link:hover {
        color: var(--fshape-ink);
    }

    .fshape-prod:hover {
        border-color: var(--fshape-accent);
    }
}

/* --- Motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .fshape-spinner {
        animation-duration: 2s;
    }

    .fshape-panel.is-scanning .fshape-scan {
        animation: none;
    }

    .fshape-prod--ghost {
        animation: none;
    }

    .fshape-progress-bar,
    .fshape-step,
    .fshape-act,
    .fshape-act-bub,
    .fshape-act-go {
        transition: none;
    }

    .fshape-act--cta:hover,
    .fshape-act--cta:hover .fshape-act-bub {
        transform: none;
    }
}

@media (max-width: 360px) {
    .fshape-tip {
        font-size: 11px;
    }

    .fshape-shape-name {
        font-size: 20px;
    }
}
