/* =========================================================
   FONT
   ========================================================= */

   /* Ghosthey — the official Senior's Choice brand typeface.
      Served locally (woff2 first, ttf fallback) so the logo and every garment
      print render identically offline, in the 3D studio and after deployment. */
   @font-face {
    font-family: 'Ghosthey';
    src:
        url("./fonts/ghosthey.regular.woff2") format("woff2"),
        url("./fonts/ghosthey.regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: block;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   BRAND LOGO — GHOSTHEY WORDMARK
   ========================================================= */

/* Ghosthey is a heavy blackletter: it needs a little more size, looser tracking
   and extra leading or the two words collide into a black mass. */
.brand .brand-word,
.footer-brand .brand-word {
    display: flex;
    flex-direction: column;
    line-height: 1.16;
    font-family: 'Ghosthey', var(--serif);
    letter-spacing: .055em;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: normal;
    padding-left: 2px;
}

.brand .brand-word b,
.footer-brand .brand-word b {
    font-weight: normal;
    color: var(--red2);
    letter-spacing: .075em;
}

.brand .brand-mark,
.footer-brand .brand-mark {
    font-family: 'Ghosthey', var(--serif) !important;
    letter-spacing: .02em !important;
    font-size: 30px;
    line-height: 1;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
}

/* keep the header from cropping tall blackletter ascenders */
.topbar {
    min-height: 74px;
}

/* =========================================================
   ROOT VARIABLES — BRIGHT MODE
   ========================================================= */

    :root {

    --bg:
        #ffffff;

    --panel:
        #ffffff;

    --panel2:
        #ffffff;

    --line:
        rgba(113,24,29,.18);

    --muted:
        #666666;

    --text:
        #111111;

    --red:
        #71181d;

    --red2:
        #8d252a;

    --cream:
        #ffffff;

    --serif:
        "Playfair Display",Georgia,serif;

    --sans:
        "DM Sans",Arial,sans-serif;

}

html.dark-mode {
    --bg: #000000;
    --panel: #000000;
    --panel2: #000000;
    --line: rgba(139, 32, 37, .35);
    --muted: #a6a6a6;
    --text: #ffffff;
    --red: #8b2025;
    --red2: #a52c31;
    --cream: #000000;
}


/* =========================================================
   DARK MODE
   ========================================================= */

html.dark-mode {

    --bg:
        #000000;

    --panel:
        #000000;

    --panel2:
        #000000;

    --line:
        rgba(139,32,37,.35);

    --muted:
        #a6a6a6;

    --text:
        #ffffff;

    --red:
        #8b2025;

    --red2:
        #a52c31;

    --cream:
        #000000;

}
/* =========================================================
   GLOBAL
   ========================================================= */

* {

    box-sizing:
        border-box;

}

[hidden] {

    display:
        none !important;

}

html {

    scroll-behavior:
        smooth;

}

body {

    margin:
        0;

    background:
        var(--bg);

    color:
        var(--text);

    font-family:
        var(--sans);

    font-size:
        14px;

    line-height:
        1.5;

    min-width:
        320px;

}

button,input,select,textarea {

    font:
        inherit;

}

button {

    cursor:
        pointer;

}

.noise {

    position:
        fixed;

    inset:
        0;

    pointer-events:
        none;

    opacity:
        .035;

    z-index:
        20;

    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");

}

/* =========================================================
   HEADER
   ========================================================= */

.topbar {

    height:
        82px;

    padding:
        0 clamp(22px,5vw,76px);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    border-bottom:
        1px solid var(--line);

    position:
        relative;

    z-index:
        5;

    background:
        color-mix(in srgb, var(--bg) 92%, transparent);

    backdrop-filter:
        blur(16px);

}

.topbar-actions {

    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-actions .top-links {
    flex-shrink: 0;
}

.topbar-actions .btn-quiet {
    flex-shrink: 0;
}

.brand {

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    color:
        var(--text);

    text-decoration:
        none;

    font-size:
        10px;

    letter-spacing:
        .18em;

    font-weight:
        600;

}

.brand b {

    color:
        var(--red2);

    font-weight:
        600;

}

.brand-mark {

    font-family:
        Ghosthey,var(--serif);

    font-size:
        35px;

    letter-spacing:
        -3px;

    color:
        var(--red2);

    line-height:
        1;

}

.top-links {

    display:
        flex;

    gap:
        34px;

}

.top-links a {

    color:
        var(--muted);

    text-decoration:
        none;

    font-size:
        12px;

}

.top-links a:hover {

    color:
        var(--red2);

}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {

    border:
        0;

    border-radius:
        4px;

    padding:
        13px 19px;

    font-weight:
        700;

    font-size:
        11px;

    letter-spacing:
        .07em;

    text-transform:
        uppercase;

    transition:
        .2s ease;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        24px;

}

.btn:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {

    outline:
        2px solid var(--red2);

    outline-offset:
        3px;

}

.btn-primary {

    background:
        var(--red);

    color:
        white;

    box-shadow:
        0 8px 24px color-mix(in srgb, var(--red) 22%, transparent);

}

.btn-primary:hover {

    background:
        var(--red2);

    transform:
        translateY(-2px);

}

.btn-quiet {

    background:
        transparent;

    border:
        1px solid var(--line);

    color:
        var(--muted);

    padding:
        10px 15px;

}

.btn-quiet:hover:not(:disabled) {

    border-color:
        var(--red2);

    color:
        var(--text);

}

.btn:disabled {

    opacity:
        .35;

    cursor:
        not-allowed;

}

.btn-large {

    padding:
        17px 22px;

    font-size:
        11px;

}

.btn-full {

    width:
        100%;

    margin-top:
        10px;

}

.btn-outline {

    background:
        transparent;

    border:
        1px solid var(--line);

    color:
        var(--text);

}

.btn-outline:hover {

    border-color:
        var(--red2);

}


/* =========================================================
   GOTHIC THEME TOGGLE
   ========================================================= */

   .theme-toggle {
    position: relative;

    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--red);
    border-radius: 50%;

    background: transparent;
    color: var(--red);

    cursor: pointer;

    flex-shrink: 0;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}


/* -----------------------------------------
   HOVER
   ----------------------------------------- */

.theme-toggle:hover {

    background: var(--red);
    color: #ffffff;

    border-color: var(--red);

    box-shadow:
        0 0 12px color-mix(
            in srgb,
            var(--red) 45%,
            transparent
        ),
        0 0 24px color-mix(
            in srgb,
            var(--red) 18%,
            transparent
        );

    transform: rotate(-5deg);
}


/* -----------------------------------------
   CLICK
   ----------------------------------------- */

.theme-toggle:active {
    transform: scale(.92);
}


/* -----------------------------------------
   ICONS
   ----------------------------------------- */

.theme-icon {

    position: absolute;

    font-family:
        "Times New Roman",
        Georgia,
        serif;

    font-size: 24px;

    line-height: 1;

    color: inherit;

    pointer-events: none;

    transition:
        opacity .25s ease,
        transform .3s ease;
}


/* -----------------------------------------
   BRIGHT MODE
   SHOW MOON
   ----------------------------------------- */

.theme-moon {

    opacity: 1;

    transform:
        rotate(-18deg)
        scale(1);
}


.theme-sun {

    opacity: 0;

    transform:
        rotate(45deg)
        scale(.5);
}


/* -----------------------------------------
   DARK MODE
   SHOW SUN
   ----------------------------------------- */

html.dark-mode .theme-moon {

    opacity: 0;

    transform:
        rotate(18deg)
        scale(.5);
}


html.dark-mode .theme-sun {

    opacity: 1;

    transform:
        rotate(0deg)
        scale(1);
}


/* =========================================================
   PAGES & ANIMATION
   ========================================================= */

.step {

    display:
        none;

    min-height:
        calc(100vh - 82px);

    animation:
        appear .5s ease;

}

.step.active {

    display:
        flex;

}

@keyframes appear {

    from {

        opacity:
            0;

        transform:
            translateY(10px);

    }

    to {

        opacity:
            1;

        transform:
            none;

    }

}

/* =========================================================
   HERO
   ========================================================= */

.hero {

    position:
        relative;

    overflow:
        hidden;

    align-items:
        center;

    padding:
        75px clamp(24px,10vw,150px) 100px;

    min-height:
        690px;

    background:
        radial-gradient(
            ellipse at 75% 48%,
            color-mix(in srgb, var(--red) 12%, transparent),
            transparent 48%
        ),
        var(--bg);

}

.hero-copy {

    position:
        relative;

    z-index:
        2;

    max-width:
        530px;

}

.eyebrow {

    font-size:
        9px;

    letter-spacing:
        .23em;

    color:
        var(--red2);

    font-weight:
        700;

    display:
        flex;

    align-items:
        center;

    gap:
        10px;

}

.eyebrow span {

    width:
        23px;

    height:
        1px;

    background:
        var(--red);

    display:
        inline-block;

}

.hero h1,.section-heading h2,.studio-heading h2,.process-intro h2 {

    font:
        700 clamp(48px,6.4vw,86px)/1.04 var(--serif);

    letter-spacing:
        -.045em;

    margin:
        26px 0 22px;

}

.hero h1 em,.section-heading h2 em,.studio-heading h2 em,.process-intro h2 em {

    color:
        var(--red2);

    font-weight:
        600;

}

.hero-lede {

    color:
        var(--muted);

    max-width:
        420px;

    font-size:
        14px;

    line-height:
        1.9;

    margin:
        0 0 30px;

}

.hero-proof {

    display:
        flex;

    align-items:
        center;

    gap:
        13px;

    color:
        var(--muted);

    font-size:
        10px;

    margin-top:
        35px;

}

.proof-avatars {

    display:
        flex;

}

.proof-avatars i {

    font-style:
        normal;

    width:
        24px;

    height:
        24px;

    border-radius:
        50%;

    border:
        1px solid color-mix(in srgb, var(--red) 25%, var(--panel));

    background:
        color-mix(in srgb, var(--red) 18%, var(--panel));

    color:
        var(--red2);

    display:
        grid;

    place-items:
        center;

    margin-right:
        -5px;

}

/* =========================================================
   HERO ART
   ========================================================= */

.hero-art {

    position:
        absolute;

    right:
        7%;

    top:
        50%;

    width:
        min(46vw,590px);

    height:
        520px;

    transform:
        translateY(-48%);

}

.orbit {

    position:
        absolute;

    border:
        1px solid color-mix(in srgb, var(--red2) 15%, transparent);

    border-radius:
        50%;

    left:
        10%;

    top:
        3%;

    width:
        78%;

    height:
        90%;

    transform:
        rotate(-18deg);

}

.orbit-two {

    left:
        18%;

    top:
        12%;

    width:
        63%;

    height:
        73%;

    transform:
        rotate(22deg);

}

.hero-garment {

    position:
        absolute;

    filter:
        drop-shadow(
            0 30px 30px rgba(0,0,0,.42)
        );

    display:
        grid;

    place-items:
        center;

}

.hoodie-hero {

    width:
        275px;

    height:
        320px;

    left:
        18%;

    top:
        14%;

    background:
        linear-gradient(
            125deg,
            #ad9d8d,
            #70655d 65%,
            #5a514c
        );

    clip-path:
        polygon(
            27% 9%,
            39% 0,
            61% 0,
            73% 9%,
            91% 18%,
            100% 45%,
            83% 54%,
            76% 42%,
            78% 100%,
            22% 100%,
            24% 42%,
            17% 54%,
            0 45%,
            9% 18%
        );

    transform:
        rotate(-9deg);

}

.hood-shape {

    position:
        absolute;

    top:
        0;

    width:
        82px;

    height:
        80px;

    border:
        14px solid #85776c;

    border-bottom:
        0;

    border-radius:
        50% 50% 0 0;

    opacity:
        .8;

}

.tee-hero {

    width:
        205px;

    height:
        230px;

    right:
        4%;

    bottom:
        8%;

    background:
        linear-gradient(
            130deg,
            #e6ded0,
            #a99d8c
        );

    clip-path:
        polygon(
            27% 8%,
            40% 0,
            60% 0,
            73% 8%,
            95% 20%,
            100% 43%,
            81% 51%,
            75% 40%,
            77% 100%,
            23% 100%,
            25% 40%,
            19% 51%,
            0 43%,
            5% 20%
        );

    transform:
        rotate(10deg);

}

.garment-print {

    position:
        relative;

    z-index:
        1;

    text-align:
        center;

    color:
        #5a202c;

    font:
        12px/1.15 var(--serif);

    letter-spacing:
        .13em;

}

.garment-print strong {

    font-size:
        32px;

}

.hero-note {

    position:
        absolute;

    font-size:
        8px;

    letter-spacing:
        .2em;

    line-height:
        1.8;

    color:
        #c7a4a2;

}

.hero-note b {

    font-size:
        16px;

    color:
        #f2d7d0;

}

.note-top {

    right:
        12%;

    top:
        7%;

}

.note-bottom {

    left:
        3%;

    bottom:
        4%;

}

.sparkle {

    position:
        absolute;

    color:
        #d19a9c;

}

.s1 {

    left:
        8%;

    top:
        28%;

    font-size:
        24px;

}

.s2 {

    right:
        3%;

    top:
        35%;

    font-size:
        30px;

}

.s3 {

    right:
        24%;

    bottom:
        2%;

    font-size:
        26px;

}

.hero-footer {

    position:
        absolute;

    bottom:
        26px;

    left:
        clamp(24px,10vw,150px);

    right:
        clamp(24px,10vw,150px);

    display:
        flex;

    justify-content:
        space-between;

    color:
        var(--muted);

    font-size:
        8px;

    letter-spacing:
        .18em;

}

/* =========================================================
   SELECTION
   ========================================================= */

.selection-step {

    padding:
        65px clamp(22px,8vw,112px) 70px;

    display:
        none;

    flex-direction:
        column;

    background:
        linear-gradient(
            145deg,
            var(--bg),
            #100c0d
        );

}

.selection-step.active {

    display:
        flex;

}

.section-heading {

    max-width:
        520px;

    margin-bottom:
        32px;

}

.section-heading h2,.studio-heading h2 {

    font-size:
        clamp(42px,5vw,62px);

    margin:
        13px 0 10px;

}

.section-heading p {

    color:
        var(--muted);

    margin:
        0;

    font-size:
        12px;

}

/* =========================================================
   PRODUCT CARDS
   ========================================================= */

.product-grid {

    display:
        grid;

    grid-template-columns:
        repeat(4,minmax(0,1fr));

    gap:
        14px;

}

.product-card {

    position:
        relative;

    text-align:
        left;

    background:
        var(--panel);

    border:
        1px solid var(--line);

    color:
        var(--text);

    padding:
        14px 14px 17px;

    min-width:
        0;

    transition:
        .25s;

    border-radius:
        4px;

}

.product-card:hover {

    transform:
        translateY(-4px);

    border-color:
        var(--red2);

}

.product-card.selected {

    border-color:
        var(--red2);

    background:
        color-mix(in srgb, var(--red) 7%, var(--panel));

    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--red) 18%, transparent);

}

.product-index {

    font-size:
        9px;

    letter-spacing:
        .15em;

    color:
        var(--muted);

}

.product-art {

    height:
        205px;

    display:
        grid;

    place-items:
        center;

    position:
        relative;

    background:
        radial-gradient(
            ellipse,
            color-mix(in srgb, var(--red) 9%, transparent),
            transparent 67%
        );

    overflow:
        hidden;

}

.product-art:after {

    content:
        "";

    position:
        absolute;

    bottom:
        23px;

    width:
        65%;

    height:
        15px;

    border-radius:
        50%;

    background:
        #000;

    filter:
        blur(12px);

    opacity:
        .5;

}

.product-art:before {

    content:
        "";

    position:
        absolute;

    z-index:
        0;

    width:
        150px;

    height:
        160px;

    background:
        linear-gradient(
            130deg,
            #e4dbce,
            #8e8278
        );

    clip-path:
        polygon(
            27% 8%,
            40% 0,
            60% 0,
            73% 8%,
            95% 20%,
            100% 43%,
            81% 51%,
            75% 40%,
            77% 100%,
            23% 100%,
            25% 40%,
            19% 51%,
            0 43%,
            5% 20%
        );

    filter:
        drop-shadow(
            0 8px 12px #000
        );

}

