/* ── Global: prevent horizontal scrollbar ─────────────────────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    min-height: 100%;
}


/* ── WASM inline page loading spinner (Design Studio) ────────────────────── */
.wasm-page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

@keyframes wasm-spin {
    to { transform: rotate(360deg); }
}

.wasm-page-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(25, 118, 210, 0.15);
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: wasm-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.wasm-page-loading-text {
    font-size: 1rem;
    color: #555;
    font-family: Roboto, sans-serif;
    letter-spacing: 0.01em;
}

.wasm-page-loading-text::after {
    content: "";
    animation: ai-dot-blink 1.2s steps(1, end) infinite;
    display: inline-block;
    width: 1.5ch;
    text-align: left;
}

/* ── Animated dots for AI generation loading text ────────────────────────── */
@keyframes ai-dot-blink {
    0%, 20%  { content: ".";   }
    40%      { content: "..";  }
    60%, 100%{ content: "..."; }
}
.ai-dots::after {
    content: ".";
    animation: ai-dot-blink 1.2s steps(1, end) infinite;
    display: inline-block;
    width: 1.5ch;
    text-align: left;
}

/* ── Sticky footer: layout fills full viewport, main content grows ────────── */
.mud-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* prevent horizontal scroll from full-bleed children */
}

.mud-main-content {
    flex: 1 0 auto;
    overflow-x: hidden;
}

.site-footer {
    flex-shrink: 0;
}

/* ── Accessibility / SEO helper ───────────────────────────────────────────── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Site Footer ──────────────────────────────────────────────────────────── */
.site-footer {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    background-color: #0f172a;
    color: #cbd5e1;
    font-family: inherit;
}

/* top section — columns */
.site-footer__top {
    padding: 64px 0 48px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* MudGrid gap override — we handle spacing in CSS */
.site-footer__grid .mud-grid {
    row-gap: 0;
}

.site-footer__col {
    padding: 0 32px 32px 0 !important;
}

.site-footer__col:last-child {
    padding-right: 0 !important;
}

/* Brand name */
.footer-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: .01em;
    margin-bottom: 12px;
}

/* Description paragraph */
.footer-description {
    font-size: .875rem;
    line-height: 1.7;
    color: #94a3b8;
    margin: 0 0 20px;
    max-width: 300px;
}

/* Contact rows */
.footer-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.footer-contact-icon {
    color: #64748b;
    flex-shrink: 0;
    line-height: 1;
    padding-top: 1px;
}

.footer-contact-text {
    font-size: .875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.footer-contact-link {
    font-size: .875rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color .15s ease;
}

.footer-contact-link:hover {
    color: #f8fafc;
}

/* Social chips */
.footer-social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.footer-social-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    color: #94a3b8;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
    border: 1px solid rgba(255, 255, 255, .08);
}

