/* Pressroom POD — design tokens per the "Pressroom" mockup design system,
   with the interactive/accent colour swapped to the client's brand blue
   (sampled from their reference screenshot, ~#0d4fef) in place of the
   mockup's original cyan. Everything else — typeface, layout, money/danger
   magenta, in-production yellow — stays as the client-approved mockup. */

:root {
    --paper: #f3f2f2;
    --stock: #eae9e9;
    --ink: #201e1d;
    --cyan: #0d47ef;
    --cyan-hover: #0a37b8;
    --magenta: #d6006c;
    --yellow: #edbb00;
    --row-height-seller: 68px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
}

a { color: var(--cyan); }

h1, h2, h3 { font-weight: 700; margin: 0 0 0.4em; }

.brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* ---- Top nav (seller side) ---- */
.seller-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 18px 32px;
    background: var(--paper);
    border-bottom: 1px solid var(--stock);
    flex-wrap: wrap;
}

.seller-nav .nav-links {
    display: flex;
    gap: 24px;
    flex: 1;
    flex-wrap: wrap;
}

.seller-nav a {
    color: var(--ink);
    text-decoration: none;
}

.seller-nav a.active,
.seller-nav a:hover {
    color: var(--cyan);
}

.wallet-chip {
    background: var(--stock);
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
}

.store-name {
    font-weight: 600;
}

/* ---- Layout shells ---- */
.auth-shell {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 24px;
}

.page-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px;
}

/* ---- Forms ---- */
label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--ink);
}

input[type=text], input[type=email], input[type=password], input[type=number], select {
    width: 100%;
    background: var(--stock);
    border: 1px solid var(--stock);
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    border-radius: 3px;
    margin-bottom: 18px;
}

input:focus, select:focus {
    outline: 2px solid var(--cyan);
    outline-offset: 1px;
}

.field-hint {
    font-size: 0.8rem;
    color: #6b6866;
    margin-top: -12px;
    margin-bottom: 18px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 3px;
    padding: 13px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--cyan);
    color: #fff;
    width: 100%;
}

.btn-primary:hover { background: var(--cyan-hover); }

.btn-secondary {
    background: var(--stock);
    color: var(--ink);
}

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 0.95rem;
}

.error-note {
    color: var(--magenta);
    font-size: 0.85rem;
    margin: -10px 0 16px;
}

/* ---- Catalogue layout ---- */
.catalogue-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.filters {
    width: 220px;
    flex-shrink: 0;
}

.filters h4 {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6866;
    margin: 24px 0 10px;
}

.filters h4:first-child { margin-top: 0; }

.filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    margin-bottom: 8px;
    cursor: pointer;
}

.filters input[type=checkbox] { width: auto; margin: 0; }

.filters .cat-link {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}