.hoodie-art:before {

    background:
        linear-gradient(
            130deg,
            #9c8580,
            #504448
        );

    width:
        155px;

    height:
        170px;

}

.sweat-art:before {

    background:
        linear-gradient(
            130deg,
            #9b9d92,
            #555b54
        );

}

.cap-art:before {

    width:
        150px;

    height:
        90px;

    clip-path:
        ellipse(
            43% 44% at 50% 50%
        );

    border-radius:
        50%;

    background:
        linear-gradient(
            140deg,
            #b69a84,
            #67564e
        );

    transform:
        translateY(-8px);

}

.cap-art:after {

    width:
        115px;

    height:
        30px;

    bottom:
        55px;

    filter:
        none;

    opacity:
        1;

    background:
        #9c7f6d;

    clip-path:
        ellipse(
            50% 50% at 50% 50%
        );

}

.mini-print {

    position:
        relative;

    z-index:
        1;

    text-align:
        center;

    color:
        var(--red);

    font:
        10px/1.1 var(--serif);

    letter-spacing:
        .08em;

}

.mini-print b {

    font-size:
        25px;

}

.product-name {

    display:
        block;

    font:
        600 17px var(--serif);

    margin-top:
        10px;

}

.product-desc {

    display:
        block;

    color:
        var(--muted);

    font-size:
        10px;

    margin-top:
        4px;

}

.choose-label {

    display:
        block;

    margin-top:
        17px;

    color:
        var(--red2);

    font-size:
        8px;

    letter-spacing:
        .15em;

}

/* =========================================================
   SELECTION CONTROLS
   ========================================================= */

.selection-bottom {

    display:
        flex;

    align-items:
        end;

    gap:
        13px;

    margin-top:
        26px;

    padding-top:
        22px;

    border-top:
        1px solid var(--line);

}

.field-group {

    display:
        flex;

    flex-direction:
        column;

    gap:
        7px;

    min-width:
        155px;

}

.field-group label,.control-label {

    font-size:
        8px;

    letter-spacing:
        .16em;

    font-weight:
        700;

    color:
        var(--muted);

}

.field-group select,.tool-panel select {

    background:
        var(--panel2);

    color:
        var(--text);

    border:
        1px solid var(--line);

    border-radius:
        3px;

    padding:
        12px 14px;

    font-size:
        11px;

}

.selection-bottom .btn {

    margin-left:
        auto;

}

/* =========================================================
   DESIGN STUDIO
   ========================================================= */

.studio-step {

    padding:
        36px clamp(18px,5vw,72px) 65px;

    flex-direction:
        column;

    background:
        var(--bg);

}

.studio-step.active {

    display:
        flex;

}

.studio-heading {

    display:
        flex;

    align-items:
        end;

    justify-content:
        space-between;

    margin-bottom:
        24px;

}

.studio-heading h2 {

    margin-bottom:
        0;

}

.studio-status {

    font-size:
        10px;

    color:
        var(--muted);

    display:
        flex;

    align-items:
        center;

    gap:
        9px;

    padding-bottom:
        10px;

}

.status-dot {

    width:
        6px;

    height:
        6px;

    background:
        #83a98a;

    border-radius:
        50%;

    box-shadow:
        0 0 10px #83a98a;

}

.divider-v {

    height:
        15px;

    width:
        1px;

    background:
        var(--line);

    margin:
        0 5px;

}

.studio-layout {

    display:
        grid;

    grid-template-columns:
        340px minmax(0,1fr);

    gap:
        17px;

    min-height:
        610px;

}

.editor-panel,.preview-panel {

    border:
        1px solid var(--line);

    background:
        var(--panel);

    border-radius:
        5px;

    min-width:
        0;

}

/* =========================================================
   EDITOR
   ========================================================= */

.editor-panel {

    padding:
        22px;

    display:
        flex;

    flex-direction:
        column;

}

.editor-top,.preview-top {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

}

.tiny-label {

    font-size:
        8px;

    letter-spacing:
        .18em;

    color:
        var(--muted);

    display:
        block;

}

.editor-top h3,.preview-top h3 {

    font:
        600 19px var(--serif);

    margin:
        5px 0 0;

}

.text-button {

    background:
        none;

    border:
        0;

    color:
        var(--red2);

    font-size:
        10px;

}

.text-button:hover {

    color:
        var(--text);

}

/* =========================================================
   TOOL TABS
   ========================================================= */

.tool-tabs {

    display:
        grid;

    grid-template-columns:
        repeat(4,1fr);

    gap:
        4px;

    margin:
        23px 0 20px;

    border-bottom:
        1px solid var(--line);

}

.tool-tab {

    background:
        transparent;

    color:
        var(--muted);

    border:
        0;

    padding:
        0 0 12px;

    font-size:
        10px;

    border-bottom:
        2px solid transparent;

}

.tool-tab.active {

    color:
        var(--text);

    border-color:
        var(--red2);

}

.tool-panel {

    display:
        none;

    min-height:
        235px;

}

.tool-panel.active {

    display:
        block;

    animation:
        appear .2s ease;

}

.control-label {

    display:
        block;

    margin:
        10px 0 12px;

}

/* =========================================================
   COLOR TOOL
   ========================================================= */

.swatches {

    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        10px;

    margin:
        0 0 24px;

}

.swatch {

    width:
        27px;

    height:
        27px;

    border-radius:
        50%;

    background:
        var(--swatch);

    border:
        2px solid var(--panel);

    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--text) 30%, var(--panel));

    position:
        relative;

}

.swatch.active {

    box-shadow:
        0 0 0 2px var(--red2);

}

.swatch.active:after {

    content:
        "✓";

    position:
        absolute;

    inset:
        0;

    display:
        grid;

    place-items:
        center;

    color:
        var(--swatch);

    filter:
        invert(1);

    font-size:
        11px;

    text-shadow:
        0 1px 2px #333;

}

.color-input-wrap {

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    border:
        1px solid var(--line);

    padding:
        7px 10px;

    color:
        var(--muted);

    font-size:
        10px;

    border-radius:
        3px;

}

.color-input-wrap input {

    width:
        29px;

    height:
        26px;

    border:
        0;

    padding:
        0;

    background:
        transparent;

}

.tip-box {

    margin-top:
        22px;

    padding:
        12px;

    background:
        color-mix(in srgb, var(--red) 8%, var(--panel));

    border-left:
        2px solid var(--red);

    color:
        var(--muted);

    font-size:
        10px;

    line-height:
        1.7;

}

/* =========================================================
   TEXT & ART TOOL
   ========================================================= */

.tool-panel textarea,.tool-panel select {

    width:
        100%;

    resize:
        vertical;

    margin-bottom:
        17px;

}

.tool-panel textarea {

    background:
        var(--panel2);

    color:
        var(--text);

    border:
        1px solid var(--line);

    padding:
        12px;

    border-radius:
        3px;

    font-size:
        12px;

}

.char-count {

    text-align:
        right;

    color:
        var(--muted);

    font-size:
        9px;

    margin-top:
        -13px;

    margin-bottom:
        14px;

}

.range {

    width:
        100%;

    accent-color:
        var(--red2);

}

.art-options {

    display:
        grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:
        7px;

}

.art-option {

    padding:
        11px 6px;

    border:
        1px solid var(--line);

    background:
        var(--panel2);

    color:
        var(--muted);

    border-radius:
        3px;

    font-size:
        10px;

}

.art-option.active {

    border-color:
        var(--red2);

    color:
        var(--text);

    background:
        color-mix(in srgb, var(--red) 10%, var(--panel));

}

.small-help {

    font-size:
        10px;

    color:
        var(--muted);

    line-height:
        1.7;

    margin-top:
        18px;

}

/* =========================================================
   LOGO TOOL
   ========================================================= */

.upload-box {

    display:
        flex;

    align-items:
        center;

    flex-direction:
        column;

    justify-content:
        center;

    gap:
        6px;

    border:
        1px dashed color-mix(in srgb, var(--red) 55%, var(--panel));

    background:
        var(--panel2);

    padding:
        24px 10px;

    cursor:
        pointer;

    color:
        var(--text);

}

.upload-box:hover {

    border-color:
        var(--red2);

    background:
        color-mix(in srgb, var(--red) 10%, var(--panel));

}

.upload-icon {

    font-size:
        24px;

    color:
        var(--red2);

}

.upload-box b {

    font-size:
        11px;

}

.upload-box small {

    font-size:
        9px;

    color:
        var(--muted);

}

.logo-file {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    padding:
        12px 0;

    font-size:
        10px;

    color:
        var(--text);

}

/* =========================================================
   EDITOR FOOTER
   ========================================================= */

.editor-bottom {

    margin-top:
        auto;

    padding-top:
        15px;

}

.save-note {

    font-size:
        9px;

    color:
        var(--muted);

    margin-bottom:
        8px;

}

.save-note span {

    color:
        #5f8a67;

    margin-right:
        6px;

}

/* =========================================================
   PREVIEW
   ========================================================= */

.preview-panel {

    padding:
        22px;

    display:
        flex;

    flex-direction:
        column;

}

.view-toggle {

    display:
        flex;

    padding:
        3px;

    background:
        var(--panel2);

    border-radius:
        4px;

}

.view-button {

    border:
        0;

    background:
        transparent;

    color:
        var(--muted);

    padding:
        8px 14px;

    font-size:
        9px;

    border-radius:
        3px;

}

.view-button.active {

    background:
        var(--red);

    color:
        #ffffff;

}

.preview-stage {

    position:
        relative;

    flex:
        1;

    min-height:
        490px;

    margin-top:
        18px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    background:
        radial-gradient(
            ellipse at 50% 45%,
            color-mix(in srgb, var(--red) 18%, var(--panel)) 0%,
            color-mix(in srgb, var(--red) 10%, var(--panel)) 35%,
            var(--panel2) 72%
        );

}

.stage-glow {

    position:
        absolute;

    width:
        450px;

    height:
        450px;

    border-radius:
        50%;

    background:
        color-mix(in srgb, var(--red) 9%, transparent);

    filter:
        blur(55px);

}

.stage-caption {

    position:
        absolute;

    top:
        20px;

    left:
        22px;

    font-size:
        8px;

    letter-spacing:
        .15em;

    color:
        var(--muted);

}

/* =========================================================
   GARMENT PREVIEW
   ========================================================= */

.garment-wrap {

    position:
        relative;

    width:
        min(54%, 380px);

    aspect-ratio:
        420 / 440;

    filter:
        drop-shadow(
            0 26px 22px rgba(0, 0, 0, .30)
        );

    transition:
        width .3s;

    isolation:
        isolate;

}

/* =========================================================
   GARMENT OPTIONS
   ========================================================= */

.garment-option {

    display:
        none;

}


/* =========================================================
   GARMENT VISIBILITY
   ========================================================= */

/*
   The T-shirt group does not have the garment-option class,
   so it must be explicitly hidden when another garment is active.

   The T-shirt lighting/details are direct children of the SVG
   rather than children of #tshirtGarment, so those paths are
   also explicitly hidden outside the T-shirt view.
*/

.garment-wrap #tshirtGarment {

    display:
        none;

}


.garment-wrap[data-item="T-Shirts"] #tshirtGarment {

    display:
        block;

}


.garment-wrap[data-item="Hoodies"] #hoodieGarment {

    display:
        block;

}


.garment-wrap[data-item="Sweatshirts"] #sweatshirtGarment {

    display:
        block;

}


.garment-wrap[data-item="Caps & Accessories"] #capGarment {

    display:
        block;

}


/* =========================================================
   HIDE T-SHIRT SVG DETAILS
   ========================================================= */

/*
   These are the direct-child paths after the garment groups.
   They belong to the T-shirt's fabric lighting, folds,
   collar, seams and hem.
*/

.garment-wrap[data-item="Hoodies"] .garment-svg > path {

    display:
        none;

}


.garment-wrap[data-item="Sweatshirts"] .garment-svg > path {

    display:
        none;

}


.garment-wrap[data-item="Caps & Accessories"] .garment-svg > path {

    display:
        none;

}


.garment-wrap[data-item="T-Shirts"] .garment-svg > path {

    display:
        block;

}


/* =========================================================
   T-SHIRT
   ========================================================= */

.garment-wrap[data-item="T-Shirts"] #tshirtGarment {

    display:
        block;

}


/* =========================================================
   HOODIE
   ========================================================= */

.garment-wrap[data-item="Hoodies"] #hoodieGarment {

    display:
        block;

}


/* =========================================================
   SWEATSHIRT
   ========================================================= */

.garment-wrap[data-item="Sweatshirts"] #sweatshirtGarment {

    display:
        block;

}


/* =========================================================
   CAPS & ACCESSORIES
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] #capGarment {

    display:
        block;

}

/* =========================================================
   T-SHIRT REALISM
   ========================================================= */

.garment-wrap[data-item="T-Shirts"] {

    filter:
        drop-shadow(
            0 24px 20px rgba(0, 0, 0, .28)
        )
        drop-shadow(
            0 7px 8px rgba(0, 0, 0, .16)
        );

}

/* =========================================================
   T-SHIRT FABRIC LIGHT
   ========================================================= */

.garment-wrap[data-item="T-Shirts"]::before {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        2;

    pointer-events:
        none;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .13) 0%,
            rgba(0, 0, 0, .045) 13%,
            rgba(255, 255, 255, .075) 28%,
            rgba(255, 255, 255, .11) 48%,
            rgba(255, 255, 255, .045) 66%,
            rgba(0, 0, 0, .045) 82%,
            rgba(0, 0, 0, .14) 100%
        );

    clip-path:
        polygon(
            32.14% 13.64%,
            20.24% 18.86%,
            8.33% 35.23%,
            21.43% 44.32%,
            28.57% 35.68%,
            28.57% 88.64%,
            50% 93.2%,
            71.43% 88.64%,
            71.43% 35.68%,
            78.57% 44.32%,
            91.67% 35.23%,
            79.76% 18.86%,
            67.86% 13.64%
        );

    mix-blend-mode:
        soft-light;

}

/* =========================================================
   T-SHIRT BODY LIGHT
   ========================================================= */

.garment-wrap[data-item="T-Shirts"]::after {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        3;

    pointer-events:
        none;

    background:
        radial-gradient(
            ellipse at 50% 46%,
            rgba(255,255,255,.14) 0%,
            rgba(255,255,255,.08) 20%,
            rgba(255,255,255,.02) 42%,
            rgba(0,0,0,.04) 67%,
            rgba(0,0,0,.16) 100%
        );

    clip-path:
        polygon(
            32.1% 13.6%,
            20.2% 18.9%,
            8.3% 35.2%,
            21.4% 44.3%,
            28.6% 35.7%,
            28.6% 88.6%,
            50% 93.2%,
            71.4% 88.6%,
            71.4% 35.7%,
            78.6% 44.3%,
            91.7% 35.2%,
            79.8% 18.9%,
            67.9% 13.6%,
            62% 17%,
            56% 20.2%,
            50% 21.1%,
            44% 20.2%,
            38% 17%
        );

}

/* =========================================================
   T-SHIRT SLEEVE SHADOWS
   ========================================================= */

.garment-wrap[data-item="T-Shirts"] {

    --shirt-fold-dark:
        rgba(0, 0, 0, .075);

    --shirt-fold-light:
        rgba(255, 255, 255, .055);

}


.garment-wrap[data-item="T-Shirts"] .garment-neck::before {

    content:
        "";

    position:
        absolute;

    width:
        72px;

    height:
        2px;

    left:
        50%;

    top:
        42px;

    transform:
        translateX(-50%)
        rotate(-31deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0, 0, 0, .30),
            transparent
        );

    opacity:
        .75;

    pointer-events:
        none;

}


.garment-wrap[data-item="T-Shirts"] .garment-neck::after {

    content:
        "";

    position:
        absolute;

    width:
        72px;

    height:
        2px;

    left:
        50%;

    top:
        42px;

    transform:
        translateX(-50%)
        rotate(31deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(0, 0, 0, .30),
            transparent
        );

    opacity:
        .75;

    pointer-events:
        none;

}