.footer-social-chip:hover {
    background: var(--mud-palette-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Column headings */
.footer-col-heading {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #f8fafc;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mud-palette-primary, #1976d2);
    display: inline-block;
}

/* Nav link list */
.footer-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    color: #94a3b8;
    text-decoration: none;
    padding: 5px 0;
    transition: color .15s ease, gap .15s ease;
}

.footer-nav-link__arrow {
    font-size: 1rem;
    line-height: 1;
    color: #475569;
    transition: color .15s ease, transform .15s ease;
}

.footer-nav-link:hover {
    color: #f8fafc;
    gap: 10px;
}

.footer-nav-link:hover .footer-nav-link__arrow {
    color: var(--mud-palette-primary, #1976d2);
    transform: translateX(2px);
}

/* bottom bar */
.site-footer__bottom {
    padding: 16px 0;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copyright {
    font-size: .78rem;
    color: #475569;
    letter-spacing: .02em;
}

/* ── Dark-mode body already matches; light mode override ─────────────────── */
.mud-theme-light .site-footer {
    background-color: #1e293b;
}

/* ── Hero Slider ──────────────────────────────────────────────────────────── */
.hero-outer {
    position: relative;
    /* break out of MudMainContent pa-4 — same full-bleed technique as footer */
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    margin-bottom: 0;
    /* pull the hero up behind the transparent appbar */
    margin-top: calc(-1 * var(--mud-appbar-height));
}

.hero-slider {
    position: relative;
    /* overflow:hidden clips the track during slide transitions without
       creating a stacking context — dots in .hero-outer (z-index:20 in
       root context) then paint above .hero-below-fold (z-index:5) */
    overflow: hidden;
    height: clamp(540px, 72vw, 1000px);
    background: #111;
    margin-bottom: 0;
    display: block;
    width: 100%;
}

/* Bottom-fade veil: melts the hero image into the page background.
   The colour is set per-theme via CSS variable --hero-fade-color.
   Values are set on both body class AND html[data-initial-theme] so
   the variable is available from the very first SSR byte — no flash.    */
:root { --hero-fade-color: #fafafa; }

/* Dark mode — set on html early via data attribute written by SSR */
html[data-initial-theme="dark"]     { --hero-fade-color: #1e1e1e; }
.mud-theme-dark                     { --hero-fade-color: #1e1e1e; }

/* Theme body classes set by SSR immediately */

.hero-slider::after {
    content: '';
    position: absolute;
    /* Gentle bottom-edge fade inside the slider only.
       The main transparent-to-opaque dissolve — the effect that lets the
       slider image show through the Shop by Category section — is entirely
       handled by .hero-below-fold::before which physically overlaps the
       slider with a fully transparent top zone.                           */
    bottom: 0;
    left: 0;
    right: 0;
    height: 18%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--hero-fade-color) 100%
    );
    pointer-events: none;
    z-index: 3;
}

.hero-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Entrance animation for the first visible slide's content on page load */
@keyframes hero-content-reveal {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.hero-slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1rem, 5vw, 4rem);
    z-index: 2;
    max-width: 860px;
}

.hero-slide-align-left   { align-items: flex-start; text-align: left; }
.hero-slide-align-center { align-items: center; text-align: center; margin: 0 auto; }
.hero-slide-align-right  { align-items: flex-end; text-align: right; margin-left: auto; }

.hero-slide-eyebrow {
    font-size: clamp(.65rem, 1.4vw, .85rem);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    margin: 0 0 .5rem;
}

.hero-slide-heading {
    font-size: clamp(1.5rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 .75rem;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.hero-slide-subheading {
    font-size: clamp(.9rem, 2vw, 1.2rem);
    color: rgba(255,255,255,.9);
    margin: 0 0 1.5rem;
    max-width: 600px;
    text-shadow: 0 1px 6px rgba(0,0,0,.3);
}

.hero-slide-btn {
    display: inline-block;
    padding: .75em 2em;
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: clamp(.85rem, 1.5vw, 1rem);
    border-radius: 40px;
    text-decoration: none;
    transition: background .2s, color .2s, transform .15s;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.hero-slide-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

/* Prev / Next arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,.32);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    width: clamp(36px, 5vw, 52px);
    height: clamp(36px, 5vw, 52px);
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-nav:hover {
    background: rgba(0,0,0,.58);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
}
.hero-nav-prev  { left: clamp(.5rem, 2vw, 1.5rem); }
.hero-nav-next  { right: clamp(.5rem, 2vw, 1.5rem); }

/* Dot indicators */
.hero-dots {
    position: absolute;
    /* Natural bottom edge — visible above .hero-below-fold because
       .hero-dots lives in .hero-outer (no stacking context), so its
       z-index:20 competes in the root context and beats z-index:5 */
    bottom: clamp(28px, 4vw, 48px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .55rem;
    z-index: 20;
    padding: 6px 2px;
    background: none;
}

.hero-dot {
    width: clamp(7px, 1.2vw, 11px);
    height: clamp(7px, 1.2vw, 11px);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    transition: background .25s, border-color .25s,
                width .38s cubic-bezier(.4,0,.2,1),
                border-radius .38s cubic-bezier(.4,0,.2,1),
                transform .2s ease;
    padding: 0;
}

.hero-dot.active {
    background: #fff;
    border-color: #fff;
    width: clamp(22px, 3.8vw, 32px);
    border-radius: 6px;
}

.hero-dot:hover:not(.active) {
    background: rgba(255,255,255,.45);
    border-color: rgba(255,255,255,.9);
    transform: scale(1.18);
}

/* First real slide (index 1 in the [clone, slides..., clone] track) gets
   a one-shot reveal on page load. Subsequent slide changes use the translateX
   track transition and don't need re-animation.                             */
.hero-slider-track .hero-slide:nth-child(2) .hero-slide-content {
    animation: hero-content-reveal 1.15s cubic-bezier(.25, .46, .45, .94) both;
    animation-delay: .2s;
}

/* ── Hero-to-content seamless transition ─────────────────────────────────── */
/* hero-below-fold overlaps the slider via a fluid negative margin-top
   (clamp: -80px on mobile → -200px on wide screens).
   Its ::before is a full-bleed, 500px-tall gradient veil:
     0–250px  : fully transparent  → slider image 100% visible here
     250–500px: smooth dissolve    → page background
   The navigation dots sit above this zone (fluid bottom offset).
   No hard divider lines — the transition is entirely gradient-based.     */
.hero-below-fold {
    position: relative;
    z-index: 5;
    /* Fluid overlap: -80px on small screens → up to -200px on wide screens.
       Keeps the editorial "content over slider" effect while ensuring the
       navigation dots (now repositioned above this zone) remain fully visible. */
    margin-top: clamp(-80px, -16vw, -200px);
}

.hero-below-fold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -50vw;
    width: 100vw;
    /* 500px total:
         0–250px  transparent (covers the max 200px overlap with headroom)
         250–500px smooth dissolve to page background — seamless, no hard line */
    height: 500px;
    background: linear-gradient(
        to bottom,
        transparent   0%,
        transparent  50%,
        var(--hero-fade-color) 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* ── Section separators — seamless fade transitions between home sections ── */

/* Wrapper that sits directly beneath the hero with no gap.
   No negative margin — that was clipping the section header row
   and hiding the "All Categories" / view-all buttons.                   */
.home-section-fade {
    position: relative;
    margin-top: 0;
    padding-top: 0;
    z-index: 1;
}

/* The decorative SVG-free wave divider between sections.
   Insert <div class="section-wave-sep section-wave-sep--down"></div>
   or     <div class="section-wave-sep section-wave-sep--up"></div>        */
.section-wave-sep {
    position: relative;
    width: 100%;
    height: 64px;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
    padding: 0;
    line-height: 0;
}

/* Alternating bands: a subtle full-width gradient stripe that
   reads as a soft visual "breath" between content areas.                 */
.home-section-stripe {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    padding: 3rem 0;
}

/* Light theme stripe */
.home-section-stripe {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(0,0,0,0.028) 50%,
        transparent 100%
    );
}

/* Dark mode stripe */
.mud-theme-dark .home-section-stripe {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255,255,255,0.022) 50%,
        transparent 100%
    );
}

/* ── Ornamental section divider line (replaces MudDivider on home page) ── */
.home-section-divider {
    position: relative;
    width: 100%;
    height: 1px;
    margin: 2.5rem 0;
    background: transparent;
    border: none;
    outline: none;
}

.home-section-divider::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--mud-palette-lines-default) 30%,
        var(--mud-palette-lines-default) 70%,
        transparent 100%
    );
    opacity: 0.55;
}

/* Centre diamond ornament */
.home-section-divider::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--hero-fade-color);
    color: var(--mud-palette-lines-default);
    font-size: 0.5rem;
    padding: 0 0.6rem;
    line-height: 1;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* ── Scroll-reveal: sections rise in on page load ───────────────────────── */
/* Transform-only — opacity is never set to 0, so content is always visible.
   This prevents the blank-section flash during SSR → WASM hydration.       */
@keyframes section-rise-in {
    from { transform: translateY(18px); }
    to   { transform: translateY(0);    }
}

.section-reveal {
    /* forwards only — no backwards fill, so element is never hidden          */
    animation: section-rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger delays — short, so content appears quickly */
.section-reveal:nth-of-type(1) { animation-delay: 0.04s; }
.section-reveal:nth-of-type(2) { animation-delay: 0.10s; }
.section-reveal:nth-of-type(3) { animation-delay: 0.18s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .section-reveal {
        animation: none;
    }
}

/* ── Category Page Header Banner ─────────────────────────────────────────── */
/*
   Full-bleed 16:9 banner (max 600px) that sits at the very top of the
   category page, behind the transparent app-bar, and dissolves seamlessly
   into the page background — mirroring the home hero technique.
   .cat-header-outer  — full-bleed breakout wrapper (same as .hero-outer)
   .cat-header        — clips the image & carries the fade overlay
*/
.cat-header-outer {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    /* Pull up behind the transparent app-bar exactly like .hero-outer */
    margin-top: calc(-1 * var(--mud-appbar-height));
    /* Pull the next sibling (page content) up so it overlaps the bottom of the image */
    margin-bottom: -200px;
    /* Isolate this stacking context so internal z-indices (::after, overlay) stay
       contained here and never paint over .cat-page-content (z-index:1) in root. */
    isolation: isolate;
}

.cat-header {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* 16:9 ratio, hard-capped at 600px */
    aspect-ratio: 16 / 9;
    max-height: 600px;
    background: #111;
}

.cat-header-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Dark overlay tint — controlled by inline style opacity var */
.cat-header-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Bottom-fade: gentle darkening toward the bottom edge of the image only —
   does NOT fade to solid within the clipped box. The seamless page transition
   is handled by .cat-page-content::before (same pattern as .hero-below-fold). */
.cat-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 55%,
        rgba(0,0,0,0.18) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Page content overlaps the bottom of the banner image.
   No solid background here — the ::before veil creates the seamless
   gradient transition from transparent (image visible) to page background.
   Children (MudPaper, MudContainer, etc.) supply their own backgrounds. */
.cat-page-content {
    position: relative;
    z-index: 2;
}

/* Seamless veil — mirrors .hero-below-fold::before exactly.
   Full-bleed 500px gradient:
     0–40%  : fully transparent  → image 100% visible in the overlap zone
     40–100%: smooth dissolve    → solid page background, no hard line     */
.cat-page-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    margin-left: -50vw;
    width: 100vw;
    height: 500px;
    background: linear-gradient(
        to bottom,
        transparent            0%,
        transparent           40%,
        var(--hero-fade-color) 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* Content (title + button) centred over the image */
.cat-header-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: calc(var(--mud-appbar-height) + 1rem) 2rem 3rem;
    text-align: center;
}

.cat-header-title {
    color: #fff;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
    margin: 0;
    line-height: 1.15;
}

.cat-header-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.6rem;
    border-radius: 0;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.cat-header-btn:hover {
    background: #fff;
    color: #111;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .cat-header-outer { margin-bottom: -120px; }
    .cat-header {
        aspect-ratio: 16 / 9;
        max-height: 320px;
    }
    /* Mobile: subtle dark tint only — page transition is handled by .cat-page-content::before */
    .cat-header::after {
        background: linear-gradient(
            to bottom,
            transparent 0%,
            transparent 50%,
            rgba(0,0,0,0.15) 100%
        );
    }
    .cat-header-title {
        font-size: clamp(1.1rem, 6vw, 1.8rem);
    }
}

/* ── Design Studio Header Banner ─────────────────────────────────────────────── */
/*
   Full-bleed fixed-height banner at the top of the Design Studio page.
   Unlike the category page, this banner does NOT overlap the content below —
   the step progress bar sits cleanly underneath. The image fades to the page
   background colour at the bottom for a seamless, professional transition.
   .ds-header-outer  — full-bleed breakout wrapper (pulls behind AppBar)
   .ds-header        — clips the image, carries overlay & bottom fade
*/
.ds-header-outer {
    position: relative;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    /* Pull up behind the transparent app-bar */
    margin-top: calc(-1 * var(--mud-appbar-height));
    /* No negative bottom margin — step bar sits cleanly below the image */
    margin-bottom: 0;
    isolation: isolate;
}

.ds-header {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Fixed clamped height: feels like a banner, never a full-screen takeover */
    height: clamp(220px, 35vw, 420px);
    background: #111;
}

.ds-header-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.ds-header-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Strong bottom-fade: dissolves the image into the exact page background colour
   so the step progress bar appears on a clean surface with no hard edge.        */
.ds-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent         0%,
        transparent        45%,
        rgba(0,0,0,0.15)   65%,
        var(--hero-fade-color) 100%
    );
    pointer-events: none;
    z-index: 3;
}

