/* The product page, then the narrower-screen rules for the fitting room and the product page (they must come after
   both), and a few small extras at the end. */

/* Product page: info and order controls beside the 3D stage (suits) or the photos (everything else). */
.nj-info {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.nj-info .nj-eyebrow a {
    color: inherit;
}

.nj .nj-title {
    font-family: var(--nj-display);
    font-weight: 800;
    font-size: clamp(34px, 4vw, 48px);
    line-height: .95;
    margin: 0;
}

.nj-price {
    font-family: var(--nj-display);
    font-weight: 700;
    font-size: 24px;
}

.nj-tabs {
    margin-top: 6px;
}

.nj-order {
    display: grid;
    gap: 10px;
}

.nj-order .mud-paper-outlined {
    background: transparent;
}

.nj-ship {
    color: var(--nj-dim);
    font-size: 13.5px;
}

.nj-desc {
    max-width: 72ch;
    margin-top: 28px;
    color: var(--nj-glass-text, #c9d2dd);
    line-height: 1.6;
}

.nj-desc-fold {
    border-top: 1px solid var(--fr-line);
    border-bottom: 1px solid var(--fr-line);
}

.nj-desc-fold summary {
    cursor: pointer;
    padding: 10px 0;
    font-family: var(--nj-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: var(--nj-display-case, uppercase);
    color: var(--nj-glass-text, #c9d2dd);
}

.nj-desc-fold summary:hover {
    color: var(--nj-text);
}

.nj-desc-fold .nj-desc {
    margin: 0 0 14px;
}

.nj-product {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
    gap: 32px;
    align-items: start;
}

.nj-product-info {
    display: grid;
    gap: 22px;
}

.nj-product-info .nj-desc {
    margin-top: 0;
}

.nj-gallery {
    background: var(--nj-lit);
    padding: 16px;
}

.nj-gallery .mud-carousel img {
    filter: drop-shadow(12px 16px 16px rgba(0, 0, 0, .65));
}

.nj-gallery .mud-image {
    filter: drop-shadow(4px 6px 6px rgba(0, 0, 0, .6));
}

/* A narrower stage (a tablet, a small or zoomed-in window) keeps the suit beside its colours, but the colour groups
   move to a strip under the suit, one row that scrolls sideways, so they don't cover it. On touch screens the suit takes
   every touch, so the strip is also where a thumb scrolls the page on past the 3D view. */
@media (max-width: 960px) {
    .fr-stage {
        --fr-strip: 52px;
    }

    .fr-canvas {
        bottom: var(--fr-strip);
    }

    .fr-legend {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--fr-strip);
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0 32px 0 12px;
        background: var(--nj-ink);
        border-top: 1px solid var(--nj-edge);
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    }

    .fr-legend::-webkit-scrollbar {
        display: none;
    }

    .fr-legend button {
        flex: none;
    }

    .fr-help {
        bottom: calc(var(--fr-strip) + 12px);
    }

    .nj-product {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Phones (and a laptop window zoomed to 200%): the colours go under the suit. */
@media (max-width: 720px) {
    .fr-screen {
        height: auto;
        min-height: 0;
    }

    .fitting-room {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: 0;
    }

    .fr-scroll {
        overflow: visible;
    }

    .fr-stage {
        height: calc(62vh + var(--fr-strip));
    }
}

@media (max-width: 600px) {
    /* Phones scroll the suit picker with a swipe; the arrows are for mice. */
    .fr-picker-arrow {
        display: none !important;
    }

    .fr-legend button {
        gap: 6px;
        font-size: 12px;
        padding: 4px 9px 4px 5px;
    }

    .fr-legend .fr-dot {
        width: 14px;
        height: 14px;
    }
}

.configurator-table-cell {
    padding: 6px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.mud-swipearea {
    touch-action: pan-y !important;
}

html, body {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    --mud-typography-h4-weight: 350;
    --mud-typography-h3-weight: 350;
    --mud-typography-h2-weight: 350;
}

p, ul, h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 1rem;
}

ul {
    padding-inline-start: 1rem;
}

hr {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    margin-bottom: 1rem;}

h2 {
    font-weight: 400;
}

h3 {
    font-weight: 550;
}

h4 {
    font-weight: 500;
}

.light-text {
    font-weight: 350;
}

.light-italic-text {
    font-weight: 350;
}

.mud-input.mud-input-underline:before {
    border-bottom: 0 !important;
}

.mud-input.mud-input-underline:after {
    border-bottom: 0 !important;
}

.mud-table-dense .mud-table-cell {
    padding: 6px !important;
}

.cart-badge {
    height: 16px;
    inset: calc(100% - 20px) auto auto calc(100% - 20px) !important;
}

.fit-image {
    object-fit: contain;
    background-size: contain;
}

.fit-content {
    width: fit-content;
}

/* MyCarousel: no slide-in animation for the first image on page load */
.my-carousel-initial .mud-carousel-item {
    animation: none !important;
}

/* "Ask on WhatsApp" under the order buttons: a quiet link, the order button stays the main action. */
.fr-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
}

.fr-whatsapp:hover,
.fr-whatsapp:focus-visible {
    color: #25d366;
}

/* A product's designer fills the screen (ProductView's .nj-immersive, on its page and on the home page): the stage runs
   down the left side from top to bottom, the panel with the choices and the order button runs down the right, and the
   shop's header lies over the top of both instead of a bar of its own. The demo banner turns into a small tab at the
   bottom left. Phones keep the usual header, with the stage above the choices. */
@media (min-width: 721px) {
    .nj:has(.nj-immersive) {
        position: relative;
        overflow-x: clip;
        --nj-panel: clamp(380px, 34vw, 500px);
    }

    .nj:has(.nj-immersive) .mud-main-content {
        padding-top: 0 !important;
    }

    .nj:has(.nj-immersive) .nj-nav {
        position: absolute;
        left: 0;
        right: 0;
        background: none;
        border-bottom: 0;
        pointer-events: none;
    }

    .nj:has(.nj-immersive) .nj-nav-inner {
        max-width: none;
        padding-inline: 24px 28px !important;
    }

    .nj:has(.nj-immersive) .nj-nav-inner > * {
        pointer-events: auto;
    }

    /* The page is the designer already. */
    .nj:has(.nj-immersive) .nj-design {
        display: none !important;
    }

    /* The demo banner: a small tab at the top of the stage, between the logo and the colour groups. */
    .nj:has(.nj-immersive) .nj-demo-banner {
        position: absolute;
        top: 16px;
        left: calc((100% - var(--nj-panel)) / 2);
        transform: translateX(-50%);
        z-index: 30;
        max-width: calc(100% - var(--nj-panel) - 360px);
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding: 5px 14px;
        border-radius: 999px;
        font-size: 12.5px;
    }

    .nj:has(.nj-immersive) .nj-demo-long {
        display: none;
    }

    .nj:has(.nj-immersive) .nj-demo-short {
        display: inline;
    }

    .nj-immersive {
        position: relative;
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }

    .nj-immersive .fitting-room {
        grid-template-columns: minmax(0, 1fr) var(--nj-panel);
        gap: 0;
        height: 100vh;
        height: 100dvh;
        min-height: 560px;
    }

    .nj-immersive .fr-stage {
        border: 0;
        border-radius: 0;
        box-shadow: none !important;
    }

    /* The logo sits over the stage's top left corner. */
    .nj-immersive .fr-tools {
        top: 68px;
        left: 16px;
    }

    .nj-immersive .fr-side {
        padding: 72px 28px 20px;
        background: var(--nj-ink2);
        border-left: 1px solid var(--nj-edge);
    }

    .nj-immersive .nj-title {
        font-size: clamp(28px, 2.6vw, 38px);
    }

    /* "More below" (home page) sits at the bottom of the stage. */
    .nj-immersive .nj-more {
        position: absolute;
        left: 0;
        right: var(--nj-panel);
        bottom: 14px;
        width: max-content;
        margin-inline: auto;
        background: color-mix(in srgb, var(--nj-ink) 80%, transparent);
        border-radius: 999px;
        padding: 4px 12px;
    }

    /* The home page's product switcher, above the product's name: small cards in one row. */
    .nj-immersive .fr-picker-wrap {
        margin-bottom: 4px;
    }

    .nj-immersive .fr-picker {
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .nj-immersive .fr-pick {
        flex-direction: row;
        gap: 8px;
        width: auto;
        max-width: 200px;
        padding: 4px 10px 4px 4px;
        font-size: 12.5px;
    }

    .nj-immersive .fr-pick img {
        width: 36px;
        height: 36px;
    }

    .nj-immersive .fr-picker-arrow {
        width: 28px;
        margin-bottom: 2px;
    }

    .nj-immersive .fr-picker-arrow:disabled {
        visibility: hidden;
    }

    /* After the designer, the rest of the home page keeps its usual margins. */
    .nj-immersive + * {
        margin-top: 32px;
    }
}

@media (min-width: 721px) and (max-width: 960px) {
    .nj:has(.nj-immersive) {
        --nj-panel: 340px;
    }

    .nj-immersive .fr-side {
        padding-inline: 18px;
    }
}

/* The sofa's size goes to the bottom left of the full-screen stage, out of the way of the demo tab. */
@media (min-width: 961px) {
    .nj-immersive .sofa-builder .fr-legend {
        top: auto;
        right: auto;
        left: 16px;
        bottom: 16px;
    }
}