/* =========================================================
   GARMENT SVG
   ========================================================= */

.garment-svg {

    position:
        relative;

    z-index:
        1;

    width:
        100%;

    height:
        100%;

    overflow:
        visible;

}

/* =========================================================
   GARMENT BASE COLOR
   ========================================================= */

/* Main garment shapes only */
.garment-svg #garmentShape,
.garment-svg #tshirtBackShape {
    fill: var(--garment, #eee9df);
    stroke: rgba(0, 0, 0, .14);
    stroke-width: 1.5;
    stroke-linejoin: round;
    transition: fill .2s;
}

.garment-svg #hoodieShape {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.20);

    stroke-width:
        2.8;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}

.garment-svg #sweatshirtShape {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}

.garment-svg #sweatshirtLeftSleeve {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


.garment-svg #sweatshirtRightSleeve {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}

/* =========================================================
   CAP BASE COLOR
   ========================================================= */

   .garment-svg #capShape {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   HOODIE INTERNAL GARMENT COLOR
   ========================================================= */

/*
   Only hoodie paths without an explicit fill need the garment
   color. Paths such as the hood, pocket and cuffs already have
   their own shading fills and must keep those values.
*/

.garment-wrap[data-item="Hoodies"] #hoodieGarment > path:not([fill]) {

    fill:
        var(--garment, #eee9df);

}


/* =========================================================
   T-SHIRT EDGE DEFINITION
   ========================================================= */

.garment-wrap[data-item="T-Shirts"] .garment-svg {

    filter:
        drop-shadow(
            0 2px 2px rgba(0,0,0,.08)
        );

}


.garment-wrap[data-item="T-Shirts"] #tshirtGarment path {

    stroke:
        rgba(0,0,0,.22);

    stroke-width:
        2.4;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

    filter:
        drop-shadow(
            0 2px 3px rgba(0,0,0,.08)
        );

}


/* =========================================================
   T-SHIRT COLLAR
   ========================================================= */

.garment-neck {

    position:
        absolute;

    top:
        12%;

    left:
        41%;

    width:
        18%;

    height:
        7%;

    border:
        9px solid rgba(0,0,0,.17);

    border-top:
        0;

    border-radius:
        0 0 50% 50%;

    opacity:
        .58;

    z-index:
        4;

    pointer-events:
        none;

    box-shadow:
        0 1px 0 rgba(255,255,255,.18),
        inset 0 -3px 4px rgba(0,0,0,.12);

}


.garment-wrap[data-item="T-Shirts"] .garment-neck {

    filter:
        drop-shadow(
            0 1px 1px rgba(0, 0, 0, .10)
        );

}


/* =========================================================
   HOODIE REALISM
   ========================================================= */

.garment-wrap[data-item="Hoodies"] {

    filter:
        drop-shadow(
            0 26px 24px rgba(0,0,0,.32)
        )
        drop-shadow(
            0 8px 10px rgba(0,0,0,.14)
        );

}

/* =========================================================
   HOODIE SILHOUETTE
   ========================================================= */

   .garment-wrap[data-item="Hoodies"] .garment-svg #hoodieShape {

    d:
        path(
            "M142 72
             Q130 48 150 27
             Q171 7 210 7
             Q249 7 270 27
             Q290 48 278 72

             L323 92
             L375 125
             L405 305
             L345 335
             L309 205
             L309 395
             Q210 415 111 395
             L111 205
             L75 335
             L15 305
             L45 125
             L97 92

             Z"
        );

    stroke:
        rgba(0,0,0,.24);

    stroke-width:
        2.8;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   HOOD
   ========================================================= */

.garment-wrap[data-item="Hoodies"] .garment-neck {

    top:
        6%;

    left:
        34%;

    width:
        32%;

    height:
        17%;

    border:
        9px solid rgba(0,0,0,.20);

    border-top:
        0;

    border-radius:
        0 0 50% 50%;

    opacity:
        .78;

    z-index:
        4;

    box-shadow:
        0 2px 3px rgba(0,0,0,.14),
        inset 0 -4px 5px rgba(0,0,0,.12);

}

/* =========================================================
   HOOD INNER SHADOW
   ========================================================= */

.garment-wrap[data-item="Hoodies"] .garment-neck::before {

    content:
        "";

    position:
        absolute;

    left:
        50%;

    top:
        12px;

    width:
        70%;

    height:
        35%;

    transform:
        translateX(-50%);

    border-radius:
        50%;

    background:
        rgba(0,0,0,.16);

    box-shadow:
        inset 0 2px 4px rgba(255,255,255,.08);

}

/* =========================================================
   HOOD SEAM
   ========================================================= */

.garment-wrap[data-item="Hoodies"] .garment-neck::after {

    content:
        "";

    position:
        absolute;

    left:
        50%;

    top:
        48%;

    width:
        78%;

    height:
        30%;

    transform:
        translateX(-50%);

    border:
        2px solid rgba(0,0,0,.10);

    border-top:
        0;

    border-radius:
        0 0 50% 50%;

    opacity:
        .65;

}

/* =========================================================
   HOODIE FABRIC LIGHT
   ========================================================= */

.garment-wrap[data-item="Hoodies"]::before {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        2;

    pointer-events:
        none;

    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.16) 0%,
            rgba(0,0,0,.05) 15%,
            rgba(255,255,255,.07) 31%,
            rgba(255,255,255,.10) 48%,
            rgba(255,255,255,.04) 65%,
            rgba(0,0,0,.06) 82%,
            rgba(0,0,0,.17) 100%
        );

    clip-path:
        polygon(
            33.8% 16.4%,
            23.1% 20.9%,
            10.7% 28.4%,
            3.6% 53.4%,
            18.1% 58.6%,
            26.4% 43.2%,
            26.4% 89.8%,
            50% 94.3%,
            73.6% 89.8%,
            73.6% 43.2%,
            81.9% 58.6%,
            96.4% 53.4%,
            89.3% 28.4%,
            76.9% 20.9%,
            66.2% 16.4%
        );

    mix-blend-mode:
        soft-light;

}

/* =========================================================
   HOODIE BODY LIGHT
   ========================================================= */

.garment-wrap[data-item="Hoodies"]::after {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        3;

    pointer-events:
        none;

    background:
        radial-gradient(
            ellipse at 50% 48%,
            rgba(255,255,255,.10) 0%,
            rgba(255,255,255,.05) 25%,
            rgba(255,255,255,.015) 45%,
            rgba(0,0,0,.07) 70%,
            rgba(0,0,0,.18) 100%
        );

    clip-path:
        polygon(
            34% 16%,
            66% 16%,
            73.6% 43.2%,
            73.6% 89.8%,
            50% 94.3%,
            26.4% 89.8%,
            26.4% 43.2%
        );

}

/* =========================================================
   HOODIE PRINT POSITION
   ========================================================= */

.garment-wrap[data-item="Hoodies"] .print-area {

    top:
        39%;

    left:
        30%;

    width:
        40%;

    min-height:
        25%;

}

/* =========================================================
   PRINT AREA
   ========================================================= */

.print-area {

    position:
        absolute;

    top:
        35%;

    left:
        29%;

    width:
        42%;

    min-height:
        26%;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    gap:
        6px;

    transition:
        .2s;

    z-index:
        5;

}


.print-message {

    font-family:
        var(--print-font,"Playfair Display"),serif;

    color:
        var(--print-color,#8d2637);

    font-size:
        clamp(12px,2vw,22px);

    font-weight:
        700;

    line-height:
        1.15;

    white-space:
        pre-line;

    overflow-wrap:
        anywhere;

    text-shadow:
        0 1px 1px rgba(0,0,0,.08);

}


.art-mark {

    font-size:
        27px;

    color:
        var(--print-color,#8d2637);

    line-height:
        1;

}


.print-area.position-left {

    left:
        22%;

    top:
        27%;

    width:
        24%;

    min-height:
        15%;

}


.print-area.position-left .print-message {

    font-size:
        clamp(9px,1.2vw,14px);

}


.print-area.position-lower {

    top:
        62%;

}


.print-area img {

    max-width:
        70px;

    max-height:
        60px;

    object-fit:
        contain;

}

/* =========================================================
   BACK VIEW
   ========================================================= */

.garment-wrap.show-back {

    filter:
        drop-shadow(
            0 26px 22px rgba(0,0,0,.30)
        )
        drop-shadow(
            0 8px 10px rgba(0,0,0,.12)
        );

}


.garment-wrap.show-back .print-area {

    top:
        42%;

}


.garment-wrap.show-back .print-message:before {

    content:
        "";

    display:
        block;

    width:
        20px;

    height:
        1px;

    background:
        currentColor;

    margin:
        0 auto 7px;

    opacity:
        .4;

}

/* =========================================================
   CAP & ACCESSORIES
   ========================================================= */

   .garment-wrap[data-item="Caps & Accessories"] {

    width:
        min(48%, 330px);

    filter:
        drop-shadow(
            0 24px 22px rgba(0,0,0,.28)
        )
        drop-shadow(
            0 7px 8px rgba(0,0,0,.14)
        );

}


/* =========================================================
   CAP BASE
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .garment-svg #capShape {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   CAP FRONT PANEL
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .garment-svg #capFront {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.16);

    stroke-width:
        2;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   CAP VISOR
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .garment-svg #capVisor {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.20);

    stroke-width:
        2.5;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   CAP DETAILS
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .garment-svg path {

    stroke-linecap:
        round;

    stroke-linejoin:
        round;

}


/* =========================================================
   CAP NECK
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .garment-neck {

    display:
        none;

}


/* =========================================================
   CAP PRINT POSITION
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] .print-area {

    top:
        37%;

}

.garment-wrap[data-item="Sweatshirts"] .garment-neck,
.garment-wrap.show-back .garment-neck {

    display:
        none;

}
/* =========================================================
   PREVIEW CONTROLS
   ========================================================= */

.stage-controls {

    position:
        absolute;

    bottom:
        18px;

    color:
        var(--muted);

    font-size:
        9px;

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

}

.stage-controls span {

    color:
        var(--red2);

}

.preview-bottom {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    padding-top:
        17px;

}

.preview-bottom b {

    display:
        block;

    font-size:
        11px;

    margin-top:
        5px;

}

.preview-tag {

    font-size:
        8px;

    letter-spacing:
        .14em;

    color:
        var(--muted);

}

.preview-tag b {

    display:
        inline;

    color:
        var(--red2);

}

/* =========================================================
   PROCESS
   ========================================================= */

.process-strip {

    padding:
        55px clamp(22px,8vw,112px);

    border-top:
        1px solid var(--line);

    display:
        grid;

    grid-template-columns:
        1.25fr repeat(3,1fr);

    gap:
        35px;

    background:
        var(--bg);

}

.process-intro h2 {

    font-size:
        37px;

    margin:
        12px 0 0;

}

.process-item {

    padding-top:
        9px;

    border-top:
        1px solid color-mix(in srgb, var(--red) 30%, var(--panel));

}

.process-item span {

    color:
        #c47c83;

    font-size:
        9px;

    letter-spacing:
        .15em;

}

.process-item b {

    display:
        block;

    font:
        600 16px var(--serif);

    margin:
        15px 0 6px;

}

.process-item p {

    color:
        var(--muted);

    font-size:
        10px;

    line-height:
        1.8;

    margin:
        0;

}

/* =========================================================
   FOOTER
   ========================================================= */

footer {

    padding:
        23px clamp(22px,5vw,76px);

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    color:
        var(--muted);

    font-size:
        8px;

    letter-spacing:
        .14em;

    border-top:
        1px solid var(--line);

}

.footer-brand {

    color:
        var(--text);

}

.footer-brand .brand-mark {

    font-size:
        28px;

}

/* =========================================================
   TOAST
   ========================================================= */

.toast {

    position:
        fixed;

    bottom:
        24px;

    left:
        50%;

    transform:
        translate(-50%,20px);

    background:
        var(--red);

    color:
        #ffffff;

    padding:
        12px 18px;

    border-radius:
        4px;

    font-size:
        11px;

    font-weight:
        700;

    box-shadow:
        0 8px 35px #0008;

    opacity:
        0;

    pointer-events:
        none;

    transition:
        .25s;

    z-index:
        50;

}

.toast.show {

    opacity:
        1;

    transform:
        translate(-50%,0);

}

/* =========================================================
   SUMMARY DIALOG
   ========================================================= */

dialog {

    border:
        1px solid #65444a;

    background:
        var(--panel);

    color:
        var(--text);

    border-radius:
        6px;

    padding:
        30px;

    width:
        min(440px,calc(100% - 30px));

    box-shadow:
        0 20px 80px #000b;

}

dialog::backdrop {

    background:
        rgba(0,0,0,.72);

    backdrop-filter:
        blur(5px);

}

.dialog-close {

    float:
        right;

    border:
        0;

    background:
        none;

    color:
        var(--text);

    font-size:
        24px;

}

dialog h2,
.dialog h2 {

    font:
        700 34px var(--serif);

    margin:
        15px 0 22px;

}

dialog h2 em,
.dialog h2 em {

    color:
        var(--red2);

}

.summary-row {

    display:
        flex;

    justify-content:
        space-between;

    border-top:
        1px solid var(--line);

    padding:
        11px 0;

    font-size:
        11px;

}

.summary-row span:first-child {

    color:
        var(--muted);

}

.summary-row span:last-child {

    text-align:
        right;

    max-width:
        60%;

    color:
        var(--text);

}

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */



@media(max-width:900px) {

    .hero {

        padding-left:
            7vw;

    }

    .hero-art {

        right:
            -3%;

        opacity:
            .8;

        width:
            52vw;

    }

    .studio-layout {

        grid-template-columns:
            300px minmax(0,1fr);

    }

    .product-art {

        height:
            165px;

    }

    .process-strip {

        gap:
            20px;

    }

    .garment-wrap {

        width:
            65%;

    }

}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media(max-width:680px) {

    .topbar {

        height:
            68px;

        padding:
            0 18px;

    }

    .top-links {

        display:
            none;

    }

    .topbar-actions {

        gap:
            10px;

    }

    .theme-toggle {

        width:
            38px;

        height:
            38px;

    }

    .brand {

        font-size:
            8px;

    }

    .brand-mark {

        font-size:
            30px;

    }

    .step {

        min-height:
            calc(100vh - 68px);

    }

    .hero {

        min-height:
            760px;

        align-items:
            flex-start;

        padding:
            90px 25px 100px;

    }

    .hero h1 {

        font-size:
            58px;

    }

    .hero-copy {

        max-width:
            100%;

    }

    .hero-lede {

        max-width:
            330px;

    }

    .hero-art {

        width:
            100%;

        height:
            360px;

        top:
            auto;

        bottom:
            25px;

        right:
            -7%;

        transform:
            none;

        opacity:
            .6;

    }

    .hoodie-hero {

        width:
            190px;

        height:
            220px;

    }

    .tee-hero {

        width:
            145px;

        height:
            165px;

    }

    .hero-footer {

        left:
            24px;

        right:
            24px;

        font-size:
            7px;

    }

    .selection-step {

        padding:
            42px 18px;

    }

    .product-grid {

        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:
            10px;

    }

    .product-art {

        height:
            145px;

    }

    .product-card {

        padding:
            10px;

    }

    .selection-bottom {

        flex-wrap:
            wrap;

    }

    .field-group {

        flex:
            1;

        min-width:
            calc(50% - 10px);

    }

    .selection-bottom .btn {

        width:
            100%;

        margin:
            8px 0 0;

    }

    .studio-step {

        padding:
            30px 13px 45px;

    }

    .studio-heading {

        align-items:
            flex-start;

        gap:
            10px;

        flex-direction:
            column;

    }

    .studio-status {

        padding:
            0;

    }

    .studio-layout {

        grid-template-columns:
            1fr;

        min-height:
            0;

    }

    .editor-panel {

        order:
            2;

        padding:
            17px;

    }

    .preview-panel {

        order:
            1;

        padding:
            15px;

    }

    .preview-stage {

        min-height:
            390px;

    }

    .garment-wrap {

        width:
            min(65%,300px);

    }

    .studio-heading h2 {

        font-size:
            43px;

    }

    .process-strip {

        grid-template-columns:
            1fr 1fr;

        padding:
            42px 22px;

        gap:
            25px;

    }

    .process-intro {

        grid-column:
            1/-1;

    }

    .process-intro h2 {

        font-size:
            34px;

    }

    .process-item b {

        font-size:
            14px;

    }

    footer {

        flex-wrap:
            wrap;

        gap:
            12px;

        padding:
            20px 18px;

    }

    footer>span:nth-child(2) {

        display:
            none;

    }

}

/* =========================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================= */

@media(max-width:390px) {

    .hero h1 {

        font-size:
            49px;

    }

    .product-art {

        height:
            120px;

    }

    .preview-stage {

        min-height:
            340px;

    }

    .garment-wrap {

        width:
            75%;

    }

    .studio-status {

        font-size:
            8px;

    }

}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce) {

    *,*:before,*:after {

        scroll-behavior:
            auto!important;

        animation-duration:
            .01ms!important;

        transition-duration:
            .01ms!important;

    }

}


/* =========================================================
   FRONT / BACK PRINT VISIBILITY
   ========================================================= */

   .front-print-area,
   .back-print-area {
   
       transition:
           opacity .2s ease,
           visibility .2s ease;
   
   }
   
   
   /* =========================================================
      FRONT VIEW
      ========================================================= */
   
   .preview-stage[data-side="front"] .front-print-area {
   
       opacity:
           1;
   
       visibility:
           visible;
   
       pointer-events:
           auto;
   
   }
   
   
   .preview-stage[data-side="front"] .back-print-area {
   
       opacity:
           0;
   
       visibility:
           hidden;
   
       pointer-events:
           none;
   
   }
   
   
   /* =========================================================
      BACK VIEW
      ========================================================= */
   
   .preview-stage[data-side="back"] .front-print-area {
   
       opacity:
           0;
   
       visibility:
           hidden;
   
       pointer-events:
           none;
   
   }
   
   
   .preview-stage[data-side="back"] .back-print-area {
   
       opacity:
           1;
   
       visibility:
           visible;
   
       pointer-events:
           auto;
   
   }


   /* =========================================================
   BACK GARMENT VISIBILITY
   ========================================================= */

.back-garment {

    display:
        none;

}


/* =========================================================
   HIDE FRONT GARMENTS AND FRONT DETAILS
   WHEN VIEWING THE BACK
   ========================================================= */

.garment-wrap.show-back .garment-svg > *:not(defs):not(.back-garment) {

    display:
        none !important;

}


/* =========================================================
   T-SHIRT BACK VISIBILITY
   ========================================================= */

.garment-wrap[data-item="T-Shirts"].show-back #tshirtBackGarment {

    display:
        block !important;

}