/* Title centred over the image — pushed down from the AppBar */
.ds-header-content {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: calc(var(--mud-appbar-height) + 0.5rem) 2rem 4rem;
    text-align: center;
}

.ds-header-title {
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 24px rgba(0,0,0,0.7), 0 1px 6px rgba(0,0,0,0.5);
    margin: 0;
    line-height: 1.15;
}

/* Subtitle tag-line beneath the title */
.ds-header-subtitle-line {
    color: rgba(255,255,255,0.88);
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    text-shadow: 0 1px 8px rgba(0,0,0,0.55);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.04em;
}

@media (max-width: 767px) {
    .ds-header { height: clamp(180px, 48vw, 260px); }
    .ds-header-title { font-size: clamp(1.1rem, 6vw, 1.8rem); }
}

/* ── Home page: Category grid cards ──────────────────────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(0.35rem, 1vw, 0.55rem);
}

@media (min-width: 480px)  { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px)  { .cat-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 1600px) { .cat-grid { grid-template-columns: repeat(8, 1fr); } }

/* Skeleton keeps the same aspect-ratio as a real card */
.cat-card-skeleton-wrap {
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
}

.cat-card-skel {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    transform: none;
    border-radius: 0 !important;
}

.cat-card-wrap { display: block; }

/* Clickable card */
.cat-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(.4, 0, .2, 1),
                box-shadow 0.32s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

.cat-card:hover,
.cat-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    outline: none;
}

/* Image container: locks the 4:5 aspect ratio */
.cat-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--mud-palette-background-grey);
}

/* Zoom-in on hover */
.cat-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(.4, 0, .2, 1);
}

.cat-card:hover .cat-card-img,
.cat-card:focus-visible .cat-card-img {
    transform: scale(1.07);
}

/* Bottom-to-top dark gradient for text legibility */
.cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.25) 40%,
        transparent 68%
    );
    pointer-events: none;
    z-index: 1;
}

/* Category name — overlaid at the bottom of the image */
.cat-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.55rem 0.4rem 0.45rem;
    text-align: center;
    z-index: 2;
}

.cat-card-name {
    display: block;
    font-size: clamp(0.6rem, 1.2vw, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

/* Fallback tile when no category image is set */
.cat-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
}


/* ── Home Hero (static fallback) ──────────────────────────────────────────── */
.home-hero {
    background: linear-gradient(120deg, #f8fbff 0%, #edf4ff 50%, #fdf6ec 100%);
    border-bottom: 1px solid #e5e7eb;
}

.home-hero-eyebrow {
    color: #1f2937;
}

.home-hero-title {
    color: #111827;
}

.home-hero-subtitle {
    color: #374151;
    max-width: 760px;
}

.mud-theme-dark .home-hero {
    background: linear-gradient(120deg, #1f2937 0%, #111827 50%, #0f172a 100%);
    border-bottom-color: rgba(255, 255, 255, .08);
}

.mud-theme-dark .home-hero-eyebrow {
    color: #cbd5e1;
}

.mud-theme-dark .home-hero-title {
    color: #f8fafc;
}

.mud-theme-dark .home-hero-subtitle {
    color: #cbd5e1;
}

.category-tile {
    border: 1px solid rgba(0, 0, 0, .08);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
    background: var(--mud-palette-surface);
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.category-tile-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f3f4f6;
}

.category-tile-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform .3s ease;
}

.category-tile:hover .category-tile-image img {
    transform: scale(1.06);
}

.category-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .12) 100%);
    pointer-events: none;
}

.category-tile-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #9ca3af;
}

.category-tile-label {
    padding: 10px 12px;
    text-align: center;
}

.mud-theme-dark .category-tile {
    border-color: rgba(255, 255, 255, .08);
}

.mud-theme-dark .category-tile-image {
    background: #1e293b;
}

.mud-theme-dark .category-tile-overlay {
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .25) 100%);
}

.mud-theme-dark .category-tile-placeholder {
    color: #64748b;
}

/* ── Product card uniform height ─────────────────────────────────────────── */
/* Make the MudCard a flex column so actions always sit at the bottom */
.mud-card.product-uniform-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mud-card.product-uniform-card .mud-card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Title: clamp to 2 lines so it never grows beyond that */
.mud-card.product-uniform-card .mud-card-content .mud-typography-h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em; /* reserves space for 2 lines even when short */
}

/* Rating row: always reserve its height whether or not it renders */
.product-card-rating-placeholder {
    min-height: 28px; /* matches the height of the rating row */
}

/* Push price block to stay consistent */
.mud-card.product-uniform-card .price-block {
    margin-top: auto;
}

/* ── End product card uniform height ──────────────────────────────────────── */

.product-card-image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.product-card-image-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
}

.category-product-image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.category-product-image-frame img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block;
}

.product-primary-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.product-primary-frame img,
.product-gallery-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block;
}

.product-gallery-thumb {
    width: 80px;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.product-gallery-thumb.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.quick-view-main-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.quick-view-thumb {
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    cursor: pointer;
}

.quick-view-thumb.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.manage-gallery-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.manage-gallery-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 255, 255, .85);
}

.dialog-category-image {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f8f8f8;
}

.image-tile-item {
    width: 220px;
}

.image-tile {
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 0 !important;
    transition: transform .12s ease, box-shadow .12s ease;
}

.image-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.unused-image-tile {
    border: 1px solid var(--mud-palette-warning);
}

.library-search {
    min-width: 260px;
}

.library-upload-alt {
    min-width: 220px;
}

.dialog-image-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #f8f8f8;
}

/* ── Dress dialog thumbnail with full-image hover preview ── */
.dress-thumb-wrap {
    cursor: zoom-in;
}