.filters .cat-link.active { color: var(--cyan); font-weight: 600; }
.filters .cat-link span:last-child { color: #6b6866; }

.catalogue-main { flex: 1; min-width: 0; }

.catalogue-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.catalogue-sub {
    color: #6b6866;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--stock);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-photo {
    aspect-ratio: 1;
    background: var(--stock);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a9694;
    font-size: 0.85rem;
}

.product-info { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.product-name { font-weight: 700; }

.product-sku { font-size: 0.85rem; color: #6b6866; }

.product-colours { font-size: 0.8rem; color: #6b6866; }

.placement-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
    font-size: 0.78rem;
}

.placement-chips span {
    background: var(--stock);
    padding: 3px 8px;
    border-radius: 3px;
}

.product-card .btn { margin-top: auto; }

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b6866;
}

.no-results h3 { color: var(--ink); }

@media (max-width: 800px) {
    .catalogue-layout { flex-direction: column; }
    .filters { width: 100%; }
    .page-shell { padding: 20px; }
}

/* ======================================================================
   Design Studio — mobile-first. Base rules below target phone width;
   the min-width:900px block at the end switches to the two-column
   desktop layout. --bar-h accounts for the sticky mobile action bar.
   ====================================================================== */
:root { --bar-h: 76px; }

body.has-studio { padding-bottom: var(--bar-h); }

.studio-topbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 6px;
}
.breadcrumb-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.breadcrumb { color: #6b6866; font-size: 13px; white-space: nowrap; }
.design-name {
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-bottom: 1px dashed var(--stock);
    background: transparent;
    color: var(--ink);
    padding: 3px 2px;
    width: 100%;
    font-family: inherit;
}
.design-name:focus { outline: none; border-bottom-color: var(--cyan); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.autosave-note { color: #6b6866; font-size: 12.5px; }
.desktop-only { display: none; }

/* sticky visual zone: tabs + caption + canvas stay on screen while the
   controls below scroll, so picking a colour/size shows its effect
   without scrolling back up */
.studio-visual {
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--paper);
    margin: 0 -16px;
    padding: 0 16px 10px;
    border-bottom: 1px solid var(--stock);
}

.placement-tabs {
    display: flex;
    gap: 2px;
    margin: 10px 0 0;
    padding: 4px;
    background: var(--stock);
    border-radius: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    width: fit-content;
    max-width: 100%;
}
.placement-tabs::-webkit-scrollbar { display: none; }
.ptab {
    border: none;
    border-radius: 5px;
    background: none;
    font-family: inherit;
    padding: 9px 14px;
    font-size: 14.5px;
    color: #6b6866;
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.ptab:hover:not(.active):not(.disabled) { background: rgba(255,255,255,.6); color: var(--ink); }
.ptab .amt { font-size: 12px; color: #9a9694; font-variant-numeric: tabular-nums; }
.ptab.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(32,30,29,.1); }
.ptab.active .amt { color: var(--cyan); }
.ptab.disabled { color: #c3c0be; cursor: not-allowed; }
.ptab.disabled .amt { font-style: italic; }

.studio-caption-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 0; }
.studio-caption { color: #6b6866; font-size: 14px; }
.studio-caption b { color: var(--ink); }

.canvas-toolbar { display: flex; gap: 6px; }
.canvas-toolbar button {
    border: 1px solid var(--stock); background: var(--paper); border-radius: 3px;
    padding: 5px 10px; font-size: 12px; color: #6b6866; font-family: inherit; cursor: pointer;
}

/* vertical sub-nav (Artwork/Text/Colour/Add-ons) — matches the approved mockup; only
   Artwork is wired up for now, the rest are visually present but disabled */
.studio-subnav { display: none; }
.subnav-item {
    display: block; width: 100%; text-align: left; border: none; background: none;
    font-family: inherit; font-size: 14.5px; padding: 10px 12px; color: #9a9694;
    border-left: 2px solid transparent; border-radius: 0 4px 4px 0; cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.subnav-item:hover:not(.active):not(:disabled) { background: var(--stock); color: var(--ink); }
.subnav-item.active { color: var(--ink); border-left-color: var(--cyan); background: var(--stock); font-weight: 600; cursor: default; }
.subnav-item:disabled { color: #c3c0be; cursor: not-allowed; }

/* Below 900px the subnav itself is hidden (.studio-subnav above), so there's no
   tab control to switch Colour/Add-ons into view — keep them always visible and
   stacked, same as before this tab split existed. */
@media (max-width: 899px) {
    #sidePanelColour, #sidePanelAddons { display: block; }
}

.studio-body { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 24px; }

.canvas-card { background: #fff; border: 1px solid var(--stock); border-radius: 3px; padding: 10px; margin-top: 10px; }
.garment-mock {
    position: relative;
    background: var(--stock);
    border-radius: 2px;
    aspect-ratio: 300 / 340;
    height: 32vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.garment-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.garment-svg path { transition: fill .15s ease; }
.garment-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.garment-block {
    position: absolute;
    left: 15%; top: 28%; width: 70%; height: 44%;
    border-radius: 10px;
    border: 2px solid rgba(32,30,29,0.3);
    transition: background .15s ease;
}

.print-area { position: absolute; border: 1.5px dashed var(--cyan); background: rgba(13,71,239,0.05); }
.print-area::before {
    content: attr(data-label);
    position: absolute; top: -19px; left: 0;
    font-size: 9.5px; letter-spacing: .05em; color: var(--cyan); font-weight: 600; white-space: nowrap;
}
.ps-handle { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid var(--cyan); border-radius: 1px; pointer-events: none; }
.ps-handle.tl { top: -5px; left: -5px; } .ps-handle.tr { top: -5px; right: -5px; }
.ps-handle.bl { bottom: -5px; left: -5px; } .ps-handle.br { bottom: -5px; right: -5px; }

.empty-slot {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; color: #9a9694; padding: 10px; text-align: center;
}
.empty-slot p { margin: 0; font-size: 12.5px; max-width: 200px; }

.mock-caption { text-align: center; color: #9a9694; font-size: 12px; margin-top: 8px; font-style: italic; }

.panel { background: #fff; border: 1px solid var(--stock); border-radius: 3px; padding: 14px 16px; }
.panel-title { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: #6b6866; font-weight: 600; margin-bottom: 10px; }

.file-row {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--paper); border: 1px solid var(--stock); border-radius: 3px;
    padding: 9px 11px; font-size: 13px; margin-bottom: 10px; gap: 10px;
}
.file-row .meta { color: #6b6866; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .ok { color: var(--cyan); font-weight: 700; }
.upload-error { color: var(--magenta); font-size: 12.5px; margin: 6px 0 0; }

.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pos-grid .field-full { grid-column: 1 / -1; }
.field label { display: block; font-size: 11.5px; color: #6b6866; margin-bottom: 4px; }
.field .unit-wrap { position: relative; }
.field input {
    width: 100%; border: 1px solid var(--stock); border-radius: 3px;
    padding: 11px 30px 11px 10px; font-size: 15px; color: var(--ink);
    font-variant-numeric: tabular-nums; font-family: inherit; margin-bottom: 0;
}
.field input:disabled { background: var(--paper); color: #9a9694; }
.field .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #9a9694; pointer-events: none; }
.helper { font-size: 12px; color: #9a9694; margin-top: 2px; }

.swatches { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 2px; }
.swatch .fill { width: 100%; height: 100%; border-radius: 50%; border: 1px solid var(--stock); }
.swatch.selected { border-color: var(--cyan); }
.colour-label { font-size: 13px; color: #6b6866; }

.addon-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; font-size: 14.5px; border-bottom: 1px solid var(--paper); }
.addon-row:last-child { border-bottom: none; }
.addon-row label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; }
.addon-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--cyan); margin: 0; }
.addon-row .p { font-variant-numeric: tabular-nums; color: #6b6866; }

.price-panel { background: #fff; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; padding: 7px 0; gap: 10px; }
.price-row .label { color: var(--ink); }
.price-row .val { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink); }
.price-row .val.muted { color: #9a9694; font-style: italic; font-weight: 400; font-size: 13.5px; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--stock); margin-top: 8px; padding-top: 12px; font-size: 21px; font-weight: 700; color: var(--ink); }
.price-foot { font-size: 12.5px; color: #9a9694; margin-top: 10px; line-height: 1.45; }

.save-block { display: flex; flex-direction: column; gap: 8px; }
.save-block .btn-primary { width: 100%; }
.save-helper { font-size: 12px; color: #9a9694; text-align: center; }

.sticky-bar {
    position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar-h);
    background: #fff; border-top: 1px solid var(--stock);
    display: flex; align-items: center; gap: 12px; padding: 0 16px; z-index: 30;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.sticky-bar .total-block { flex: 1; min-width: 0; }
.sticky-bar .total-amt { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sticky-bar .total-link { display: block; font-size: 12px; color: var(--cyan); background: none; border: none; padding: 0; text-align: left; text-decoration: underline; font-family: inherit; cursor: pointer; }
.sticky-bar .btn-primary { padding: 12px 20px; font-size: 15px; white-space: nowrap; width: auto; }

.btn-small { padding: 7px 12px; font-size: 13px; width: auto; }

@media (min-width: 900px) {
    body.has-studio { padding-bottom: 0; }
    .studio-topbar { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 32px 8px; flex-wrap: wrap; }
    .design-name { font-size: 21px; border-bottom: 1px dashed transparent; width: auto; min-width: 220px; max-width: 380px; }
    .design-name:hover { border-bottom-color: #9a9694; }
    .desktop-only { display: inline-block; }

    .studio-visual { position: static; top: auto; z-index: auto; background: transparent; margin: 0; padding: 0; border-bottom: none; }
    .placement-tabs { padding: 4px; overflow-x: visible; }
    .ptab { padding: 11px 20px; font-size: 15.5px; }
    .studio-caption-row { padding: 14px 0 0; }
    .studio-caption { font-size: 15.5px; }

    .studio-body {
        display: grid;
        grid-template-columns: 110px 280px 1fr 300px;
        gap: 24px; padding: 18px 32px 48px; align-items: start;
    }
    .canvas-card { padding: 16px; margin-top: 14px; }
    .garment-mock { aspect-ratio: 300 / 340; height: 58vh; width: auto; max-width: 100%; margin: 0 auto; }

    .studio-subnav { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
    .studio-artwork-col, .studio-side-col { display: flex; flex-direction: column; gap: 16px; }

    .sticky-bar { display: none; }
}

/* ---- Saved products / Place order / Orders ---- */
.list-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.list-actions { display: flex; align-items: center; gap: 14px; }
.saved-list, .orders-list { display: flex; flex-direction: column; gap: 10px; }
.saved-row { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--stock); border-radius: 3px; padding: 12px 16px; min-height: var(--row-height-seller); }
.saved-thumb { width: 64px; height: 64px; flex: none; background: var(--stock); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #9a9694; text-align: center; overflow: hidden; }
.saved-thumb img { width: 100%; height: 100%; object-fit: contain; }
.saved-main { flex: 1; min-width: 0; }
.saved-name { font-weight: 700; }
.saved-meta { font-size: 0.85rem; color: #6b6866; }
.saved-actions { display: flex; gap: 8px; align-items: center; }
.btn-small.is-disabled { opacity: .45; cursor: not-allowed; }
.btn-small.danger { color: var(--magenta); }
.empty-state { max-width: 520px; margin: 48px auto; text-align: center; }
.empty-state p { color: #6b6866; }

.order-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@media (min-width: 960px) { .order-layout { grid-template-columns: minmax(0, 1fr) 360px; } .summary-card { position: sticky; top: 16px; } }
.order-steps { display: flex; flex-direction: column; gap: 16px; }
.step-card, .summary-card { background: #fff; border: 1px solid var(--stock); border-radius: 3px; padding: 20px; }
.step-label { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: #6b6866; }
.step-card h3 { margin-bottom: 12px; }
.line-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--stock); }
.line-info { flex: 1; min-width: 0; }
.qty { display: flex; align-items: center; gap: 10px; }
.qty button { width: 30px; height: 30px; border: 1px solid var(--stock); background: var(--paper); border-radius: 3px; font-size: 18px; cursor: pointer; font-family: inherit; }
.qty span { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.line-total { min-width: 70px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
#addSaved { margin: 14px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .saved-row { flex-wrap: wrap; } }
.courier-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--stock); border-radius: 3px; margin-bottom: 8px; cursor: pointer; font-size: 1rem; }
.courier-opt input { width: auto; margin: 0; accent-color: var(--cyan); }
.courier-opt .c-name { flex: 1; }
.courier-opt small { display: block; color: #6b6866; font-size: 0.8rem; }
.courier-opt .c-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.seg { display: flex; gap: 8px; }
.seg-opt { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--stock); border-radius: 3px; cursor: pointer; font-size: 1rem; margin: 0; }
.seg-opt input { width: auto; margin: 0; accent-color: var(--cyan); }
.summary-card h3 { margin-bottom: 10px; }

.status-chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: var(--stock); }
.status-chip.live { background: #e3e9ff; color: var(--cyan); }
.status-chip.shipped { background: var(--ink); color: #fff; }
.orders-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--stock); }
.orders-table th, .orders-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--stock); font-size: 0.95rem; }
.orders-table th { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: #6b6866; font-weight: 600; }
.orders-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
.detail-card { background: #fff; border: 1px solid var(--stock); border-radius: 3px; padding: 20px; margin-bottom: 16px; }
.detail-card h4 { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: #6b6866; margin: 0 0 10px; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--ink); position: relative; margin-left: 4px; }
.timeline li.pending { border-left-color: var(--stock); color: #b3b0ae; }
.timeline .when { font-size: 0.85rem; color: #6b6866; }
.success-note { background: #e3e9ff; color: var(--ink); border-left: 3px solid var(--cyan); padding: 12px 16px; margin-bottom: 18px; }
.topbar-actions .btn { white-space: nowrap; }