/* =========================================================
   HOODIE BACK VISIBILITY
   ========================================================= */

.garment-wrap[data-item="Hoodies"].show-back #hoodieBackGarment {

    display:
        block !important;

}


/* =========================================================
   SWEATSHIRT BACK VISIBILITY
   ========================================================= */

.garment-wrap[data-item="Sweatshirts"].show-back #sweatshirtBackGarment {

    display:
        block !important;

}


/* =========================================================
   CAP BACK VISIBILITY
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"].show-back #capBackGarment {

    display:
        block !important;

}


/* =========================================================
   BACK GARMENT BASE COLORS
   ========================================================= */

.garment-svg #tshirtBackShape,
.garment-svg #hoodieBackShape,
.garment-svg #sweatshirtBackShape,
.garment-svg #capBackShape {

    fill:
        var(--garment, #eee9df);

    stroke:
        rgba(0,0,0,.18);

    stroke-width:
        2.6;

    stroke-linejoin:
        round;

    paint-order:
        stroke fill;

}


/* =========================================================
   BACK GARMENT SIZING
   ========================================================= */

.garment-wrap[data-item="Caps & Accessories"] {

    width:
        min(48%, 330px);

}


/* =========================================
   REALISM 02 — T-SHIRT FABRIC & DEPTH
   ========================================= */

   .garment-wrap[data-item="T-Shirts"] {
    isolation: isolate;
    filter:
        drop-shadow(0 18px 15px rgba(0, 0, 0, .22))
        drop-shadow(0 4px 5px rgba(0, 0, 0, .12));
}

.garment-wrap[data-item="T-Shirts"] .garment-svg {
    overflow: visible;
}

/* Smooth garment silhouette */
.garment-wrap[data-item="T-Shirts"] #garmentShape,
.garment-wrap[data-item="T-Shirts"] #tshirtBackShape {
    fill: var(--garment, #eee9df);
    stroke: rgba(0, 0, 0, .13);
    stroke-width: 1.5;
    stroke-linejoin: round;
}

/* Fabric surface */
.garment-wrap[data-item="T-Shirts"] #tshirtGarment,
.garment-wrap[data-item="T-Shirts"] #tshirtBackGarment {
    transform-origin: center;
}

/* Natural preview lighting */
.garment-wrap[data-item="T-Shirts"]::before {
    content: "";
    position: absolute;
    inset: 8% 15% 8%;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        105deg,
        transparent 15%,
        rgba(255,255,255,.07) 35%,
        transparent 55%,
        rgba(0,0,0,.035) 85%
    );
    mix-blend-mode: soft-light;
}

/* Print sits above fabric shading */
.garment-wrap[data-item="T-Shirts"] .print-area {
    z-index: 4;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.08));
}
/* =========================================
   REALISM 03 — FABRIC TEXTURE
   ========================================= */

   .garment-wrap[data-item="T-Shirts"] {
    filter:
        drop-shadow(0 20px 18px rgba(0,0,0,.20))
        drop-shadow(0 5px 7px rgba(0,0,0,.12));
}

.garment-wrap[data-item="T-Shirts"] .garment-svg {
    overflow: visible;
    shape-rendering: geometricPrecision;
}

/* Subtle surface lighting */
.garment-wrap[data-item="T-Shirts"]::before {
    content: "";
    position: absolute;
    inset: 8% 12% 8%;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            105deg,
            transparent 15%,
            rgba(255,255,255,.07) 38%,
            transparent 58%,
            rgba(0,0,0,.045) 90%
        );
    mix-blend-mode: soft-light;
}

/* Keep the design above the fabric */
.garment-wrap[data-item="T-Shirts"] .print-area {
    z-index: 4;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.10));
}


/* =========================================
   REALISM 04 — SLEEVE CONSTRUCTION
   ========================================= */

   .garment-wrap[data-item="T-Shirts"] .garment-svg {
    position: relative;
    z-index: 1;
}

/* Left sleeve */
.garment-wrap[data-item="T-Shirts"]::before {
    content: "";
    position: absolute;
    top: 13%;
    left: 8.3%;
    width: 24.5%;
    height: 34%;
    z-index: 2;
    pointer-events: none;

    clip-path: polygon(
        100% 0,
        70% 10%,
        8% 54%,
        0 72%,
        40% 100%,
        54% 94%,
        82% 70%
    );

    background:
        /* Shoulder seam */
        linear-gradient(
            132deg,
            transparent 47%,
            rgba(0,0,0,.17) 48%,
            rgba(0,0,0,.17) 49%,
            transparent 50%
        ),
        /* Sleeve highlight */
        linear-gradient(
            115deg,
            rgba(255,255,255,.20),
            transparent 35%,
            rgba(0,0,0,.10) 85%
        ),
        /* Sleeve hem shading */
        linear-gradient(
            to bottom,
            transparent 78%,
            rgba(0,0,0,.12)
        );

    opacity: .8;
    mix-blend-mode: multiply;
}

/* Right sleeve */
.garment-wrap[data-item="T-Shirts"]::after {
    content: "";
    position: absolute;
    top: 13%;
    right: 8.3%;
    width: 24.5%;
    height: 34%;
    z-index: 2;
    pointer-events: none;

    clip-path: polygon(
        0 0,
        30% 10%,
        92% 54%,
        100% 72%,
        60% 100%,
        46% 94%,
        18% 70%
    );

    background:
        linear-gradient(
            48deg,
            transparent 47%,
            rgba(0,0,0,.17) 48%,
            rgba(0,0,0,.17) 49%,
            transparent 50%
        ),
        linear-gradient(
            65deg,
            rgba(0,0,0,.10),
            transparent 45%,
            rgba(255,255,255,.18)
        ),
        linear-gradient(
            to bottom,
            transparent 78%,
            rgba(0,0,0,.12)
        );

    opacity: .8;
    mix-blend-mode: multiply;
}

/* Keep the print above sleeve shading */
.garment-wrap[data-item="T-Shirts"] .print-area {
    position: absolute;
    z-index: 4;
}


/* =========================================
   REALISM 05 — BODY SEAMS & FABRIC FOLDS
   ========================================= */

/* Body seam details */
.garment-wrap[data-item="T-Shirts"] #tshirtGarment {
    isolation: isolate;
}

/* Subtle side seam definition */
.garment-wrap[data-item="T-Shirts"] #garmentShape {
    paint-order: fill stroke;
}

/* Fabric depth along the sides */
.garment-wrap[data-item="T-Shirts"] .garment-svg {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.05));
}

/* Keep print readable over fabric */
.garment-wrap[data-item="T-Shirts"] .print-area {
    z-index: 4;
}

/* Soft body contour lighting */
.garment-wrap[data-item="T-Shirts"] .garment-svg::after {
    content: "";
    display: block;
}

/* Fine fabric surface definition */
.garment-wrap[data-item="T-Shirts"] {
    background:
        repeating-linear-gradient(
            95deg,
            rgba(255,255,255,.012) 0px,
            rgba(255,255,255,.012) 1px,
            transparent 1px,
            transparent 4px
        );
}

/* Natural side shadows */
.garment-wrap[data-item="T-Shirts"]::marker {
    content: "";
}

/* PAGE 2 — KEEP SELECTION GARMENTS VISIBLE IN BOTH THEMES */

#typePage .product-garment-svg {
    fill: var(--red);
}


/* =========================================================
   STAGE 3 — CHECKOUT
   ========================================================= */

   .checkout-page {
    padding: 72px clamp(22px, 7vw, 110px) 90px;
    background:
        linear-gradient(
            145deg,
            var(--bg),
            #100c0d
        );
}

.checkout-page.active,
.order-success.active {
    display: block;
}

.checkout-heading {
    max-width: 650px;
    margin-bottom: 42px;
}

.checkout-heading h2 {
    font-size: clamp(42px, 5vw, 64px);
    margin: 12px 0;
}

.checkout-heading p {
    color: var(--muted);
    max-width: 570px;
    line-height: 1.8;
}

.checkout-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(300px, 380px);
    gap: 22px;
    align-items: start;
}

.checkout-main {
    display: grid;
    gap: 18px;
}

.checkout-card,
.checkout-summary-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 28px;
}

.checkout-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.checkout-card-header h3 {
    margin: 8px 0 0;
    font-size: 25px;
}

.checkout-price {
    font-weight: 700;
    font-size: 18px;
}

.checkout-item-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.checkout-preview-garment {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #eee9df;
    color: #8d2637;
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 700;
}

.checkout-item-preview strong,
.checkout-item-preview span {
    display: block;
}

.checkout-item-preview span {
    color: var(--muted);
    margin-top: 5px;
    font-size: 12px;
}

.checkout-field {
    position: relative;
    margin-top: 20px;
}

.checkout-field label,
.checkout-label {
    display: block;
    margin-bottom: 9px;
    font-size: 10px;
    letter-spacing: .16em;
    font-weight: 700;
}

.checkout-field input,
.checkout-field textarea,
.checkout-field select,
.checkout-card textarea,
.checkout-card input[type="text"],
.checkout-card input[type="email"],
.checkout-card input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
    outline: none;
    transition: border-color .2s;
}

.checkout-field input:focus,
.checkout-card textarea:focus,
.checkout-person-row input:focus,
.checkout-person-row select:focus {
    border-color: var(--red2);
}

.quantity-control {
    display: flex;
    width: 150px;
    border: 1px solid var(--line);
}

.quantity-control button {
    width: 42px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
}

.quantity-control input {
    border: 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: center;
    width: 66px;
}

.checkout-section {
    margin-top: 30px;
}

.checkout-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.checkout-section-title h4 {
    margin: 7px 0 0;
    font-size: 21px;
}

.checkout-help,
.field-help {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    margin-top: 8px;
}

.checkout-people-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.checkout-person-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 150px;
    gap: 10px;
    align-items: center;
}

.checkout-person-number {
    color: var(--muted);
    font-size: 12px;
}

.checkout-person-row input,
.checkout-person-row select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    padding: 12px;
    font: inherit;
}

.checkout-card textarea {
    resize: vertical;
    min-height: 120px;
}

.checkout-character-count {
    text-align: right;
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
}

.checkout-field-full {
    grid-column: 1 / -1;
}

.payment-badge {
    padding: 6px 9px;
    border: 1px solid var(--line);
    font-size: 9px;
    letter-spacing: .12em;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    margin-top: 20px;
    border: 1px solid var(--line);
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #e60000;
    color: white;
    font-weight: 800;
}

.payment-method-card strong,
.payment-method-card span {
    display: block;
}

.payment-method-card span {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

.payment-number-box {
    padding: 18px;
    margin-top: 12px;
    border: 1px dashed var(--line);
}

.payment-number-box span,
.payment-number-box strong {
    display: block;
}

.payment-number-box span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .16em;
}

.payment-number-box strong {
    margin-top: 7px;
    font-size: 18px;
}

.payment-screenshot-preview {
    margin-top: 12px;
    border: 1px solid var(--line);
    padding: 8px;
}