.dress-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
    pointer-events: none;
}

.dress-thumb-wrap:hover .dress-thumb-overlay {
    opacity: 1;
    background: rgba(0,0,0,.32);
}

.dress-full-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.92);
    width: min(340px, 80vw);
    aspect-ratio: 4 / 5;
    background: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,.38);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    overflow: hidden;
}

.dress-thumb-wrap:hover .dress-full-preview {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.picker-search {
    min-width: 250px;
}

.picker-item {
    width: 200px;
}

.picker-tile {
    border: 1px solid #e5e7eb;
    padding: 8px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.picker-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.picker-tile.selected {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 0 0 1px var(--mud-palette-primary) inset;
}

.picker-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #fff;
}

.appbar-search-desktop {
    align-items: center;
    flex: 1;
    max-width: 480px;
    margin-inline: 0.75rem;
}

.appbar-professional {
    padding-inline: 1rem;
    min-height: var(--mud-appbar-height);
    padding-block: 0.35rem;
}

.appbar-brand {
    line-height: 1;
    white-space: nowrap;
}

.appbar-search {
    width: min(620px, 48vw);
    margin-inline: 0.75rem;
}

.appbar-actions-desktop .mud-button-root {
    min-width: auto;
    text-transform: none;
}

.appbar-currency-select {
    min-width: 78px;
}

/* ── Subcategory section on category page ── */

.subcategory-section {
    border: 1px solid rgba(0, 0, 0, .06);
    background: var(--mud-palette-surface);
}

.subcategory-heading {
    color: var(--mud-palette-text-secondary);
    letter-spacing: .02em;
}

.subcategory-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.subcategory-scroll::-webkit-scrollbar {
    height: 4px;
}

.subcategory-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .15);
    border-radius: 4px;
}

.subcategory-chip-link {
    flex-shrink: 0;
}

.subcategory-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 100px;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    cursor: pointer;
    background: var(--mud-palette-background);
}

.subcategory-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
    border-color: var(--mud-palette-primary);
}

.subcategory-chip-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f3f4f6;
}

.subcategory-chip-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.subcategory-chip-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f3f4f6;
    color: #9ca3af;
}

/* dark mode overrides */
.mud-theme-dark .subcategory-section {
    border-color: rgba(255, 255, 255, .06);
}

.mud-theme-dark .subcategory-chip {
    border-color: rgba(255, 255, 255, .10);
}

.mud-theme-dark .subcategory-chip-img,
.mud-theme-dark .subcategory-chip-icon {
    background: #1e293b;
}

.mud-theme-dark .subcategory-chip-icon {
    color: #64748b;
}

.mud-theme-dark .subcategory-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
}

/* HTML Editor */
.html-editor-content {
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.html-editor-content h1,
.html-editor-content h2,
.html-editor-content h3,
.html-editor-content h4,
.html-editor-content h5,
.html-editor-content h6 {
    margin-top: .8em;
    margin-bottom: .4em;
}

.html-editor-content blockquote {
    border-left: 4px solid var(--mud-palette-primary);
    margin: .8em 0;
    padding: .4em 1em;
    background: rgba(0, 0, 0, .03);
}

.mud-theme-dark .html-editor-content blockquote {
    background: rgba(255, 255, 255, .04);
}

.html-editor-content hr {
    border: none;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 1em 0;
}

.html-editor-content table {
    border-collapse: collapse;
    width: 100%;
    margin: .8em 0;
}

.html-editor-content th,
.html-editor-content td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}

.html-editor-content img {
    max-width: 100%;
    height: auto;
}

/* Product description (public page) */
.product-description {
    font-size: 1rem;
    line-height: 1.7;
    word-wrap: break-word;
}

.product-description h1,
.product-description h2,
.product-description h3,
.product-description h4,
.product-description h5,
.product-description h6 {
    margin-top: .8em;
    margin-bottom: .4em;
}

.product-description blockquote {
    border-left: 4px solid var(--mud-palette-primary);
    margin: .8em 0;
    padding: .4em 1em;
    background: rgba(0, 0, 0, .03);
}

.mud-theme-dark .product-description blockquote {
    background: rgba(255, 255, 255, .04);
}

.product-description hr {
    border: none;
    border-top: 1px solid var(--mud-palette-lines-default);
    margin: 1em 0;
}

.product-description table {
    border-collapse: collapse;
    width: 100%;
    margin: .8em 0;
}

.product-description th,
.product-description td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}

.product-description img {
    max-width: 100%;
    height: auto;
}

/* Override MudBlazor's AppBar height variable to match our taller AppBar.
   MudMainContent uses this var for its automatic padding-top. */
:root {
    --mud-appbar-height: 84px;
}

/* ── Transparent AppBar — base styles (all themes) ───────────────────────── */
/* Transparent by default; gains background on scroll via JS .appbar-scrolled */
.appbar-transparent {
    background-color: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid transparent !important;
    transition: background-color 0.35s ease, border-color 0.35s ease,
                box-shadow 0.35s ease, backdrop-filter 0.35s ease !important;
}

.appbar-transparent.appbar-scrolled {
    background-color: var(--mud-palette-appbar-background) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
}

/* Hero pages only: force white icons/text when AppBar is at the top (transparent).
   Uses CSS :has() — supported in all modern browsers (Chrome 105+, FF 121+, Safari 15.4+).
   The selector checks whether the current page contains a full-bleed hero that deliberately
   bleeds behind the AppBar; all other pages get a solid AppBar instead.              */
.mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-icon-button,
.mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-icon-root,
.mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-typography,
.mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) a {
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.mud-theme-light .mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-icon-button,
.mud-theme-light .mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-icon-root,
.mud-theme-light .mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) .mud-typography,
.mud-theme-light .mud-layout:has(.hero-outer, .cat-header-outer, .ds-header-outer) .appbar-transparent:not(.appbar-scrolled) a {
    color: #fff !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Non-hero pages: AppBar is always solid — never transparent, never invisible.
   This fires immediately on load and updates automatically on SPA navigation. */
.mud-layout:not(:has(.hero-outer, .cat-header-outer, .ds-header-outer)) .appbar-transparent:not(.appbar-scrolled) {
    background-color: var(--mud-palette-appbar-background) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

/* ── Transparent bar: marker class (padding-top is MudBlazor default = var(--mud-appbar-height))
   Hero pages opt in to bleed behind the bar via their own negative margin-top.     ─── */
.main-content-transparent-bar {}

/* Extra top offset when mobile search bar is visible — adds 58px on top of appbar height */
.mobile-search-open {
    padding-top: calc(var(--mud-appbar-height) + 58px) !important;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.appbar-logo {
    max-height: 38px;
    max-width: 150px;
    object-fit: contain;
    display: block;
}

/* ── Search suggestion dropdown (shared by desktop + mobile search) ─────────── */

.search-box-wrapper {
    width: 100%;
    max-width: 480px;
}

.search-suggestions-popover .mud-list {
    padding: 4px 0;
}

.suggestion-header {
    padding: 6px 14px 2px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mud-palette-text-secondary);
    border-top: 1px solid var(--mud-palette-lines-default);
    margin-top: 2px;
    pointer-events: none;
    user-select: none;
}

.search-suggestions-popover .mud-list-item:first-child .suggestion-header {
    border-top: none;
    margin-top: 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    width: 100%;
}

.suggestion-thumb {
    width: 38px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    background: var(--mud-palette-background-grey);
}

.suggestion-thumb-placeholder {
    width: 38px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-grey);
    flex-shrink: 0;
}

.suggestion-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mud-palette-text-primary);
}

.suggestion-meta {
    font-size: 0.68rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mud-palette-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-arrow {
    flex-shrink: 0;
}

.suggestion-no-items {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.82rem;
}

/* ── Mobile search bar ─────────────────────────────────────────────────────── */
.mobile-search-bar {
    position: fixed;
    top: var(--mud-appbar-height);
    left: 0;
    right: 0;
    z-index: 1100;
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    animation: slideDown .18s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.mobile-searchbox-inner {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 4px;
}

/* The wrapper makes the autocomplete fill all available width */
.mobile-search-input-wrapper {
    flex: 1;
    min-width: 0;
}

/* Re-use .appbar-search sizing but override max-width for mobile full-bleed */
.mobile-search-input-wrapper .appbar-search {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

.mobile-search-close {
    flex-shrink: 0;
}

/* Mobile mode: the outer wrapper becomes a flex row with close button */
.search-box-mobile-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

/* Mobile autocomplete fills all remaining width */
.search-box-mobile-input {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* ── Drawer layout ─────────────────────────────────────────────────────────── */
.drawer-professional {
    display: flex;
    flex-direction: column;
}

.drawer-header {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    flex-shrink: 0;
}

.drawer-nav-content {
    flex: 1;
    overflow-y: auto;
}

.drawer-footer {
    flex-shrink: 0;
}

.drawer-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
}

.drawer-currency-select {
    min-width: 76px;
    max-width: 120px;
}

/* Ensure MudDrawer content column fills height and uses flex */
.drawer-professional .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}



/* Suppress the default Blazor WASM error bar; ErrorBoundary handles errors gracefully. */#blazor-error-ui { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   DESIGN STUDIO — Full-width professional layout
   Mobile-first, responsive, fast, no fixed heights
   ═══════════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.ds-page {
    width: 100%;
    min-height: 100vh;
    background: var(--mud-palette-background);
    padding-bottom: 80px;
}

/* ── Hero header ── */
.ds-hero {
    width: 100%;
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
    color: #fff;
    padding: 28px 16px 22px;
    position: relative;
    overflow: hidden;
}
/* subtle dot-grid shimmer overlay */
.ds-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
}
.ds-hero::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.09);
    pointer-events: none;
    z-index: 0;
}
.ds-hero-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.ds-hero-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ds-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.6px;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.ds-hero-subtitle {
    font-size: .84rem;
    opacity: .88;
    margin-top: 3px;
    font-weight: 400;
}

/* ── Progress bar / step dots ── */
.ds-progress-bar-wrap {
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ds-step-progress {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ds-step-progress::-webkit-scrollbar { display: none; }

.ds-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 38px;
    position: relative;
    cursor: default;
    flex-shrink: 0;
}
.ds-step-dot > span,
.ds-step-dot > mud-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-secondary);
    transition: all .2s;
}
.ds-dot-done > span,
.ds-dot-done > .mud-icon-root {
    background: var(--mud-palette-success);
    border-color: var(--mud-palette-success);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-dot-active > span {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb),.18);
}
.ds-dot-pending > span {
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-disabled);
}
.ds-dot-label {
    font-size: .62rem;
    white-space: nowrap;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}
.ds-dot-active .ds-dot-label { color: var(--mud-palette-primary); font-weight: 700; }
.ds-dot-done .ds-dot-label { color: var(--mud-palette-success); }

.ds-step-connector {
    flex: 1;
    height: 2px;
    background: var(--mud-palette-lines-default);
    margin: 0 2px;
    margin-bottom: 16px;
    min-width: 10px;
    max-width: 40px;
    transition: background .2s;
}
.ds-connector-done { background: var(--mud-palette-success); }

/* ── Price ticker ── */
.ds-price-ticker {
    max-width: 1400px;
    margin: 6px auto 0;
    padding: 8px 16px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .86rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    background: var(--mud-palette-background-grey, rgba(0,0,0,.03));
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.ds-price-ticker strong { color: var(--mud-palette-primary); font-size: .97rem; font-weight: 700; }

/* ── Content wrapper ── */
.ds-content-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 16px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Step header (back button + title) ── */
.ds-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--mud-palette-lines-default);
}
.ds-step-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    flex: 1;
    letter-spacing: -.3px;
}
.ds-back-btn {
    flex-shrink: 0;
}
.ds-skip-btn {
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Substep label ── */
.ds-substep-label {
    display: flex;
    align-items: center;
    font-size: .88rem;
    font-weight: 600;
    color: var(--mud-palette-primary);
    margin-bottom: 10px;
    gap: 4px;
}

/* ══════════════════════════════════════════
   CARDS — category, dress type, fabric, etc.
   ══════════════════════════════════════════ */
.ds-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.ds-card-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.ds-card-grid-lg {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
}
.ds-fabric-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.ds-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.ds-option-card {
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: 1.5px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .15s;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.ds-option-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
    transform: translateY(-3px);
}
/* Disabled state while a navigation/load is in progress */
.ds-card-disabled {
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}
/* Grid-level pointer-events block (belt-and-suspenders) */
.ds-grid-navigating {
    pointer-events: none;
    cursor: not-allowed;
}
/* Loading overlay shown on the clicked card */
.ds-card-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}
.ds-card-selected {
    border-color: var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb),.18), 0 4px 16px rgba(0,0,0,.12) !important;
}
.ds-card-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--mud-palette-background-grey);
    position: relative;
    flex-shrink: 0;
}
.ds-card-img-wrap img,
.ds-card-img-wrap .mud-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ds-card-selected-check {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--mud-palette-primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    pointer-events: none;
}
.ds-card-label {
    padding: 7px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--mud-palette-surface);
}
.ds-card-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-card-desc {
    font-size: .72rem;
    color: var(--mud-palette-text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ds-card-price {
    font-size: .78rem;
    color: var(--mud-palette-primary);
    font-weight: 600;
    margin-top: 2px;
}
.ds-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--mud-palette-warning);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* ── Pattern card ── */
.ds-pattern-card {
    border-radius: 0;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: border-color .15s, box-shadow .15s, transform .1s;
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
}
.ds-pattern-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transform: translateY(-2px);
}
.ds-pattern-card.ds-card-selected {
    border-color: var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb),.18) !important;
}
.ds-pattern-card > .mud-image,
.ds-pattern-card > img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    display: block;
}
.ds-pattern-name {
    font-size: .7rem;
    font-weight: 600;
    text-align: center;
    padding: 4px 4px 5px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-pattern-type-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--mud-palette-text-secondary);
    margin: 10px 0 4px;
    padding-left: 2px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Section/tab pills ── */
.ds-section-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ds-section-tab {
    padding: 5px 14px;
    border-radius: 20px;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-secondary);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.ds-section-tab:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.ds-section-tab-active {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}

/* ── Loading skeletons ── */
.ds-grid-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
}
.ds-skeleton-card {
    border-radius: 0;
    aspect-ratio: 4 / 5;
}

/* ── Layer panel ── */
.ds-layer-panel {
    background: var(--mud-palette-background-grey);
    border-radius: 0;
    border: 1px solid var(--mud-palette-lines-default);
    padding: 12px 14px;
    margin-top: 10px;
}
.ds-layer-heading {
    font-size: .85rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
    margin-bottom: 8px;
}
.ds-layer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.ds-layer-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--mud-palette-text-secondary);
    transition: all .15s;
}
.ds-layer-chip:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.ds-layer-chip-selected {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}