.payment-screenshot-preview img {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.checkout-sidebar {
    position: sticky;
    top: 90px;
}

.checkout-summary-card h3 {
    margin: 9px 0 25px;
    font-size: 28px;
}

.checkout-summary-items {
    border-top: 1px solid var(--line);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.checkout-summary-row span {
    color: var(--muted);
}

.checkout-summary-row strong {
    text-align: right;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.checkout-total span:first-child {
    font-size: 10px;
    letter-spacing: .16em;
}

.checkout-total strong {
    font-size: 26px;
}

.checkout-security-note {
    display: flex;
    gap: 9px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.checkout-security-note span {
    color: #3d9c68;
    font-weight: 700;
}

.checkout-summary-card .btn + .btn {
    margin-top: 10px;
}


/* =========================================================
   ORDER SUCCESS
   ========================================================= */

.order-success {
    min-height: 70vh;
    padding: 100px 24px;
    display: none;
    place-items: center;
    text-align: center;
    background:
        linear-gradient(
            145deg,
            var(--bg),
            #100c0d
        );
}

.order-success-inner {
    max-width: 600px;
    margin: auto;
}

.success-mark {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 28px;
    border: 1px solid var(--line);
    font-size: 30px;
}

.order-success h2 {
    font-size: clamp(40px, 5vw, 60px);
    margin: 15px 0;
}

.order-success p {
    color: var(--muted);
    line-height: 1.8;
}

.order-reference {
    display: inline-block;
    margin: 30px 0;
    padding: 18px 28px;
    border: 1px solid var(--line);
}

.order-reference span,
.order-reference strong {
    display: block;
}

.order-reference span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: .15em;
}

.order-reference strong {
    margin-top: 7px;
    font-size: 20px;
    letter-spacing: .08em;
}


/* =========================================================
   CHECKOUT RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-sidebar {
        position: static;
    }

}


@media (max-width: 600px) {

    .checkout-card,
    .checkout-summary-card {
        padding: 20px;
    }

    .checkout-form-grid {
        grid-template-columns: 1fr;
    }

    .checkout-field-full {
        grid-column: auto;
    }

    .checkout-person-row {
        grid-template-columns: 30px 1fr;
    }

    .checkout-person-row select {
        grid-column: 2;
    }

}


/* =========================================================
   STAGE 4 — PHOTOREALISTIC STUDIO GARMENTS & INTERACTIVE RACK
   ========================================================= */

/* ---------------------------------------------------------
   1. HOMEPAGE HERO — INTERACTIVE CHROME CLOTHING RACK
   --------------------------------------------------------- */

.hero:has(.has-studio-rack) {
    justify-content: space-between;
    gap: clamp(24px, 4vw, 56px);
    padding: 64px clamp(24px, 6.5vw, 115px) 96px;
}

.hero:has(.has-studio-rack) .hero-copy {
    flex: 0 1 460px;
}

.hero-art.has-studio-rack {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    flex: 1 1 540px;
    width: auto;
    max-width: 680px;
    height: 475px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-art.has-studio-rack .hero-garment {
    display: none;
}

.hero-art.has-studio-rack .note-top {
    right: 4%;
    top: 2%;
    z-index: 6;
}

.hero-art.has-studio-rack .note-bottom {
    left: 2%;
    bottom: 2%;
    z-index: 6;
}

.studio-rack {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 410px;
    display: flex;
    flex-direction: column;
    user-select: none;
}

/* Brushed Chrome Rail + Wall Mounts */
.rack-rail-assembly {
    position: relative;
    width: 100%;
    height: 28px;
    display: flex;
    align-items: center;
    z-index: 5;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .20));
}

.rack-bracket {
    width: 11px;
    height: 28px;
    border-radius: 2px;
    background: linear-gradient(
        180deg,
        #3f4248 0%,
        #18191c 48%,
        #484b52 76%,
        #141518 100%
    );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
    flex-shrink: 0;
    position: relative;
}

.rack-bracket::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 7px;
    background: linear-gradient(180deg, #aeb3bc, #ffffff 42%, #5f646d 78%, #cfd3da);
}

.rack-bracket-left::after {
    right: -6px;
    border-radius: 0 2px 2px 0;
}

.rack-bracket-right::after {
    left: -6px;
    border-radius: 2px 0 0 2px;
}

.rack-bar {
    flex: 1;
    height: 13px;
    margin: 0 4px;
    background: linear-gradient(
        180deg,
        #aeb3bc 0%,
        #eef0f4 20%,
        #ffffff 34%,
        #9aa0aa 56%,
        #595e67 72%,
        #d7dbe2 90%,
        #8a909a 100%
    );
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, .9),
        0 4px 10px rgba(0, 0, 0, .16);
}

/* Hanging Pieces Row */
.rack-items {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    padding: 0 12px;
    position: relative;
}

.rack-piece {
    position: relative;
    flex: 0.72;
    max-width: 92px;
    height: 365px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    outline: none;
    transform-origin: top center;
    transition:
        flex 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        max-width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s ease;
}

.rack-piece.active {
    flex: 2.45;
    max-width: 300px;
    z-index: 4;
}

.rack-piece:not(.active):hover {
    transform: translateY(2px) rotate(-1deg);
}

/* Chrome Hook connecting bar to garment */
.rack-hook {
    width: 2px;
    height: 22px;
    margin-top: -4px;
    background: linear-gradient(180deg, #767b85, #eef0f3 45%, #8a8f99);
    border-radius: 2px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    transition: height 0.4s ease, opacity 0.3s ease;
}

.rack-hook::before {
    content: "";
    position: absolute;
    top: -6px;
    left: -4px;
    width: 10px;
    height: 9px;
    border: 2px solid #b5bac3;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}

.rack-piece.active .rack-hook {
    height: 12px;
}

/* Stage holding Side Profile vs Expanded Front View */
.rack-garment-stage {
    position: relative;
    width: 100%;
    height: 295px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Side-Hanging View */
.rack-side-view {
    position: absolute;
    top: -4px;
    width: 92px;
    height: 265px;
    isolation: isolate;
    -webkit-mask-image: var(--side-img);
    mask-image: var(--side-img);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: top center;
    mask-position: top center;
    filter: drop-shadow(0 18px 16px rgba(0, 0, 0, .26));
    transform-origin: top center;
    opacity: 1;
    transform: perspective(700px) rotateY(0deg) scale(1);
    transition:
        opacity 0.34s ease,
        transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.rack-piece.active .rack-side-view {
    opacity: 0;
    transform: perspective(700px) rotateY(-68deg) scale(0.82);
    pointer-events: none;
}

/* Expanded Front-Facing View */
.rack-front-view {
    position: absolute;
    top: -6px;
    width: 275px;
    height: 290px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter:
        drop-shadow(0 24px 24px rgba(0, 0, 0, .26))
        drop-shadow(0 6px 8px rgba(0, 0, 0, .12));
    transform-origin: top center;
    opacity: 0;
    transform: perspective(700px) rotateY(58deg) scale(0.74);
    pointer-events: none;
    transition:
        opacity 0.38s ease 0.04s,
        transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

.rack-piece.active .rack-front-view {
    opacity: 1;
    transform: perspective(700px) rotateY(0deg) scale(1);
    pointer-events: auto;
}

.rack-front-layers {
    position: absolute;
    inset: 0;
    isolation: isolate;
    -webkit-mask-image: var(--front-img);
    mask-image: var(--front-img);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.rack-side-view .rg-color,
.rack-front-layers .rg-color {
    position: absolute;
    inset: 0;
    background-color: var(--piece-color, #eee9df);
}

.rack-side-view .rg-shade {
    position: absolute;
    inset: 0;
    background: var(--side-img) top center / contain no-repeat;
    mix-blend-mode: multiply;
}

.rack-front-layers .rg-shade {
    position: absolute;
    inset: 0;
    background: var(--front-img) center / contain no-repeat;
    mix-blend-mode: multiply;
}

.rack-side-view .rg-sheen {
    position: absolute;
    inset: 0;
    background: var(--side-img) top center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: var(--piece-sheen, 0.06);
    filter: contrast(1.9) brightness(0.62);
}

.rack-front-layers .rg-sheen {
    position: absolute;
    inset: 0;
    background: var(--front-img) center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: var(--piece-sheen, 0.06);
    filter: contrast(1.9) brightness(0.62);
}

.rack-chest-mark {
    position: relative;
    z-index: 3;
    font: 700 11px/1.1 var(--serif);
    letter-spacing: .12em;
    transform: translateY(-12px);
    opacity: .92;
    pointer-events: none;
}

.rack-chest-mark-slant {
    transform: translate(32px, -6px) rotate(-28deg);
    font-size: 12px;
    letter-spacing: .08em;
}

/* Floating Studio Pill Badge under active rack item */
.rack-cta-pill {
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: #151518;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .24);
    opacity: 0;
    transform: translateY(8px) scale(0.94);
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        transform 0.35s ease,
        background 0.2s ease;
}

.rack-piece.active .rack-cta-pill {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rack-cta-pill:hover {
    background: var(--red);
    border-color: var(--red2);
}


/* ---------------------------------------------------------
   2. STEP 01 — PHOTOREALISTIC PRODUCT SELECTION CARDS
   --------------------------------------------------------- */

.product-art.has-real-garment .product-garment-svg {
    display: none !important;
}

.product-real-garment {
    position: absolute;
    inset: 8px;
    z-index: 1;
    isolation: isolate;
    -webkit-mask-image: var(--card-img);
    mask-image: var(--card-img);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .28));
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card:hover .product-real-garment {
    transform: translateY(-4px) scale(1.045);
}

.product-real-garment .rg-color {
    position: absolute;
    inset: 0;
    background-color: var(--card-color, #eee9df);
}

.product-real-garment .rg-shade {
    position: absolute;
    inset: 0;
    background: var(--card-img) center / contain no-repeat;
    mix-blend-mode: multiply;
}

.product-real-garment .rg-sheen {
    position: absolute;
    inset: 0;
    background: var(--card-img) center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: var(--card-sheen, 0.05);
    filter: contrast(1.9) brightness(0.62);
}

.product-art.has-real-garment .mini-print {
    position: relative;
    z-index: 3;
    transform: translateY(-6px);
    opacity: 0.9;
}

.cap-art.has-real-garment .mini-print {
    transform: translateY(-10px);
}


/* ---------------------------------------------------------
   3. STEP 02 — PHOTOREALISTIC RECOLORABLE DESIGN STUDIO
   --------------------------------------------------------- */

.garment-wrap.has-realistic-garment {
    --garment-img: url("assets/tshirt-front.webp");
    width: min(68%, 430px);
    background: none !important;
    filter:
        drop-shadow(0 28px 26px rgba(0, 0, 0, .30))
        drop-shadow(0 8px 10px rgba(0, 0, 0, .14)) !important;
    transition:
        width 0.32s ease,
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.garment-wrap.has-realistic-garment::before,
.garment-wrap.has-realistic-garment::after,
.garment-wrap.has-realistic-garment .garment-svg,
.garment-wrap.has-realistic-garment .garment-neck {
    display: none !important;
    content: none !important;
}

/* Front & Back Studio Asset Mapping */
.garment-wrap.has-realistic-garment[data-item="T-Shirts"] {
    --garment-img: url("assets/tshirt-front.webp");
}

.garment-wrap.has-realistic-garment[data-item="T-Shirts"].show-back {
    --garment-img: url("assets/tshirt-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"] {
    --garment-img: url("assets/hoodie-front.webp");
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"].show-back {
    --garment-img: url("assets/hoodie-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Sweatshirts"] {
    --garment-img: url("assets/sweatshirt-front.webp");
}

.garment-wrap.has-realistic-garment[data-item="Sweatshirts"].show-back {
    --garment-img: url("assets/sweatshirt-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"] {
    --garment-img: url("assets/cap-front.webp");
    width: min(56%, 360px);
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"].show-back {
    --garment-img: url("assets/cap-back.webp");
    width: min(56%, 360px);
}

/* 3-Layer Masked Studio Garment Stack */
.realistic-garment {
    position: absolute;
    inset: 0;
    z-index: 2;
    isolation: isolate;
    -webkit-mask-image: var(--garment-img);
    mask-image: var(--garment-img);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.realistic-garment .rg-color {
    position: absolute;
    inset: 0;
    background-color: var(--garment, #eee9df);
    transition: background-color 0.2s ease;
}

.realistic-garment .rg-shade {
    position: absolute;
    inset: 0;
    background: var(--garment-img) center / contain no-repeat;
    mix-blend-mode: multiply;
}

.realistic-garment .rg-sheen {
    position: absolute;
    inset: 0;
    background: var(--garment-img) center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: var(--garment-sheen, 0.05);
    filter: contrast(1.92) brightness(0.62);
    transition: opacity 0.2s ease;
}

/* Calibrated Print Zones on Photorealistic Garments */
.garment-wrap.has-realistic-garment .print-area {
    z-index: 5;
    top: 29%;
    left: 30%;
    width: 40%;
    min-height: 24%;
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"] .print-area {
    top: 29%;
    left: 32%;
    width: 36%;
    min-height: 20%;
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"].show-back .print-area {
    top: 35%;
    left: 31%;
    width: 38%;
}

.garment-wrap.has-realistic-garment[data-item="Sweatshirts"] .print-area {
    top: 28%;
    left: 31%;
    width: 38%;
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"] .print-area {
    top: 30%;
    left: 31%;
    width: 38%;
    min-height: 18%;
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"].show-back .print-area {
    top: 26%;
    left: 33%;
    width: 34%;
    min-height: 14%;
}

/* Left Chest & Lower Placement on Realistic Garments */
.garment-wrap.has-realistic-garment .print-area.position-left {
    top: 26%;
    left: 50%;
    width: 19%;
    min-height: 12%;
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"] .print-area.position-left {
    top: 31%;
    left: 47%;
    width: 22%;
}

.garment-wrap.has-realistic-garment .print-area.position-lower {
    top: 56%;
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"] .print-area.position-lower {
    top: 46%;
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"] .print-area.position-lower {
    top: 41%;
}

.garment-wrap.has-realistic-garment .print-message,
.garment-wrap.has-realistic-garment .art-mark {
    opacity: 0.93;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}

/* Checkout Mini Realistic Garment Preview */
.checkout-preview-garment.has-mini-garment {
    position: relative;
    overflow: hidden;
    background: color-mix(in srgb, var(--red) 6%, var(--panel)) !important;
    padding: 4px;
}

.checkout-preview-garment.has-mini-garment #checkoutPreviewLetter {
    position: relative;
    z-index: 3;
    font-size: 9px;
    transform: translateY(-2px);
}

.checkout-mini-layers {
    position: absolute;
    inset: 5px;
    z-index: 1;
    isolation: isolate;
    -webkit-mask-image: var(--mini-img);
    mask-image: var(--mini-img);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.checkout-mini-layers .rg-color {
    position: absolute;
    inset: 0;
    background-color: var(--garment, #eee9df);
}

.checkout-mini-layers .rg-shade {
    position: absolute;
    inset: 0;
    background: var(--mini-img) center / contain no-repeat;
    mix-blend-mode: multiply;
}

.checkout-mini-layers .rg-sheen {
    position: absolute;
    inset: 0;
    background: var(--mini-img) center / contain no-repeat;
    mix-blend-mode: screen;
    opacity: var(--garment-sheen, 0.06);
    filter: contrast(1.9) brightness(0.62);
}

/* Responsive Rack Layout */
@media (max-width: 1020px) {
    .hero:has(.has-studio-rack) {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        padding-bottom: 110px;
    }

    .hero:has(.has-studio-rack) .hero-copy {
        flex: none;
        max-width: 560px;
    }

    .hero-art.has-studio-rack {
        flex: none;
        width: 100%;
        max-width: 660px;
        height: 410px;
        margin: 12px auto 0;
    }
}

@media (max-width: 680px) {
    .hero-art.has-studio-rack {
        height: 330px;
        right: auto;
        bottom: auto;
        opacity: 1;
    }

    .studio-rack {
        height: 315px;
    }

    .rack-items {
        padding: 0 4px;
        gap: 2px;
    }

    .rack-piece {
        height: 285px;
        max-width: 56px;
    }

    .rack-piece.active {
        max-width: 195px;
    }

    .rack-garment-stage {
        height: 220px;
    }

    .rack-side-view {
        width: 64px;
        height: 195px;
    }

    .rack-front-view {
        width: 190px;
        height: 210px;
    }

    .rack-cta-pill {
        font-size: 8px;
        padding: 6px 10px;
    }

    .garment-wrap.has-realistic-garment {
        width: min(78%, 330px);
    }
}


/* =========================================================
   STAGE 5 — SENIOR'S CHOICE FULL UPGRADE:
   ATELIER RACK FRAME · 360° TURNTABLE · 30 FONTS · CURVED &
   SEWED/PRINTED TEXT · ORDER TRACKING · ADMIN · FOOTER
   ========================================================= */

/* ---------------------------------------------------------
   1. ATELIER RACK FRAME (SEAMLESS SENIOR'S CHOICE FIT-IN)
   --------------------------------------------------------- */

.hero-art.has-studio-rack .orbit,
.hero-art.has-studio-rack .sparkle,
.hero-art.has-studio-rack .hero-note {
    display: none;
}

.studio-rack-frame {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--red) 5%, var(--panel)) 0%,
        var(--panel) 60%,
        color-mix(in srgb, var(--ink) 3%, var(--panel)) 100%
    );
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 20px 16px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, .07),
        inset 0 1px 0 rgba(255, 255, 255, .35);
    position: relative;
    overflow: hidden;
}

.studio-rack-frame::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--red) 14%, transparent), transparent 70%);
    top: 42%;
    left: 55%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.rack-frame-header {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.rack-frame-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--ink);
    text-transform: uppercase;
}

.rack-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 20%, transparent);
    display: inline-block;
}

.rack-frame-hint {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--muted);
    text-transform: uppercase;
}

.studio-rack-frame .studio-rack {
    flex: 1;
    height: auto;
    position: relative;
    padding: 0 6px;
}

.rack-upright {
    position: absolute;
    top: 14px;
    bottom: 8px;
    width: 6px;
    background: linear-gradient(90deg, #5d626c, #eef0f4 45%, #6f7580);
    border-radius: 2px;
    z-index: 1;
    opacity: .72;
}

.rack-upright-left {
    left: 10px;
}

.rack-upright-right {
    right: 10px;
}

.rack-plinth {
    height: 8px;
    margin: 0 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(113,24,29,.18), rgba(141,38,55,.42), rgba(113,24,29,.18));
    opacity: .65;
}

.studio-rack-frame .rack-cta-pill {
    background: var(--red2);
    border-color: color-mix(in srgb, #ffffff 22%, var(--red));
    color: #ffffff;
    font-family: var(--sans);
}

.studio-rack-frame .rack-cta-pill:hover {
    background: var(--red);
    transform: translateY(-1px) scale(1.02);
}

.nav-admin-link {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px !important;
}


/* ---------------------------------------------------------
   2. 360° STUDIO TURNTABLE & MULTI-ANGLE GARMENTS
   --------------------------------------------------------- */

.garment-wrap.has-realistic-garment {
    --front-studio-img: url("assets/tshirt-front.webp");
    --side-studio-img: url("assets/tshirt-side-studio.webp");
    --back-studio-img: url("assets/tshirt-back.webp");
    perspective: 1100px;
}

.garment-wrap.has-realistic-garment[data-item="T-Shirts"] {
    --front-studio-img: url("assets/tshirt-front.webp");
    --side-studio-img: url("assets/tshirt-side-studio.webp");
    --back-studio-img: url("assets/tshirt-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Hoodies"] {
    --front-studio-img: url("assets/hoodie-front.webp");
    --side-studio-img: url("assets/hoodie-side-studio.webp");
    --back-studio-img: url("assets/hoodie-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Sweatshirts"] {
    --front-studio-img: url("assets/sweatshirt-front.webp");
    --side-studio-img: url("assets/sweatshirt-side.webp");
    --back-studio-img: url("assets/sweatshirt-back.webp");
}

.garment-wrap.has-realistic-garment[data-item="Caps & Accessories"] {
    --front-studio-img: url("assets/cap-front.webp");
    --side-studio-img: url("assets/cap-side.webp");
    --back-studio-img: url("assets/cap-back.webp");
}

.realistic-front-garment {
    -webkit-mask-image: var(--front-studio-img);
    mask-image: var(--front-studio-img);
    transform-origin: center center;
}

.realistic-front-garment .rg-shade,
.realistic-front-garment .rg-sheen {
    background-image: var(--front-studio-img);
}

.realistic-side-garment {
    -webkit-mask-image: var(--side-studio-img);
    mask-image: var(--side-studio-img);
    opacity: 0;
    pointer-events: none;
    transform-origin: center center;
}

.realistic-side-garment .rg-shade,
.realistic-side-garment .rg-sheen {
    background-image: var(--side-studio-img);
}

.realistic-back-garment {
    -webkit-mask-image: var(--back-studio-img);
    mask-image: var(--back-studio-img);
    opacity: 0;
    pointer-events: none;
    transform-origin: center center;
}

.realistic-back-garment .rg-shade,
.realistic-back-garment .rg-sheen {
    background-image: var(--back-studio-img);
}

/* Fallback if JS hasn't applied turntable inline styles yet */
.garment-wrap.has-realistic-garment:not(.turntable-ready).show-back .realistic-front-garment {
    opacity: 0;
}

.garment-wrap.has-realistic-garment:not(.turntable-ready).show-back .realistic-back-garment {
    opacity: 1;
}

/* 360° Turntable Slider Bar */
.turntable-bar {
    position: relative;
    z-index: 8;
    width: min(92%, 470px);
    margin: 8px auto 4px;
    padding: 10px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 88%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.turntable-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.turntable-badge {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--red);
    text-transform: uppercase;
}

.turntable-quick-angles {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.angle-chip {
    padding: 3px 8px;
    font-size: 9.5px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
    transition: all .18s ease;
}

.angle-chip:hover,
.angle-chip.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.angle-spin-btn.spinning {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.turntable-slider {
    width: 100%;
    margin: 0;
}


/* ---------------------------------------------------------
   3. 30 FONTS · SEWED vs PRINTED · CURVED · FREE XY PLACEMENT
   --------------------------------------------------------- */

.type-style-toggles {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.style-chip {
    flex: 1;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 12px;
    cursor: pointer;
    transition: all .18s ease;
}

.style-chip.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.print-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.method-pill {
    text-align: left;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all .18s ease;
}

.method-pill .method-title {
    font-size: 11.5px;
    font-weight: 700;
}

.method-pill small {
    font-size: 9.5px;
    color: var(--muted);
}

.method-pill.active {
    border-color: var(--red);
    background: color-mix(in srgb, var(--red) 9%, var(--bg));
    box-shadow: 0 0 0 1px var(--red);
}

.method-pill.active .method-title {
    color: var(--red);
}

.slider-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
    margin-bottom: 4px;
}

.slider-header-row .control-label {
    margin: 0;
}

.slider-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.slider-val-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--red);
}

.mini-reset-btn {
    padding: 2px 7px;
    font-size: 9.5px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--muted);
    cursor: pointer;
}

.mini-reset-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.free-placement-box {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--ink) 2%, var(--bg));
}

.free-placement-box .slider-header-row {
    margin-top: 0;
    margin-bottom: 10px;
}

.xy-sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.xy-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    color: var(--muted);
    margin-bottom: 3px;
}

/* Rebuilt studio panels: text and logo are separate modules with
   grouped control sections and no shared styling hooks beyond the
   generic slider primitives. */
.studio-group {
    margin-top: 14px;
}

.studio-group:first-child {
    margin-top: 0;
}

/* Multi-element managers (Text / Logo panels) */
.element-manager {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.element-manager .slider-header-row {
    margin-top: 0;
}

.element-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}

.element-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    background: var(--bg);
    color: var(--ink);
    max-width: 100%;
}

.element-chip .chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.element-chip.active {
    border-color: var(--red);
    color: var(--red);
    font-weight: 700;
    box-shadow: 0 0 0 1px var(--red);
}

.element-chip.is-locked {
    opacity: 0.62;
}

.element-chip .chip-del {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    font-size: 13px;
    line-height: 1;
    padding: 0 2px;
}

.element-done-btn.is-locked {
    border-color: var(--red);
    color: var(--red);
}

/* Logo control panel (Logo section) — mirrors the text placement controls */
.logo-controls {
    margin-top: 6px;
}

.logo-placement-box {
    margin-top: 12px;
}

/* Free Draggable Print Area on Garment */
.garment-wrap.has-realistic-garment .print-area.free-positioned {
    left: var(--pos-x, 50%) !important;
    top: var(--pos-y, 36%) !important;
    width: 74% !important;
    min-height: unset !important;
    transform: translate(-50%, -50%) rotate(var(--text-rotate, 0deg));
    cursor: grab;
    padding: 6px;
    border-radius: 8px;
    border: 1px dashed transparent;
    transition: border-color .18s ease;
    touch-action: none;
}

.garment-wrap.has-realistic-garment .print-area.free-positioned:hover,
.garment-wrap.has-realistic-garment .print-area.free-positioned.dragging {
    border-color: color-mix(in srgb, var(--red) 55%, transparent);
}

.garment-wrap.has-realistic-garment .print-area.free-positioned.dragging {
    cursor: grabbing;
}

.curved-text-svg {
    width: 100%;
    height: auto;
    overflow: visible;
    display: block;
}

/* Visual Print Finishes: Printed vs Sewed (Embroidered) vs Puff vs Patch */
.print-message[data-method="printed"] {
    opacity: 0.92;
    text-shadow: 0 0.5px 0.6px rgba(0, 0, 0, .10);
}

.print-message[data-method="sewed"] {
    opacity: 0.99;
    filter: url(#sewedThreadFilter);
    text-shadow:
        0 -0.8px 0 rgba(255, 255, 255, .42),
        0 1.2px 0 rgba(0, 0, 0, .52),
        0.9px 1.8px 2.2px rgba(0, 0, 0, .34);
    letter-spacing: .04em;
}

.print-message[data-method="sewed"] .curved-text-svg text {
    paint-order: stroke fill;
    stroke: rgba(0, 0, 0, .28);
    stroke-width: 1.1px;
    stroke-dasharray: 2.2 1.1;
}

.print-message[data-method="puff"] {
    opacity: 0.98;
    text-shadow:
        0 -1.1px 0 rgba(255, 255, 255, .36),
        0 1.2px 0 rgba(0, 0, 0, .30),
        0 2.8px 3.5px rgba(0, 0, 0, .36);
}

.print-message[data-method="patch"] {
    opacity: 1;
    paint-order: stroke fill;
    -webkit-text-stroke: 1.6px rgba(255, 255, 255, .88);
    filter: drop-shadow(0 1.6px 1.6px rgba(0, 0, 0, .48));
}

.print-message[data-method="patch"] .curved-text-svg text {
    paint-order: stroke fill;
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 2.6px;
}


/* ---------------------------------------------------------
   4. ORDER PLACED · TRACK ORDER PAGE · ADMIN PORTAL · FOOTER
   --------------------------------------------------------- */

.receipt-dispatch-banner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel);
    margin: 6px 0 18px;
}

.receipt-dispatch-banner > span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--red) 14%, transparent);
    color: var(--red);
    display: grid;
    place-items: center;
    font-size: 16px;
}

.receipt-dispatch-banner strong {
    display: block;
    font-size: 13px;
}

.receipt-dispatch-banner small {
    font-size: 11.5px;
    color: var(--muted);
}

.success-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Track Order Page */
.track-page.active,
.admin-page.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1060px;
    margin: 0 auto;
    padding: 48px clamp(20px, 5vw, 48px) 84px;
    width: 100%;
}

.track-search-card,
.track-result-card,
.admin-login-card,
.admin-access-panel,
.admin-orders-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 28px;
}

.track-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.track-search-form input {
    flex: 1 1 280px;
    padding: 13px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.track-result-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.track-result-top h3 {
    font-family: var(--serif);
    font-size: 28px;
    margin: 4px 0;
}

.track-updated-at {
    font-size: 12px;
    color: var(--muted);
}

.track-status-pill {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.track-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 24px 0;
}

.timeline-step {
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: .55;
    transition: all .2s ease;
}

.timeline-step .tl-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline-step b {
    font-size: 12.5px;
}

.timeline-step small {
    font-size: 11px;
    color: var(--muted);
}

.timeline-step.done,
.timeline-step.current {
    opacity: 1;
    border-color: var(--red);
}

.timeline-step.done .tl-dot,
.timeline-step.current .tl-dot {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.timeline-step.current {
    background: color-mix(in srgb, var(--red) 8%, var(--bg));
    box-shadow: 0 6px 20px rgba(141, 38, 55, .10);
}

.track-note-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--red) 6%, var(--bg));
    border: 1px solid var(--line);
    margin-bottom: 20px;
}

.track-note-banner p {
    margin: 4px 0 0;
    font-size: 14px;
}

.track-eta-box {
    text-align: right;
}

.track-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.track-detail-box {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 13px;
    line-height: 1.6;
}

.track-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* Admin Portal */
.admin-login-card {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.admin-login-card h3 {
    font-family: var(--serif);
    font-size: 26px;
    margin: 4px 0 8px;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.admin-login-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(180, 30, 45, .12);
    color: var(--red);
    font-size: 12.5px;
    font-weight: 600;
}

.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.admin-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 22px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.admin-role-badge {
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--red) 14%, transparent);
    color: var(--red);
    font-size: 10.5px;
    font-weight: 700;
}