/* ── Fabric upload box ── */
.ds-upload-box {
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 16px;
    background: var(--mud-palette-background-grey);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.ds-upload-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Measurement grid ── */
.ds-measurement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.ds-measure-card {
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: 0;
    background: var(--mud-palette-surface);
    padding: 10px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: border-color .15s;
}
.ds-measure-card-filled { border-color: var(--mud-palette-primary); }
.ds-measure-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}
.ds-measure-field { margin: 0 !important; }
.ds-preset-panel {
    background: var(--mud-palette-background-grey);
    border-radius: 0;
    padding: 10px 12px;
    border: 1px solid var(--mud-palette-lines-default);
}
.ds-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ds-preset-chip {
    padding: 5px 14px;
    border-radius: 20px;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    outline: none;
}
.ds-preset-chip:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.ds-preset-chip-active {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}
/* ── Measurement step (new rich UX) ── */
.dsm-progress-wrap {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 12px 14px 10px;
}
.dsm-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}
.dsm-progress-bar { border-radius: 999px !important; }
.dsm-preset-panel {
    background: var(--mud-palette-background-grey);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 14px 16px;
}
.dsm-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dsm-preset-chip {
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dsm-preset-chip:hover { border-color: var(--mud-palette-primary); color: var(--mud-palette-primary); }
.dsm-preset-chip-active {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: #fff;
}
.dsm-preset-check { font-size: .75rem; }
/* ── Measurement cards grid ── */
.dsm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.dsm-card {
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: 0;
    background: var(--mud-palette-surface);
    padding: 10px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.dsm-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.dsm-card-filled {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}
.dsm-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dsm-card-icon-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mud-palette-background-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.dsm-card-icon-filled { background: var(--mud-palette-primary); }
.dsm-card-name {
    flex: 1;
    font-size: .8rem;
    font-weight: 700;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dsm-help-btn { margin: -4px -6px -4px auto !important; }
.dsm-field { margin: 0 !important; }
.dsm-card-hint {
    font-size: .72rem !important;
    color: var(--mud-palette-text-secondary) !important;
    line-height: 1.3;
}
/* ── Measurement active card indicator ── */
.dsm-card-active {
    border-color: var(--mud-palette-primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--mud-palette-primary) 25%, transparent) !important;
}
.dsm-active-arrow {
    margin-left: auto;
    flex-shrink: 0;
    animation: dsm-arrow-pulse .8s ease-in-out infinite alternate;
}
@keyframes dsm-arrow-pulse {
    from { opacity: .5; transform: translateX(-2px); }
    to   { opacity: 1;  transform: translateX(2px); }
}
/* ── Fade-in for guide panel content swap ── */
@keyframes dsm-guide-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dsm-guide-fade {
    animation: dsm-guide-fadein .22s ease forwards;
}

/* ── Split layout: fields left, guidance right ── */
.dsm-split-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.dsm-split-fields {
    flex: 1 1 0;
    min-width: 0;
}
/* Guide column — always takes its space on desktop; hidden on mobile via separate rule */
.dsm-split-guide {
    width: 280px;
    flex-shrink: 0;
}

/* ── Guidance panel (right side) ── */
.dsm-guide-panel {
    position: sticky;
    top: 80px;
    background: var(--mud-palette-surface);
    border: 2px solid var(--mud-palette-primary);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 18px rgba(0,0,0,.10);
}
.dsm-guide-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, var(--mud-palette-surface));
    border-bottom: 1px solid color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
}
.dsm-guide-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dsm-guide-image-wrap {
    width: 100%;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
    overflow: hidden;
}
.dsm-guide-image-placeholder {
    width: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.dsm-guide-desc {
    padding: 12px 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.dsm-guide-tips {
    padding: 10px 14px 14px;
    background: color-mix(in srgb, var(--mud-palette-warning) 6%, var(--mud-palette-surface));
}
.dsm-guide-placeholder {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    border: 2px dashed var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
    min-height: 240px;
    text-align: center;
}

/* ── Wizard step-by-step measurement layout ── */

/* Dot navigator */
.dsm-wizard-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.dsm-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .18s ease;
    padding: 0;
    flex-shrink: 0;
}
.dsm-dot-current {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary);
    width: 32px;
    height: 32px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 25%, transparent);
}
.dsm-dot-done {
    border-color: var(--mud-palette-success);
    background: var(--mud-palette-success);
    color: #fff;
}
.dsm-dot-empty {
    border-color: var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
}
.dsm-dot:hover:not(.dsm-dot-current) {
    border-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-background-grey));
}

/* Wizard card outer */
.dsm-wizard-card {
    border: 2px solid var(--mud-palette-primary);
    border-radius: 0;
    background: var(--mud-palette-surface);
    overflow: hidden;
    animation: dsm-guide-fadein .22s ease forwards;
}

/* Two-col layout inside wizard card */
.dsm-wizard-layout {
    display: flex;
    align-items: flex-start;
    min-height: 420px;
}

/* Left guidance column */
.dsm-wizard-guide {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--mud-palette-lines-default);
    display: flex;
    flex-direction: column;
    background: var(--mud-palette-background-grey);
}
.dsm-wizard-img-wrap {
    width: 100%;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    overflow: hidden;
    background: var(--mud-palette-surface);
}
.dsm-wizard-img-placeholder {
    width: 100%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.dsm-wizard-desc {
    padding: 12px 14px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    font-size: .85rem;
}
.dsm-wizard-tips {
    padding: 10px 14px 14px;
    background: color-mix(in srgb, var(--mud-palette-warning) 6%, var(--mud-palette-surface));
    flex: 1;
}

/* Right input column */
.dsm-wizard-input-col {
    flex: 1 1 0;
    min-width: 0;
    padding: 24px 22px 24px;
    display: flex;
    flex-direction: column;
}
.dsm-wizard-field-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.dsm-wizard-field-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mud-palette-background-grey);
    border: 2px solid var(--mud-palette-lines-default);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .18s;
}
.dsm-wizard-icon-done {
    background: var(--mud-palette-success);
    border-color: var(--mud-palette-success);
}
.dsm-wizard-field-name {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mud-palette-text-primary);
}
.dsm-wizard-field-unit {
    font-size: .78rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
}
.dsm-wizard-numfield {
    font-size: 1.4rem !important;
    max-width: 220px;
}
.dsm-wizard-numfield input {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
}

/* Inline row: numeric field + Next button side by side */
.dsm-field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.dsm-field-row .dsm-wizard-numfield {
    flex: 0 0 auto;
}
.dsm-next-inline {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Wizard nav buttons row */
.dsm-wizard-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

/* Figure reveal section */
.dsm-figure-reveal {
    animation: dsm-guide-fadein .3s ease forwards;
}

/* ── Responsive: stack guidance above input on narrow screens ── */
@media (max-width: 700px) {
    .dsm-wizard-layout {
        flex-direction: column;
        min-height: unset;
    }
    .dsm-wizard-guide {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mud-palette-lines-default);
        flex-direction: row;
        flex-wrap: wrap;
    }
    .dsm-wizard-img-wrap {
        width: 120px;
        border-bottom: none;
        border-right: 1px solid var(--mud-palette-lines-default);
        flex-shrink: 0;
    }
    .dsm-wizard-img-placeholder {
        width: 120px;
        min-height: 100px;
        border-bottom: none;
        border-right: 1px solid var(--mud-palette-lines-default);
        flex-shrink: 0;
    }
    .dsm-wizard-desc {
        flex: 1;
        border-bottom: none;
        border-right: none;
    }
    .dsm-wizard-tips {
        width: 100%;
        padding: 8px 14px 10px;
        border-top: 1px solid var(--mud-palette-lines-default);
    }
    .dsm-wizard-input-col {
        padding: 18px 16px 18px;
    }
    .dsm-wizard-nav {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ── Mobile inline guide accordion (hidden on desktop) ── */
.dsm-mobile-guide {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--mud-palette-lines-default);
    animation: dsm-guide-fadein .2s ease forwards;
}
.dsm-mobile-guide-img {
    width: 100%;
    max-width: 160px;
    margin: 0 auto 6px;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
    overflow: hidden;
}

/* ── Full-width content wrapper variant (measurements step) ── */
.ds-content-wrap-full {
    width: 100%;
    padding: 20px 16px;
    box-sizing: border-box;
}
/* sticky bar adjusted for full-width wrapper */
.ds-content-wrap-full .ds-sticky-bar {
    margin: 0 -16px;
    padding: 10px 16px;
}

/* ── Figure upload panel ── */
.dsm-figure-panel {
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 16px;
    background: var(--mud-palette-background-grey);
}
.dsm-figure-inner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.dsm-figure-preview {
    position: relative;
    width: 90px;
    flex-shrink: 0;
}
.dsm-figure-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 4px;
    background: rgba(0,0,0,.35);
}
.dsm-figure-upload-col {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.dsm-upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 90px;
    border: 2px dashed var(--mud-palette-primary);
    border-radius: 0;
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, transparent);
    cursor: pointer;
    padding: 12px;
    text-align: center;
    transition: background .15s;
}
.dsm-upload-dropzone:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}

/* ── Measurement Guidance Dialog ── */
.mgd-dialog .mud-dialog { border-radius: 0 !important; }
.mgd-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mgd-title-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mgd-title-text { display: flex; flex-direction: column; }
.mgd-body {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.mgd-image-wrap {
    width: 180px;
    flex-shrink: 0;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-background-grey);
    overflow: hidden;
}
.mgd-image-placeholder {
    width: 180px;
    flex-shrink: 0;
    min-height: 225px;
    border: 2px dashed var(--mud-palette-lines-default);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background-grey);
}
.mgd-desc-section {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mgd-tips-card {
    background: color-mix(in srgb, var(--mud-palette-warning) 8%, var(--mud-palette-surface));
    border: 1px solid color-mix(in srgb, var(--mud-palette-warning) 30%, transparent);
    border-radius: 0 !important;
    padding: 10px 12px;
}
.mgd-actions {
    width: 100%;
    padding: 4px 8px 4px;
}
/* mobile: stack image above text */
@media (max-width: 599px) {
    .mgd-image-wrap, .mgd-image-placeholder { width: 100%; }
    .mgd-body { flex-direction: column; }
}
/* responsive grid breakpoints */
@media (max-width: 767px) {
    /* On mobile: hide right guide column, show inline accordion instead */
    .dsm-split-guide { display: none; }
    .dsm-mobile-guide { display: block; }
    .dsm-split-layout { flex-direction: column; }
    .dsm-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .dsm-figure-inner { flex-direction: column; }
    .dsm-figure-upload-col { width: 100%; }
    .ds-content-wrap-full { padding: 14px 10px; }
    .ds-content-wrap-full .ds-sticky-bar { margin: 0 -10px; padding: 10px; }
}
@media (min-width: 768px) {
    .dsm-grid { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
    .mgd-image-wrap { width: 200px; }
    .mgd-image-placeholder { width: 200px; min-height: 250px; }
    .dsm-split-guide { width: 300px; }
    .ds-content-wrap-full { padding: 20px 20px; }
    .ds-content-wrap-full .ds-sticky-bar { margin: 0 -20px; padding: 10px 20px; }
}
@media (min-width: 1024px) {
    .dsm-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .mgd-image-wrap { width: 220px; }
    .mgd-image-placeholder { width: 220px; min-height: 275px; }
    .dsm-split-guide { width: 320px; }
    .ds-content-wrap-full { padding: 24px 32px; }
    .ds-content-wrap-full .ds-sticky-bar { margin: 0 -32px; padding: 12px 32px; }
}
@media (min-width: 1400px) {
    .dsm-split-guide { width: 360px; }
}

.ds-figure-upload-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--mud-palette-background-grey);
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: 0;
    padding: 14px;
    margin-top: 4px;
}

/* ── Progress label ── */
.ds-progress-label {
    font-size: .82rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Action bar (bottom of each step) — legacy, kept for sub-components ── */
.ds-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0 2px;
    flex-wrap: wrap;
}
.ds-sticky-bar {
    position: sticky;
    bottom: 0;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    padding: 10px 12px;
    margin: 0 -12px;
    z-index: 50;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.ds-action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.ds-selection-label {
    font-size: .84rem;
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
}
.ds-selection-label strong { color: var(--mud-palette-text-primary); }
.ds-no-selection {
    font-style: italic;
    color: var(--mud-palette-text-disabled);
}

/* ── Fixed bottom navigation AppBar ── */
.ds-bottom-appbar {
    height: 60px !important;
    min-height: 60px !important;
    padding: 0 16px !important;
    border-top: 1px solid var(--mud-palette-lines-default);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: color-mix(in srgb, var(--mud-palette-surface) 92%, transparent) !important;
}
.ds-bottom-appbar .mud-toolbar { height: 60px; min-height: 60px; }
.ds-bbar-left, .ds-bbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.ds-bbar-center {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--mud-palette-text-secondary);
}

/* ── Mobile AppBar: stack center content above the left/right row ── */
@media (max-width: 599px) {
    .ds-bottom-appbar {
        height: auto !important;
        min-height: unset !important;
        padding: 4px 10px !important;
    }
    .ds-bottom-appbar .mud-toolbar {
        height: auto !important;
        min-height: unset !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 0 !important;
        gap: 0;
    }
    /* Center row — full width, sits above Back+Continue */
    .ds-bbar-center {
        order: -1;
        width: 100%;
        flex-basis: 100%;
        justify-content: center;
        padding: 4px 0 3px;
        border-bottom: 1px solid var(--mud-palette-lines-default);
        font-size: .78rem;
        min-height: 26px;
        flex-wrap: wrap;
    }
    /* Back stays left, action buttons stay right — both on the same row */
    .ds-bbar-left {
        order: 0;
        flex: 0 0 auto;
        padding: 4px 0;
    }
    .ds-bbar-right {
        order: 1;
        flex: 0 0 auto;
        margin-left: auto;
        padding: 4px 0;
    }
    /* MudSpacer between them fills remaining space */
    .ds-bottom-appbar .mud-toolbar > .mud-spacer {
        display: none !important;
    }
    .ds-page {
        padding-bottom: 100px;
    }
}
.ds-bbar-warn {
    color: var(--mud-palette-warning-darken) !important;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.ds-bbar-hint {
    font-style: italic;
    font-size: .8rem;
}
/* Section progress dots in the bottom AppBar */
.ds-bbar-pattern-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ds-bbar-section-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-lines-inputs);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
    padding: 0;
}
.ds-bbar-section-dot:hover {
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
}
.ds-bbar-section-dot.active {
    border-color: var(--mud-palette-primary);
    background: var(--mud-palette-primary);
    color: #fff;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
}
.ds-bbar-section-dot.done {
    border-color: var(--mud-palette-success);
    color: var(--mud-palette-success);
    background: color-mix(in srgb, var(--mud-palette-success) 12%, var(--mud-palette-surface));
}
.ds-bbar-section-dot.active.done {
    background: var(--mud-palette-success);
    color: #fff;
    border-color: var(--mud-palette-success);
}
/* ms-2 utility used inline */
.ms-2 { margin-left: 8px !important; }
/* Ensure page content isn't hidden behind the fixed bar */
.ds-page {
    padding-bottom: 72px;
}
/* Inline warning hint from DsFabricStep */
.ds-bottom-hint {
    margin-top: 12px;
}