.admin-top-actions {
    display: flex;
    gap: 8px;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.admin-kpi-card {
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
}

.admin-kpi-card strong {
    display: block;
    font-family: var(--serif);
    font-size: 28px;
    margin-top: 4px;
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.admin-panel-head h3 {
    font-family: var(--serif);
    font-size: 22px;
    margin: 2px 0 0;
}

.admin-access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.admin-access-grid input,
.admin-orders-panel select {
    width: 100%;
    padding: 11px 13px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.admin-orders-panel > .admin-panel-head select {
    width: auto;
    min-width: 180px;
}

.admin-field-wide {
    grid-column: 1 / -1;
}

.allowed-emails-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.email-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
}

.email-chip button {
    border: 0;
    background: none;
    color: var(--red);
    cursor: pointer;
    font-weight: 700;
}

.add-email-row {
    display: flex;
    gap: 8px;
}

.admin-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-order-card {
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    font-size: 12.5px;
    line-height: 1.55;
}

.admin-order-controls {
    display: grid;
    grid-template-columns: 180px 170px 1fr auto;
    gap: 10px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.admin-order-controls input,
.admin-order-controls select {
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font: inherit;
    font-size: 12.5px;
}

.admin-receipt-thumb {
    max-height: 64px;
    border-radius: 6px;
    border: 1px solid var(--line);
    cursor: pointer;
}

/* Receipt Modal */
.receipt-dialog {
    width: min(94vw, 720px);
    max-width: 720px;
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
}

.receipt-dialog-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.receipt-preview-frame {
    width: 100%;
    height: min(74vh, 640px);
    border: 0;
    background: #f4f0ea;
    display: block;
}

/* Bottom Footer Contact Bar */
.footer-main-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-contact-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
}

.footer-contact-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: .02em;
    transition: color .18s ease;
}

.footer-contact-link:hover {
    color: var(--red);
}

.footer-divider {
    color: var(--muted);
}

@media (max-width: 860px) {
    .track-timeline {
        grid-template-columns: 1fr 1fr;
    }

    .admin-access-grid,
    .admin-order-controls {
        grid-template-columns: 1fr;
    }

    .footer-main-row {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .footer-contact-strip {
        justify-content: center;
    }
}


/* =========================================================
   STAGE 6 — STEP 01 SHOWROOM RACK (REPLACES CARDS),
   GARMENT SUB-TYPES (V-NECK / ZIP-UP / POLO / SNAPBACK / ETC.),
   & REALTIME WEBGL 3D GARMENT STAGE
   ========================================================= */

/* Hide legacy 4-card grid when Step 01 Showroom Rack is active */
.selection-step.has-step-one-rack #productGrid {
    display: none !important;
}

.step-one-rack-showcase {
    width: 100%;
    max-width: 980px;
    margin: 10px auto 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.step-one-rack-frame {
    min-height: 455px;
    padding: 18px 26px 18px;
}

.step-one-rack {
    min-height: 390px;
}

.step-one-rack-items {
    justify-content: space-around;
    padding: 0 22px;
    gap: 12px;
}

.step-one-rack-items .rack-piece {
    flex: 0.85;
    max-width: 125px;
    height: 370px;
}

.step-one-rack-items .rack-piece.active {
    flex: 2.55;
    max-width: 330px;
}

.step-one-rack-items .rack-garment-stage {
    height: 295px;
}

.step-one-rack-items .rack-front-view {
    width: 285px;
    height: 292px;
}

.rack-piece-caption {
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    text-align: center;
    transition: all .25s ease;
    white-space: nowrap;
}

.rack-piece-caption strong {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--ink);
}

.rack-piece-caption small {
    display: none;
    font-size: 9.5px;
    color: rgba(255, 255, 255, .86);
    margin-top: 1px;
}

.step-one-rack-items .rack-piece.active .rack-piece-caption {
    background: var(--red2);
    border-color: var(--red);
    padding: 8px 18px;
    box-shadow: 0 10px 24px rgba(113, 24, 29, .22);
}

.step-one-rack-items .rack-piece.active .rack-piece-caption strong {
    color: #ffffff;
    font-size: 11.5px;
}

.step-one-rack-items .rack-piece.active .rack-piece-caption small {
    display: block;
}

/* Sub-Type Selector Card & Pills */
.subtype-selector-card {
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.subtype-selector-head strong {
    display: block;
    font-family: var(--serif);
    font-size: 19px;
    margin-top: 2px;
}

.subtype-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subtype-pill {
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
}

.subtype-pill:hover {
    border-color: var(--red);
    color: var(--red);
}

.subtype-pill.active {
    background: var(--red);
    border-color: var(--red);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(141, 38, 55, .22);
}

.studio-subtype-row .subtype-pill {
    padding: 7px 11px;
    font-size: 11px;
    flex: 1 1 auto;
    text-align: center;
}

/* Realtime WebGL 3D Stage */
.garment-3d-canvas-wrap {
    position: absolute;
    inset: -5%;
    z-index: 6;
    display: none;
}

.garment-wrap.webgl-3d-active {
    width: min(76%, 470px) !important;
}

.garment-wrap.webgl-3d-active .garment-3d-canvas-wrap {
    display: block;
}

.garment-wrap.webgl-3d-active .realistic-garment,
.garment-wrap.webgl-3d-active .print-area {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Sub-type CSS Fallback Mapping (for non-WebGL / static fallback) */
.garment-wrap.has-realistic-garment[data-subtype="tshirt-vneck"] {
    --front-studio-img: url("assets/vneck-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="tshirt-polo"] {
    --front-studio-img: url("assets/polo-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="hoodie-zipup"] {
    --front-studio-img: url("assets/zipup-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="hoodie-boxy"] {
    --front-studio-img: url("assets/boxy-hoodie-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="sweatshirt-qzip"] {
    --front-studio-img: url("assets/quarterzip-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="sweatshirt-varsity"] {
    --front-studio-img: url("assets/varsity-sweat-front.webp");
    --back-studio-img: url("assets/varsity-sweat-back.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="cap-snapback"] {
    --front-studio-img: url("assets/snapback-front.webp");
}
.garment-wrap.has-realistic-garment[data-subtype="cap-buckethat"] {
    --front-studio-img: url("assets/buckethat-front.webp");
    --back-studio-img: url("assets/buckethat-front.webp");
}

@media (max-width: 720px) {
    .step-one-rack-frame {
        min-height: 350px;
        padding: 14px 12px;
    }

    .step-one-rack-items {
        padding: 0 4px;
        gap: 4px;
    }

    .step-one-rack-items .rack-piece {
        max-width: 72px;
        height: 295px;
    }

    .step-one-rack-items .rack-piece.active {
        max-width: 205px;
    }

    .step-one-rack-items .rack-front-view {
        width: 195px;
        height: 215px;
    }

    .subtype-selector-card {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   STAGE 7 — ENHANCED 3D STAGE, TURNTABLE STRICTLY UNDER GARMENT,
   CHECKOUT PLACE-ORDER SIZE CHART & SHIPPING / RETURN POLICIES
   ========================================================= */

.preview-stage {
    flex-direction: column !important;
    padding: 26px 20px 42px;
    min-height: 510px;
}

.garment-wrap.webgl-3d-active {
    width: min(82%, 495px) !important;
    margin: 0 auto;
}

.garment-3d-canvas-wrap {
    inset: -3%;
}

.turntable-bar.turntable-under-stage {
    width: 100%;
    max-width: none;
    margin: 12px 0 8px;
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

/* Size Chart Trigger Pill in Roster Header */
.size-chart-link-btn {
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--red);
    background: color-mix(in srgb, var(--red) 8%, var(--panel));
    color: var(--red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: all .18s ease;
}

.size-chart-link-btn:hover {
    background: var(--red);
    color: #ffffff;
}

.footer-btn-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

/* Place-Order Window Size Chart Box */
.place-order-size-box,
.place-order-policy-box {
    margin: 14px 0;
    padding: 14px 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 68%, var(--panel));
}

.place-order-size-head,
.place-order-policy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.place-order-size-head strong {
    display: block;
    font-size: 13px;
    color: var(--ink);
    margin-top: 2px;
}

.inline-modal-trigger {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all .18s ease;
}

.inline-modal-trigger:hover {
    border-color: var(--red);
    background: var(--red);
    color: #ffffff;
}

.inline-size-table-wrap {
    overflow-x: auto;
}

.compact-size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: center;
}

.compact-size-table th {
    padding: 6px 5px;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 80%, transparent);
}

.compact-size-table td {
    padding: 5.5px 5px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
    color: var(--ink);
}

.compact-size-table tr:last-child td {
    border-bottom: none;
}

.compact-size-table td:first-child {
    font-weight: 700;
    color: var(--red);
}

.compact-size-note {
    margin-top: 7px;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.45;
}

/* Place-Order Shipping & Return Policy Box */
.place-order-policy-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
}

.place-order-policy-list strong {
    color: var(--ink);
}

.policy-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.policy-consent-row input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--red);
    flex-shrink: 0;
    cursor: pointer;
}

.policy-consent-row.needs-attention {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(141, 38, 55, 0.16);
}

.inline-text-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--red);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Size Chart & Store Policy Modals */
.info-modal-dialog {
    width: min(94vw, 760px);
    max-height: 88vh;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.info-modal-dialog::backdrop {
    background: rgba(16, 12, 14, 0.58);
    backdrop-filter: blur(5px);
}

.info-modal-inner {
    padding: 26px 28px 28px;
    overflow-y: auto;
    max-height: 86vh;
}

.info-modal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.info-modal-top h3 {
    font-family: var(--serif);
    font-size: 28px;
    margin: 4px 0 0;
}

.size-modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.size-modal-table-container {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow-x: auto;
    margin-bottom: 18px;
}

.full-size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
}

.full-size-table th {
    padding: 11px 12px;
    background: color-mix(in srgb, var(--bg) 80%, var(--panel));
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.full-size-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}

.full-size-table tr:last-child td {
    border-bottom: none;
}

.full-size-table td:first-child {
    font-weight: 800;
    color: var(--red);
}

.size-measure-guide {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 65%, var(--panel));
}

.size-measure-notes {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
}

.size-measure-notes strong,
.size-measure-notes b {
    color: var(--ink);
}

.size-measure-notes p {
    margin: 4px 0 0;
}

.policy-sections-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.policy-detail-card {
    padding: 18px 20px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 62%, var(--panel));
}

.policy-detail-card h4 {
    font-family: var(--serif);
    font-size: 20px;
    margin: 5px 0 10px;
    color: var(--ink);
}

.policy-detail-card ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.policy-detail-card ol {
    margin: 6px 0 2px;
    padding-left: 18px;
}

.policy-detail-card strong {
    color: var(--ink);
}

.policy-detail-card a {
    color: var(--red);
    font-weight: 700;
}

@media (max-width: 680px) {
    .preview-stage {
        min-height: 390px;
        padding: 18px 12px 34px;
    }

    .size-measure-guide {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   STAGE 8 — DUAL PAYMENT METHODS: VODAFONE CASH & INSTAPAY
   ========================================================= */

.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.payment-method-option {
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid var(--line);
    background: var(--panel);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.payment-method-option:hover {
    border-color: var(--red);
    transform: translateY(-1px);
}

.payment-method-option.active {
    border-color: var(--red);
    background: color-mix(in srgb, var(--red) 7%, var(--panel));
    box-shadow: 0 8px 20px rgba(141, 38, 55, 0.14);
}

.instapay-icon {
    background: linear-gradient(135deg, #5b2c83, #7c3aed) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 800;
    letter-spacing: .02em;
}

.payment-target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.payment-target-row strong {
    font-size: 20px;
    letter-spacing: .02em;
    word-break: break-all;
}

.copy-pay-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--red);
    background: var(--panel);
    color: var(--red);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .18s ease;
}

.copy-pay-btn:hover {
    background: var(--red);
    color: #ffffff;
}

@media (max-width: 600px) {
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide rack on Homepage (#homePage) — Rack lives exclusively on Step 01 (#typePage) */
#homePage .studio-rack-frame {
    display: none !important;
}

/* Customer-facing website: Admin portal lives on its own distinct URL (/sc-admin-portal) */
#navAdmin,
#footerAdminLink,
.footer-divider-admin,
#adminPage {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* =========================================================
   PHOTOREAL 2D GARMENT STAGE
   The studio photograph IS the garment: two fixed shots (front / back),
   colour-graded and composited live, no WebGL and no turntable.
   ========================================================= */

.garment-wrap.has-realistic-garment .photoreal-garment-stack {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 7;
    pointer-events: none;
}

.garment-wrap .photoreal-garment-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;
    filter:
        drop-shadow(0 18px 26px rgba(27, 23, 24, 0.10))
        drop-shadow(0 3px 8px rgba(27, 23, 24, 0.06));
    transition: opacity .22s ease;
}

.garment-wrap .photoreal-garment-canvas.photoreal-back {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.garment-wrap.show-back .photoreal-garment-canvas.photoreal-front {
    opacity: 0;
}

.garment-wrap.show-back .photoreal-garment-canvas.photoreal-back {
    opacity: 1;
}

/* Hide every legacy 2D/SVG/WebGL garment layer — the canvas is the garment now */
.garment-wrap .garment-3d-canvas-wrap,
.garment-wrap .realistic-garment,
.garment-wrap .garment-svg,
.garment-wrap .garment-neck,
.garment-wrap .print-area,
.garment-wrap .garment-photo-layer {
    display: none !important;
}

/* Right-hand Front/Back switch -------------------------------------------------
   The garment is now a fixed 2D studio shot, so the only controls needed are
   Front and Back. The inline print panel keeps its own side selector. */
.view-toggle #sideViewBtn,
.view-toggle .view-button[data-side="side"],
.view-toggle .view-button[data-view="side"],
.turntable-bar,
#turntableBar,
.stage-controls.turntable-controls,
.turntable-hint,
.garment-wrap .webgl-hint {
    display: none !important;
}

/* Stage sizing — the photograph must sit comfortably inside the panel.
   Phase 10b: the stage was over-sized (470px min-height + a 580px-wide garment
   canvas), which pushed the shot far past the panel's natural height and left
   a huge empty halo around it. It is now capped and vertically centred. */
.preview-stage {
    min-height: 0 !important;
    height: clamp(320px, 48vh, 452px) !important;
    max-height: 452px !important;
    margin-top: 12px !important;
    padding: 0 !important;
}

.garment-wrap.has-realistic-garment {
    width: auto !important;
    height: 100% !important;
    max-width: min(74%, 418px) !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    margin: 0 auto !important;
    filter: none !important;
}

/* The canvas keeps its 840x880 ratio and is contained by the stage box */
.garment-wrap.has-realistic-garment .photoreal-garment-stack {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 720px) {
    .preview-stage {
        height: clamp(240px, 52vw, 320px) !important;
        max-height: 320px !important;
    }

    .garment-wrap.has-realistic-garment {
        max-width: min(86%, 280px) !important;
    }
}

/* The 360° turntable is gone: the preview is two photographic studio views. */
.stage-controls {
    font-size: 11.5px !important;
    letter-spacing: .04em;
}

/* =========================================================
   PHOTOREAL STAGE — TIGHT FRAME (Phase 10b)
   The photograph is trimmed to its own subject bounds by the
   compositor, so the stage only needs to be as tall as the shot
   plus its caption. No dead halo, no oversized empty panel.
   ========================================================= */

.preview-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding-bottom: 26px !important;
}

.garment-wrap.has-realistic-garment {
    flex: 0 0 auto !important;
    height: auto !important;
    width: min(76%, 400px) !important;
    max-width: 400px !important;
    aspect-ratio: auto !important;
}

.garment-wrap.has-realistic-garment .photoreal-garment-stack {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* The canvases are square-ish once trimmed to the subject, so height must
   come from the image itself rather than the wrapper box. */
.garment-wrap .photoreal-garment-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
}

.garment-wrap.show-back .photoreal-garment-canvas.photoreal-back {
    top: 0 !important;
    left: 0 !important;
}

/* Caption sits under the shot, in flow, not floating over it */
.preview-stage .stage-controls {
    position: static !important;
    bottom: auto !important;
    margin: 0 !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 10.5px !important;
    letter-spacing: .05em !important;
    color: var(--muted) !important;
}

@media (max-width: 720px) {
    .garment-wrap.has-realistic-garment {
        width: min(88%, 320px) !important;
        max-width: 320px !important;
    }

    .preview-stage {
        padding-bottom: 22px !important;
    }
}

/* Mobile: the stage must grow with the shot instead of clipping it.
   The garment canvas is now trimmed to the piece, so its height is exact —
   a fixed stage height would crop the collar on narrow screens. */
@media (max-width: 720px) {
    .preview-stage {
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        padding-top: 18px !important;
    }

    /* the small "front view" stamp would sit on top of the garment here */
    .preview-stage .stage-caption {
        display: none !important;
    }
}

/* =========================================================
   GARMENT ROTATOR — four studio stops
   Front (default) · Left · Back · Right
   ========================================================= */

/* Only one plate is ever visible; the wrap's data-side decides which. */
.garment-wrap .photoreal-garment-canvas.photoreal-left,
.garment-wrap .photoreal-garment-canvas.photoreal-right {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.garment-wrap[data-side="left"] .photoreal-garment-canvas.photoreal-left,
.garment-wrap[data-side="right"] .photoreal-garment-canvas.photoreal-right,
.garment-wrap[data-side="back"] .photoreal-garment-canvas.photoreal-back,
.garment-wrap[data-side="front"] .photoreal-garment-canvas.photoreal-front {
    opacity: 1;
}

.garment-wrap[data-side="left"] .photoreal-garment-canvas.photoreal-front,
.garment-wrap[data-side="right"] .photoreal-garment-canvas.photoreal-front,
.garment-wrap[data-side="back"] .photoreal-garment-canvas.photoreal-front,
.garment-wrap[data-side="left"] .photoreal-garment-canvas.photoreal-back,
.garment-wrap[data-side="right"] .photoreal-garment-canvas.photoreal-back {
    opacity: 0;
}

/* legacy .show-back swap must not fight the four-stop logic */
.garment-wrap.show-back .photoreal-garment-canvas.photoreal-front {
    opacity: 0;
}
.garment-wrap.show-back[data-side="back"] .photoreal-garment-canvas.photoreal-back {
    opacity: 1;
}

/* The stack is the drag surface for moving the design */
.garment-wrap.has-realistic-garment .photoreal-garment-stack {
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
}

.garment-wrap.has-realistic-garment .photoreal-garment-stack:active,
.garment-wrap.has-realistic-garment .photoreal-garment-stack.is-dragging {
    cursor: grabbing;
}

/* ---- the rotator ---- */

.garment-rotator {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 12px auto 0;
    width: min(92%, 430px);
    padding: 0 2px;
}

.rotator-track {
    position: relative;
    height: 26px;
    display: flex;
    align-items: center;
}

/* the line under the handle */
.rotator-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(
        90deg,
        rgba(140, 30, 48, 0.10),
        rgba(140, 30, 48, 0.34) 50%,
        rgba(140, 30, 48, 0.10)
    );
}

/* the four detent dots */
.rotator-stop-dot {
    position: absolute;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(140, 30, 48, 0.30);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    transition: background .2s ease, transform .2s ease;
}

.rotator-stop-dot[data-stop="0"] { left: 0%; transform: translate(0, -50%); }
.rotator-stop-dot[data-stop="1"] { left: 33.333%; }
.rotator-stop-dot[data-stop="2"] { left: 66.666%; }
.rotator-stop-dot[data-stop="3"] { left: 100%; transform: translate(-100%, -50%); }

.rotator-stop-dot.on {
    background: var(--red);
    transform: translate(-50%, -50%) scale(1.35);
}

.rotator-stop-dot[data-stop="0"].on { transform: translate(0, -50%) scale(1.35); }
.rotator-stop-dot[data-stop="3"].on { transform: translate(-100%, -50%) scale(1.35); }

/* the handle */
.rotator-slider {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    z-index: 2;
    width: 100%;
    height: 26px;
    margin: 0;
    background: transparent;
    cursor: grab;
}

.rotator-slider:active { cursor: grabbing; }

.rotator-slider::-webkit-slider-runnable-track {
    height: 26px;
    background: transparent;
}

.rotator-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 17px;
    height: 17px;
    margin-top: 4.5px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 30%, #ffffff 0%, #f6efec 42%, #e7d9d5 100%);
    border: 1.5px solid var(--red);
    box-shadow:
        0 2px 5px rgba(27, 23, 24, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    transition: transform .16s ease, box-shadow .2s ease;
}

.rotator-slider:hover::-webkit-slider-thumb { transform: scale(1.08); }
.rotator-slider:active::-webkit-slider-thumb { transform: scale(0.96); }

.rotator-slider:focus-visible {
    outline: none;
}

.rotator-slider:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 0 0 4px rgba(140, 30, 48, 0.16),
        0 2px 5px rgba(27, 23, 24, 0.22);
}

/* Firefox */
.rotator-slider::-moz-range-track {
    height: 26px;
    background: transparent;
}

.rotator-slider::-moz-range-thumb {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f6efec 42%, #e7d9d5 100%);
    border: 1.5px solid var(--red);
    box-shadow: 0 2px 5px rgba(27, 23, 24, 0.22);
}

/* stop labels */
.rotator-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 1px;
}

.rotator-labels span {
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: color .18s ease, opacity .18s ease;
    opacity: .62;
    user-select: none;
}

.rotator-labels span:hover { opacity: 1; }

.rotator-labels span.active {
    color: var(--red);
    opacity: 1;
    font-weight: 700;
}

@media (max-width: 720px) {
    .garment-rotator {
        width: min(96%, 340px);
        margin-top: 10px;
    }
}


/* =========================================================
   LANGUAGE TOGGLE (EN / عربي) + ARABIC / RTL
   Appended for the language button next to the theme toggle.
   ========================================================= */

.lang-toggle {
    position: relative;
    height: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid var(--red);
    border-radius: 999px;
    background: transparent;
    color: var(--red);
    cursor: pointer;
    flex-shrink: 0;
    font-family: "Cairo", var(--sans);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}

.lang-toggle:hover {
    background: var(--red);
    color: #ffffff;
    border-color: var(--red);
    box-shadow:
        0 0 12px color-mix(in srgb, var(--red) 45%, transparent),
        0 0 24px color-mix(in srgb, var(--red) 18%, transparent);
}

.lang-toggle:active {
    transform: scale(.94);
}

.lang-toggle-label {
    pointer-events: none;
    line-height: 1;
}

/* Arabic type system: Amiri carries the display-serif voice,
   Cairo carries UI/body text (both loaded in the head). */
html.lang-ar {
    --serif: "Amiri", "Playfair Display", Georgia, serif;
    --sans: "Cairo", "DM Sans", Arial, sans-serif;
}

/* Arabic script must never be letter-spaced (it disconnects joins). */
html.lang-ar *:not(.brand-mark):not(.brand-word):not(.footer-brand *) {
    letter-spacing: 0 !important;
}

/* Keep the Ghosthey wordmark exactly as designed. */
html.lang-ar .brand .brand-word {
    letter-spacing: .055em !important;
}

html.lang-ar .brand .brand-word b {
    letter-spacing: .075em !important;
}

html.lang-ar .brand-mark {
    letter-spacing: .02em !important;
}

/* Amiri runs smaller than Playfair at the same size: nudge display type. */
html.lang-ar h1,
html.lang-ar h2,
html.lang-ar h3 {
    line-height: 1.35;
}

/* Fields that hold emails / numbers / Latin codes stay LTR inside. */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    unicode-bidi: plaintext;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="url"] {
    direction: ltr;
    text-align: right;
}

/* Sliders read right-to-left natively; keep the rotator labels under
   their stops (flex row already mirrors with dir=rtl). */
html[dir="rtl"] .garment-rotator {
    direction: rtl;
}

/* Toast + dialogs stay readable in RTL. */
html[dir="rtl"] .toast {
    text-align: center;
}

@media (max-width: 760px) {
    .lang-toggle {
        height: 38px;
        min-width: 38px;
        padding: 0 10px;
        font-size: 12px;
    }
}

/* Hex colour readouts are Latin codes: keep them LTR inside RTL pages. */
html[dir="rtl"] #colorValue {
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Forward arrows on primary buttons point left (forward) in RTL. */
html[dir="rtl"] .btn-primary > span,
html[dir="rtl"] .btn-large > span {
    display: inline-block;
    transform: scaleX(-1);
}

/* Measurement ranges are numeric Latin data: read them LTR, centred. */
html[dir="rtl"] .compact-size-table td,
html[dir="rtl"] .inline-size-table-wrap td {
    direction: ltr;
    text-align: center;
    unicode-bidi: bidi-override;
}

/* Script-aware font picker hint (Arabic fonts <-> English fonts) */
.font-script-hint {
    margin: 7px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
}


/* =========================================================
   DEVICE FIT — one interface, fitted to every screen.
   device.js classifies the device before first paint
   (device-phone / device-tablet / device-desktop,
   os-ios / os-android, has-touch, orient-*); these rules
   fit the SAME interface to that screen. No separate
   mobile site, nothing is hidden from phone customers.
   ========================================================= */

/* nothing may ever force horizontal scrolling on a phone */
html.device-phone,
html.device-phone body,
html.device-tablet,
html.device-tablet body {
    overflow-x: clip;
}

html.device-phone img,
html.device-phone canvas,
html.device-phone svg,
html.device-phone video,
html.device-tablet img,
html.device-tablet canvas,
html.device-tablet svg,
html.device-tablet video {
    max-width: 100%;
}

/* use the real visible height (mobile URL bars) for tall layers */
dialog {
    max-height: calc(var(--app-vh, 1vh) * 100 - 28px);
    overflow-y: auto;
}

.toast {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
    text-align: center;
}

/* ---------- tablets & small laptops: tighten the studio ---------- */
@media (max-width: 1100px) {
    .studio-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

/* ---------- phones (any OS): stacked, thumb-first layout ---------- */
@media (max-width: 860px) {

    /* compact header: same brand, one line, room to breathe */
    .topbar {
        height: auto;
        min-height: 58px;
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }

    /* base brand rules use .brand .brand-word (0,2,0) — out-rank them here */
    .topbar .brand .brand-mark {
        font-size: 26px;
    }

    .topbar .brand .brand-word {
        font-size: 15px;
        letter-spacing: 0.03em;
        line-height: 1.05;
    }

    /* header buttons keep natural width (the ≤480px full-width CTA
       rule below must never stretch them) */
    .topbar-actions .btn {
        width: auto;
    }

    .topbar {
        flex-wrap: nowrap;
    }

    .topbar-actions {
        gap: 5px;
        margin-inline-start: auto;
        flex-wrap: nowrap;
        align-items: center;
    }

    .topbar-actions .btn-quiet,
    .topbar-actions .btn {
        padding: 6px 8px;
        font-size: 10px;
        min-height: 38px;
        white-space: nowrap;
    }

    #themeToggle,
    #langToggle {
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0;
    }

    /* studio: preview first, controls below, everything full width */
    .studio-layout {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 12px;
    }

    .preview-panel {
        order: 1;
        padding: 12px;
    }

    .editor-panel {
        order: 2;
        padding: 14px;
    }

    .preview-stage {
        min-height: 0;
    }

    .garment-wrap.has-realistic-garment {
        width: min(92%, 430px);
        margin-inline: auto;
    }

    .garment-wrap .photoreal-garment-canvas {
        max-height: 54vh;
    }

    /* the 4-stop view slider labels stay on one line */
    .rotator-labels {
        font-size: 10px;
    }

    .stage-caption {
        font-size: 9px;
        letter-spacing: 0.14em;
    }

    /* tool tabs: one swipeable row, never squashed */
    .tool-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        padding-bottom: 4px;
    }

    .tool-tabs::-webkit-scrollbar {
        display: none;
    }

    .tool-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* two-up control grids collapse gracefully */
    .xy-sliders-grid,
    .checkout-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .print-method-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* iOS Safari: inputs at 16px never trigger auto-zoom on focus */
    input:not([type="range"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px !important;
    }

    /* checkout people rows stack their fields */
    .checkout-person-row {
        flex-wrap: wrap;
    }

    /* dialogs become near-full-screen sheets */
    dialog {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        padding: 20px 16px;
        border-radius: 12px;
    }

    /* footer stacks cleanly */
    .footer-main-row {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .xy-sliders-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .step-heading {
        overflow-wrap: break-word;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .editor-bottom .btn {
        width: 100%;
    }
}

/* ---------- landscape phones: give the garment more air ---------- */
/* (landscape phones are wide enough to classify as "tablet",
   so key off orientation + short height instead) */
@media (max-height: 500px) {
    html.orient-landscape .garment-wrap .photoreal-garment-canvas {
        max-height: 78vh;
    }
}

/* ---------- touch devices (Android & iOS): finger-sized targets ---------- */
@media (pointer: coarse) {
    button,
    .btn,
    select,
    .tool-tab,
    .method-pill,
    .art-option,
    .element-chip,
    .subtype-pill {
        min-height: 44px;
    }

    .element-chip .chip-del {
        min-width: 30px;
        min-height: 30px;
    }

    input[type="range"],
    .range {
        min-height: 34px;
    }

    input[type="range"]::-webkit-slider-thumb,
    .range::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
    }

    input[type="range"]::-moz-range-thumb,
    .range::-moz-range-thumb {
        width: 26px;
        height: 26px;
    }

    /* dragging the design must never scroll the page mid-drag */
    .photoreal-garment-stack,
    .garment-wrap {
        touch-action: none;
    }
}

/* ---------- iOS Safari specifics ---------- */
html.os-ios input[type="color"] {
    min-height: 44px;
}

html.os-ios {
    -webkit-tap-highlight-color: rgba(141, 38, 55, 0.18);
}

/* =========================================================
   PHONE FIX — GARMENT NAMES MUST NEVER OVERLAP
   On phones the inactive rack pieces shrink to ~70px, but the
   name captions were nowrap and up to 138px wide, so the names
   ("02 · Hoodies", "03 · Sweatshirts"...) bled over each other
   and off the screen edge. Captions now stay inside their own
   piece and wrap to two lines instead.
   ========================================================= */
@media (max-width: 860px) {
    .step-one-rack-frame {
        padding: 14px 10px 12px;
    }

    .step-one-rack-items {
        gap: 6px;
        padding: 0 4px;
    }

    .step-one-rack-items .rack-piece {
        min-width: 0;
        flex: 1;
    }

    /* give the inactive pieces a little more room on phones so
       their names fit; the active garment art overflows centred
       anyway, so trimming its flex share costs nothing visually */
    .step-one-rack-items .rack-piece.active {
        flex: 1.95;
    }

    .step-one-rack-items .rack-piece-caption {
        white-space: normal;
        max-width: 100%;
        padding: 5px 4px;
        line-height: 1.25;
    }

    .step-one-rack-items .rack-piece-caption strong {
        font-size: 8px;
        letter-spacing: 0;
        overflow-wrap: break-word;
    }

    /* keep the expanded garment inside the frame on phones */
    .step-one-rack-items .rack-front-view {
        width: 150px;
        height: 158px;
    }

    .step-one-rack-items .rack-piece.active .rack-piece-caption {
        padding: 7px 10px;
    }

    .step-one-rack-items .rack-piece.active .rack-piece-caption small {
        white-space: normal;
    }
}

/* =========================================================
   DARK MODE — NO SILVER AURA AROUND BUTTONS
   On the black palette, light rings and diffuse glows read as
   a silver aura (worst: the colour swatches, whose ring was
   30% white). In dark mode buttons sit flat, rings turn
   burgundy, and slider handles match the brand instead of
   glowing pearl-white.
   ========================================================= */

/* flat buttons: no glow shadows in dark mode */
html.dark-mode .btn-primary,
html.dark-mode .btn-primary:hover,
html.dark-mode .subtype-pill.active,
html.dark-mode .payment-method-option.active,
html.dark-mode .step-one-rack-items .rack-piece.active .rack-piece-caption,
html.dark-mode .theme-toggle:hover,
html.dark-mode .lang-toggle:hover {
    box-shadow: none;
}

/* colour swatches: burgundy ring, never silver */
html.dark-mode .swatch {
    box-shadow: 0 0 0 1px rgba(139, 32, 37, 0.6);
}

html.dark-mode .swatch.active {
    box-shadow: 0 0 0 2px var(--red2);
}

/* slider handles: deep burgundy instead of a silver pearl */
html.dark-mode input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: radial-gradient(circle at 34% 30%, #c0454d 0%, #8b2025 55%, #571216 100%);
    border: 1.5px solid #30090c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
}

html.dark-mode input[type="range"]::-moz-range-thumb {
    background: radial-gradient(circle at 34% 30%, #c0454d 0%, #8b2025 55%, #571216 100%);
    border: 1.5px solid #30090c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
}

html.dark-mode input[type="range"].rotator-slider::-webkit-slider-thumb {
    background: radial-gradient(circle at 34% 30%, #c0454d 0%, #8b2025 55%, #571216 100%);
    border-color: #30090c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
}

html.dark-mode input[type="range"].rotator-slider::-moz-range-thumb {
    background: radial-gradient(circle at 34% 30%, #c0454d 0%, #8b2025 55%, #571216 100%);
    border-color: #30090c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55);
}

/* no silver tap flash on touch devices (Android default) */
html.has-touch * {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   TOOL TABS — BIG, READABLE, FIT THE SCREEN WIDTH
   The five studio tools share the full width evenly on every
   screen (no sideways scrolling row, no 10px micro-type).
   ========================================================= */
.tool-tabs {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.tool-tab {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding: 12px 4px 14px;
    min-height: 48px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
}

@media (max-width: 860px) {
    .tool-tabs {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        overflow: visible;
        gap: 4px;
        padding-bottom: 0;
    }

    .tool-tab {
        flex: none;
        font-size: 12px;
        white-space: normal;
        padding: 10px 2px 12px;
    }
}

/* =========================================================
   DESIGN TEMPLATES TAB
   ========================================================= */
.design-template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.design-template-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.design-template-card:hover {
    border-color: var(--red2);
    transform: translateY(-1px);
}

.design-template-card:active {
    transform: scale(0.98);
}

.design-template-card .dt-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 104px;
    padding: 10px 8px;
    border-radius: 8px;
    overflow: hidden;
}

.design-template-card .dt-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.design-template-card .dt-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.design-template-card .dt-sides {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

@media (max-width: 480px) {
    .design-template-card .dt-preview {
        height: 92px;
    }
}

/* =========================================================
   STUDIO — SCROLLABLE DESIGN TOOLS
   On desktop/tablet the tools panel (Color / Text / Artwork /
   Logo / Designs) scrolls on its own and stays pinned beside
   the garment preview, so long lists — the design templates,
   fonts, colour swatches — are fully reachable without the
   page (and the preview) scrolling away. Phones keep the
   natural full-page scroll.
   ========================================================= */
@media (min-width: 861px) {
    .studio-layout {
        align-items: start;
    }

    .editor-panel {
        position: sticky;
        top: 94px;
        max-height: calc(100vh - 112px);
        max-height: calc(100dvh - 112px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--red) transparent;
    }

    .editor-panel::-webkit-scrollbar {
        width: 5px;
    }

    .editor-panel::-webkit-scrollbar-thumb {
        background: var(--red);
        border-radius: 99px;
    }

    .editor-panel::-webkit-scrollbar-track {
        background: transparent;
    }

    /* the tool tab bar stays pinned at the top of the panel */
    .editor-panel .tool-tabs {
        position: sticky;
        top: -22px;
        z-index: 5;
        background: var(--panel);
        padding-top: 10px;
    }
}

/* =========================================================
   CHECKOUT — DELIVERY TABS (ADDRESS / DROP POINT)
   ========================================================= */
.delivery-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
    background: color-mix(in srgb, var(--text) 4%, transparent);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
}

.delivery-tab {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 7px;
    padding: 11px 10px;
    font: 700 12.5px var(--sans, 'DM Sans', sans-serif);
    letter-spacing: .02em;
    color: var(--muted);
    cursor: pointer;
    transition: all .18s ease;
}

.delivery-tab:hover {
    color: var(--text);
}

.delivery-tab.active {
    background: var(--panel);
    border-color: var(--line);
    color: var(--red2, var(--red));
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.delivery-panel select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font: inherit;
}

/* =========================================================
   TRACK ORDER — CANCEL ORDER
   ========================================================= */
.btn-danger-outline {
    background: transparent;
    border: 1px solid #b3382e;
    color: #b3382e;
}

.btn-danger-outline:hover {
    background: #b3382e;
    color: #fff;
}

.btn-danger {
    background: #b3382e;
    border: 1px solid #b3382e;
    color: #fff;
}

.btn-danger:hover {
    background: #93291f;
}

.track-cancel-box {
    margin-top: 16px;
    border: 1px solid #b3382e55;
    background: color-mix(in srgb, #b3382e 5%, var(--panel));
    border-radius: 10px;
    padding: 16px 18px;
}

.track-cancel-box strong {
    display: block;
    margin-bottom: 6px;
}

.track-cancel-box p {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
}

.track-cancel-box input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font: inherit;
    margin-bottom: 12px;
}

.track-cancel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.track-cancel-box .small-help {
    margin-top: 10px;
}