/* ── Generate / review ── */
/* ── Review: compact pattern cards in right column ── */
.ds-review-pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}
.ds-review-pattern-card {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: box-shadow .15s;
}
.ds-review-pattern-card:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.ds-review-pattern-label {
    padding: 3px 5px 4px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ds-review-pattern-section {
    font-size: .68rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-review-pattern-name {
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mud-palette-text-primary);
}

.ds-generate-wrap {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}
.ds-generate-btn {
    min-width: 220px;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 12px 32px !important;
    letter-spacing: .02em;
}
.ds-generating-status {
    width: 100%;
    max-width: 480px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
    font-size: .88rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ds-generating-hint {
    font-size: .76rem;
    color: var(--mud-palette-text-disabled);
}
/* Live fal.ai status badges */
.ds-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ds-status-queue {
    background: rgba(var(--mud-palette-warning-rgb), .15);
    color: var(--mud-palette-warning-darken);
}
.ds-status-progress {
    background: rgba(var(--mud-palette-primary-rgb), .15);
    color: var(--mud-palette-primary-darken);
}
.ai-dots::after {
    content: '';
    animation: ai-dot-blink 1.2s steps(4, end) infinite;
}
@keyframes ai-dot-blink {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
    100% { content: ''; }
}

/* ── Result layout ── */
.ds-result-wrap { padding-top: 10px; }
.ds-result-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.ds-result-image-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ds-result-img-wrap {
    position: relative;
    cursor: zoom-in;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
}
.ds-result-img-wrap:hover .ds-zoom-hint { opacity: 1; }
.ds-zoom-hint {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.ds-result-img-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ds-result-action-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── AI disclaimer banner ── */
.ds-ai-disclaimer {
    background: linear-gradient(135deg, rgba(var(--mud-palette-warning-rgb, 255,193,7), .08) 0%, rgba(var(--mud-palette-primary-rgb, 99,102,241), .06) 100%);
    border: 1px solid rgba(var(--mud-palette-warning-rgb, 255,193,7), .3);
    border-radius: 0 !important;
}
.ds-ai-disclaimer .mud-link {
    font-size: .75rem;
}

/* ── Image zoom overlay ── */
.ds-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.93);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    cursor: default;
    animation: dsZoomFadeIn .18s ease;
}
@keyframes dsZoomFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* top toolbar */
.ds-zoom-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,.1);
    user-select: none;
}
.ds-zoom-toolbar-left  { display: flex; align-items: center; min-width: 0; }
.ds-zoom-toolbar-center { display: flex; align-items: center; gap: 2px; }
.ds-zoom-toolbar-right  { display: flex; align-items: center; gap: 2px; }
.ds-zoom-toolbar-title {
    color: rgba(255,255,255,.85);
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* make MudIconButton icons white in the toolbar */
.ds-zoom-toolbar .mud-icon-button { color: rgba(255,255,255,.8) !important; }
.ds-zoom-toolbar .mud-icon-button:hover { color: #fff !important; background: rgba(255,255,255,.12) !important; }

/* percent badge */
.ds-zoom-pct {
    color: rgba(255,255,255,.75);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    min-width: 42px;
    text-align: center;
    padding: 0 4px;
}

/* main canvas */
.ds-zoom-canvas {
    flex: 1 1 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    will-change: transform;
}
.ds-zoom-canvas:active { cursor: grabbing; }

/* the image itself — JS sets its transform directly */
.ds-zoom-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 0;
    box-shadow: 0 12px 60px rgba(0,0,0,.7);
    will-change: transform;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

/* bottom hint bar */
.ds-zoom-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    padding: 6px 16px;
    background: rgba(255,255,255,.04);
    border-top: 1px solid rgba(255,255,255,.07);
}
.ds-zoom-hint-text {
    color: rgba(255,255,255,.38) !important;
    font-size: .7rem;
    text-align: center;
    letter-spacing: .02em;
}

/* ═══════════════════════════════════════
   RESPONSIVE — tablet (≥600px)
   ═══════════════════════════════════════ */
@media (min-width: 600px) {
    .ds-hero { padding: 24px 24px 20px; }
    .ds-hero-title { font-size: 1.7rem; }
    .ds-hero-subtitle { font-size: .9rem; }
    .ds-content-wrap { padding: 20px 20px; }
    .ds-card-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; }
    .ds-card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .ds-card-grid-lg { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .ds-measurement-grid { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
    .ds-step-progress { gap: 0; }
    .ds-sticky-bar { padding: 12px 20px; margin: 0 -20px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — desktop (≥960px)
   ═══════════════════════════════════════ */
@media (min-width: 960px) {
    .ds-hero { padding: 32px 48px 26px; }
    .ds-hero-title { font-size: 2rem; }
    .ds-content-wrap { padding: 24px 32px; }
    .ds-card-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
    .ds-card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .ds-card-grid-lg { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .ds-measurement-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
    .ds-result-layout { grid-template-columns: 420px 1fr; }
    .ds-sticky-bar { padding: 12px 32px; margin: 0 -32px; }
    .ds-progress-bar-wrap { padding: 14px 32px; }
}

/* ═══════════════════════════════════════
   RESPONSIVE — wide (≥1280px)
   ═══════════════════════════════════════ */
@media (min-width: 1280px) {
    .ds-card-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .ds-card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .ds-result-layout { grid-template-columns: 480px 1fr; }
}


/* ═══════════════════════════════════════
   NOT FOUND — 404 PAGE
   ═══════════════════════════════════════ */
.notfound-root {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72vh;
    padding: 2rem 1rem;
}

.notfound-card {
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.notfound-code-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.notfound-4 {
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 900;
    color: var(--mud-palette-primary);
    letter-spacing: -.04em;
    opacity: .15;
}

.notfound-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(4rem, 14vw, 7rem);
    height: clamp(4rem, 14vw, 7rem);
    border-radius: 50%;
    background: var(--mud-palette-primary);
    flex-shrink: 0;
}

.notfound-icon {
    font-size: clamp(2rem, 7vw, 3.5rem) !important;
    color: #fff !important;
}

.notfound-heading {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    margin: 0 0 .75rem;
    color: var(--mud-palette-text-primary);
}

.notfound-subtext {
    font-size: 1rem;
    color: var(--mud-palette-text-secondary);
    margin: 0 0 2rem;
    line-height: 1.6;
}

.notfound-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.notfound-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: .92rem;
    color: var(--mud-palette-text-secondary);
}

.notfound-links-label {
    margin-right: .25rem;
}

.notfound-sep {
    color: var(--mud-palette-text-disabled);
}
