/* ============================================================
   PRO STUDIO — MASTER APPLICATION STYLESHEET
   Brand: HEFRO SPORTS LONDON FACTORY DESK
   Theme: Professional Dark Sportswear Studio (Charcoal / Ink / Red)
   ============================================================ */

:root {
  --ps-bg: #0B0C16;
  --ps-panel-bg: #121526;
  --ps-card-bg: #181C32;
  --ps-card-hover: #222744;
  --ps-line: rgba(255, 255, 255, 0.09);
  --ps-line-strong: rgba(255, 255, 255, 0.18);
  --ps-red: #E53923;
  --ps-red-hover: #FF4732;
  --ps-red-glow: rgba(229, 57, 35, 0.35);
  --ps-text: #FFFFFF;
  --ps-muted: #8F94AB;
  --ps-muted-dark: #636882;
  --ps-font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --ps-font-body: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.pro-studio-body {
  margin: 0;
  padding: 0;
  background-color: var(--ps-bg) !important;
  color: var(--ps-text) !important;
  font-family: var(--ps-font-body) !important;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── STUDIO HEADER ─────────────────────────────────────────── */
.ps-header {
  height: 64px;
  background: #0B0C16;
  border-bottom: 1px solid var(--ps-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
}

.ps-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ps-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.ps-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.ps-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.ps-brand-title {
  font-family: var(--ps-font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}

.ps-brand-subtitle {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.ps-header-divider {
  width: 1px;
  height: 28px;
  background: var(--ps-line-strong);
}

.ps-app-badge {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ps-app-title {
  font-family: var(--ps-font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
}

.ps-app-title span {
  color: var(--ps-red);
}

.ps-app-desc {
  font-size: 11px;
  color: var(--ps-muted);
  font-weight: 600;
}

.ps-header-center {
  font-size: 12.5px;
  color: var(--ps-muted);
  font-weight: 500;
  text-align: center;
}

.ps-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-header-btn {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  font-family: var(--ps-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  text-decoration: none;
}

.ps-header-btn:hover {
  background: var(--ps-card-hover);
  border-color: var(--ps-line-strong);
}

.ps-header-btn-primary {
  background: var(--ps-red);
  border-color: var(--ps-red);
  box-shadow: 0 4px 14px var(--ps-red-glow);
}

.ps-header-btn-primary:hover {
  background: var(--ps-red-hover);
  border-color: var(--ps-red-hover);
}

/* ── 3-COLUMN STUDIO LAYOUT ────────────────────────────────── */
.ps-main-workspace {
  display: grid;
  grid-template-columns: 235px 1fr 305px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--ps-bg);
}

/* ── LEFT SIDEBAR (COMPACT & SLEEK) ───────────────────────── */
.ps-left-sidebar {
  background: var(--ps-panel-bg);
  border-right: 1px solid var(--ps-line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  gap: 12px;
}

.ps-left-sidebar::-webkit-scrollbar,
.ps-right-sidebar::-webkit-scrollbar {
  width: 5px;
}
.ps-left-sidebar::-webkit-scrollbar-thumb,
.ps-right-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.ps-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ps-muted);
  margin-bottom: 6px;
  display: block;
}

.ps-select-field {
  width: 100%;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: #fff;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

/* Vertical 4-Step Nav */
.ps-step-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-step-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ps-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: all .18s;
}

.ps-step-nav-item:hover {
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.ps-step-nav-item.active {
  background: var(--ps-red);
  color: #fff;
  box-shadow: 0 4px 12px var(--ps-red-glow);
}

.ps-step-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-step-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.ps-step-nav-item.active .ps-step-badge {
  background: rgba(0,0,0,0.25);
}

/* Product Options */
.ps-options-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 12px;
}

.ps-opt-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-opt-label {
  font-size: 11px;
  color: var(--ps-muted);
  font-weight: 700;
}

.ps-btn-sizechart {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  transition: all .2s;
}
.ps-btn-sizechart:hover {
  background: var(--ps-card-hover);
  border-color: var(--ps-red);
  color: var(--ps-red);
}

/* High Performance Fabric Card */
.ps-fabric-card {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ps-fabric-img-wrap {
  width: 100%;
  height: 90px;
  background: #111;
  overflow: hidden;
  position: relative;
}

.ps-fabric-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.ps-fabric-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ps-fabric-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.ps-fabric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.ps-fabric-pill {
  font-size: 9.5px;
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--ps-muted);
  font-weight: 600;
}

/* ── CENTER STAGE ──────────────────────────────────────────── */
.ps-center-stage {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, #16182B 0%, #0A0B14 100%);
  position: relative;
  overflow: hidden;
}

/* View Switcher Bar (Front View / Back View / Dual View) */
.ps-view-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px 0;
  z-index: 10;
}

.ps-view-pill-group {
  display: inline-flex;
  background: var(--ps-panel-bg);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.ps-view-pill-btn {
  background: transparent;
  border: 0;
  color: var(--ps-muted);
  padding: 6px 18px;
  font-family: var(--ps-font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: all .18s;
}

.ps-view-pill-btn.active {
  background: var(--ps-red);
  color: #fff;
  box-shadow: 0 2px 8px var(--ps-red-glow);
}

/* Canvas Viewport */
.ps-canvas-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.ps-dual-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  width: 100%;
  height: 100%;
  max-width: 980px;
  margin: 0 auto;
  transition: transform .2s ease-out;
}

.ps-canvas-card {
  flex: 1;
  max-width: 440px;
  aspect-ratio: 1/1.1;
  position: relative;
  display: grid;
  place-items: center;
}

.ps-canvas-card svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

/* In Single View Mode */
.ps-dual-stage-wrap.view-front-only #ps-stage-back {
  display: none !important;
}
.ps-dual-stage-wrap.view-front-only #ps-stage-front {
  display: flex !important;
  max-width: 540px !important;
}

.ps-dual-stage-wrap.view-back-only #ps-stage-front {
  display: none !important;
}
.ps-dual-stage-wrap.view-back-only #ps-stage-back {
  display: flex !important;
  max-width: 540px !important;
}

/* Canvas Bottom Floating Toolbars */
.ps-canvas-floating-tools {
  position: absolute;
  bottom: 120px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 20;
}

.ps-float-group {
  display: inline-flex;
  align-items: center;
  background: rgba(18, 21, 38, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 3px;
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.ps-tool-btn {
  background: transparent;
  border: 0;
  color: var(--ps-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 3px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ps-tool-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ps-tool-btn.btn-reset {
  color: #fff;
  background: rgba(229, 57, 35, 0.2);
  border: 1px solid rgba(229, 57, 35, 0.4);
}
.ps-tool-btn.btn-reset:hover {
  background: var(--ps-red);
}

/* Bottom Texture / Preset Carousel */
.ps-texture-carousel-wrap {
  height: 104px;
  background: rgba(11, 12, 22, 0.95);
  border-top: 1px solid var(--ps-line);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  overflow-x: auto;
  flex-shrink: 0;
  z-index: 10;
}

.ps-texture-carousel-wrap::-webkit-scrollbar {
  height: 4px;
}
.ps-texture-carousel-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

.ps-tex-card {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: var(--ps-card-bg);
  border: 1.5px solid var(--ps-line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all .18s;
  text-align: center;
  padding: 4px;
}

.ps-tex-card:hover {
  border-color: var(--ps-line-strong);
  transform: translateY(-2px);
}

.ps-tex-card.active {
  border-color: var(--ps-red);
  box-shadow: 0 0 0 1px var(--ps-red), 0 4px 12px var(--ps-red-glow);
}

.ps-tex-thumb {
  width: 100%;
  height: 52px;
  object-fit: cover;
  border-radius: 3px;
}

.ps-tex-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--ps-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.ps-tex-card.active .ps-tex-name {
  color: #fff;
}

.ps-tex-card-custom {
  border: 1.5px dashed var(--ps-line-strong);
  background: transparent;
}
.ps-tex-card-custom:hover {
  border-color: var(--ps-red);
  color: var(--ps-red);
}

/* ── RIGHT SIDEBAR (INSPECTOR & CONTROLS - COMPACT) ────────── */
.ps-right-sidebar {
  background: var(--ps-panel-bg);
  border-left: 1px solid var(--ps-line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  gap: 12px;
}

/* Tabs: Color & Texture | Logos & Text | Layers */
.ps-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ps-card-bg);
  border-radius: 4px;
  padding: 3px;
  gap: 2px;
}

.ps-inspector-tab {
  background: transparent;
  border: 0;
  color: var(--ps-muted);
  padding: 8px 4px;
  font-family: var(--ps-font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
}

.ps-inspector-tab.active {
  background: var(--ps-red);
  color: #fff;
}

.ps-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}
.ps-tab-panel.active {
  display: flex;
}

/* Garment Parts List */
.ps-parts-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ps-part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s;
}

.ps-part-item:hover {
  background: var(--ps-card-hover);
  border-color: var(--ps-line-strong);
}

.ps-part-item.active {
  border-color: var(--ps-red);
  box-shadow: 0 0 0 1px var(--ps-red);
}

.ps-part-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.ps-part-swatch {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.25);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Direct SVG Canvas Part Interaction */
.kit-svg g[id^="part-"] {
  cursor: pointer;
  transition: filter .15s ease;
}
.kit-svg g[id^="part-"]:hover {
  filter: brightness(1.15) drop-shadow(0 0 6px rgba(229, 57, 35, 0.45));
}
.ps-part-active-pulse {
  animation: psPartPulse 1.2s ease-in-out infinite alternate;
}
@keyframes psPartPulse {
  0% { filter: drop-shadow(0 0 4px #E53923); stroke: #E53923; stroke-width: 1.5px; }
  100% { filter: drop-shadow(0 0 12px #ff6b57); stroke: #ffffff; stroke-width: 2.5px; }
}

/* Color Mode (Solid Color / Gradient / Sublimation) */
.ps-colormode-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 3px;
  gap: 2px;
}

.ps-colormode-btn {
  background: transparent;
  border: 0;
  color: var(--ps-muted);
  padding: 6px 4px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 3px;
  text-align: center;
  transition: all .15s;
}

.ps-colormode-btn.active {
  background: var(--ps-red);
  color: #fff;
}

/* 2D Photoshop Color Picker */
.ps-picker-box {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-picker-canvas-row {
  display: flex;
  gap: 10px;
  height: 140px;
}

.ps-sat-val-canvas {
  flex: 1;
  height: 100%;
  border-radius: 4px;
  position: relative;
  cursor: crosshair;
  background: red;
  overflow: hidden;
}

.ps-sat-val-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.ps-sat-val-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000, transparent);
}

.ps-sat-handle {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  box-shadow: 0 0 2px #000;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

.ps-hue-bar {
  width: 22px;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  position: relative;
  cursor: pointer;
}

.ps-hue-handle {
  position: absolute;
  left: -2px;
  right: -2px;
  height: 6px;
  border: 2px solid #fff;
  box-shadow: 0 0 2px #000;
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Values readout */
.ps-color-values-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: monospace;
  font-size: 11px;
}

.ps-val-box {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--ps-line);
  padding: 4px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
}

.ps-val-box span {
  color: var(--ps-muted);
  margin-right: 4px;
}

/* Texture Pattern Card in Sidebar */
.ps-active-tex-card {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ps-active-tex-thumb {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--ps-line);
}

.ps-active-tex-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ps-active-tex-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.ps-active-tex-type {
  font-size: 10.5px;
  color: var(--ps-muted);
}

/* ── BOTTOM MASTER STEPPER BAR ─────────────────────────────── */
.ps-footer-stepper {
  height: 72px;
  background: #0B0C16;
  border-top: 1px solid var(--ps-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 100;
}

.ps-stepper-steps-group {
  display: flex;
  align-items: center;
  gap: 28px;
}

.ps-stepper-step {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  opacity: 0.6;
  transition: all .2s;
}

.ps-stepper-step:hover {
  opacity: 0.9;
}

.ps-stepper-step.active {
  opacity: 1;
}

.ps-stepper-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line-strong);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--ps-font-display);
  font-size: 14px;
  font-weight: 800;
}

.ps-stepper-step.active .ps-stepper-num {
  background: var(--ps-red);
  border-color: var(--ps-red);
  box-shadow: 0 2px 8px var(--ps-red-glow);
}

.ps-stepper-info {
  display: flex;
  flex-direction: column;
}

.ps-stepper-title {
  font-family: var(--ps-font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
}

.ps-stepper-sub {
  font-size: 10.5px;
  color: var(--ps-muted);
}

.ps-btn-next-step {
  background: var(--ps-red);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--ps-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px var(--ps-red-glow);
  transition: all .2s;
}

.ps-btn-next-step:hover {
  background: var(--ps-red-hover);
  transform: translateY(-1px);
}

/* ── MODALS (SIZE CHART, EXPORT, MY DESIGNS) ───────────────── */
.ps-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ps-modal-backdrop.active {
  display: flex;
}

.ps-modal-card {
  background: var(--ps-panel-bg);
  border: 1px solid var(--ps-line-strong);
  border-radius: 8px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}

.ps-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ps-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ps-modal-title {
  font-family: var(--ps-font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.ps-modal-close {
  background: none;
  border: none;
  color: var(--ps-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.ps-modal-close:hover {
  color: #fff;
}

.ps-modal-body {
  padding: 20px;
}

/* Interactive Canvas Transform Box & Selection Handles */
.ps-transform-handle {
  width: 10px;
  height: 10px;
  background: #fff;
  border: 1.5px solid var(--ps-red);
  border-radius: 2px;
  position: absolute;
  cursor: pointer;
}

.ps-selected-obj {
  outline: 2px dashed #E53923;
  outline-offset: 4px;
}

.ps-selected-obj text {
  filter: drop-shadow(0 0 6px rgba(229, 57, 35, 0.6));
}

.ps-quick-hud {
  position: absolute;
  display: none;
  background: rgba(18, 21, 38, 0.96);
  border: 1px solid var(--ps-red);
  border-radius: 6px;
  padding: 4px 8px;
  gap: 6px;
  align-items: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.7);
  z-index: 100;
  pointer-events: auto;
}

.ps-quick-hud.active {
  display: flex;
}

.ps-hud-input {
  background: #0f1322;
  border: 1px solid var(--ps-line-strong);
  color: #fff;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  width: 120px;
}
.ps-hud-input:focus {
  border-color: var(--ps-red);
}

.ps-hud-slider {
  accent-color: var(--ps-red);
  cursor: ew-resize;
  width: 65px;
  height: 16px;
}

.ps-hud-btn {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.ps-hud-btn:hover {
  background: var(--ps-card-hover);
  border-color: var(--ps-line-strong);
}

.ps-hud-btn-del {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.4);
}

.ps-hud-btn-del:hover {
  background: rgba(255, 77, 79, 0.2);
  border-color: #ff4d4f;
}

/* Floating Garment Part HUD (Click on canvas shirt panel) */
.ps-garment-hud {
  position: absolute;
  display: none;
  background: rgba(14, 18, 32, 0.96);
  border: 1.5px solid var(--ps-red);
  border-radius: 6px;
  padding: 6px 12px;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.75);
  z-index: 105;
  pointer-events: auto;
}
.ps-garment-hud.active {
  display: flex;
}

/* Texture Quick Panel Pill Buttons */
.ps-tex-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 6px;
}
.ps-tex-panel-btn {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.ps-tex-panel-btn:hover {
  border-color: var(--ps-line-strong);
  color: #fff;
}
.ps-tex-panel-btn.active {
  background: var(--ps-red);
  border-color: var(--ps-red);
  color: #fff;
}

/* Active Bar in Inspector */
.ps-active-bar {
  background: rgba(229, 57, 35, 0.08);
  border: 1px solid rgba(229, 57, 35, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Dynamic Texture Palette Layers */
.ps-palette-layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 6px 8px;
  transition: all .15s;
}
.ps-palette-layer-item:hover {
  border-color: var(--ps-line-strong);
}
.ps-palette-layer-color {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0;
  background: transparent;
}
.ps-palette-layer-name {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
.ps-palette-layer-hex {
  font-family: monospace;
  font-size: 10.5px;
  color: var(--ps-muted);
  background: var(--ps-input-bg);
  border: 1px solid var(--ps-line);
  border-radius: 3px;
  padding: 2px 6px;
  width: 65px;
  text-align: center;
}

/* Photoshop Style Text Controls */
.ps-tool-btn-group {
  display: flex;
  gap: 4px;
}
.ps-tool-btn {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ps-tool-btn:hover {
  background: var(--ps-card-hover);
  color: #fff;
  border-color: var(--ps-line-strong);
}
.ps-tool-btn.active {
  background: var(--ps-red);
  color: #fff;
  border-color: var(--ps-red);
}

/* Responsive adjustments */
@media (max-width: 1180px) {
  .ps-main-workspace {
    grid-template-columns: 240px 1fr 310px;
  }
  .ps-dual-stage-wrap {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .ps-main-workspace {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .ps-left-sidebar, .ps-right-sidebar {
    border: none;
  }
}

/* ── COMPACT UNIFIED LAYERS MANAGER ─────────────────────── */
.ps-compact-layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 5px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.ps-compact-layer-row:hover {
  background: var(--ps-card-hover);
  border-color: var(--ps-line-strong);
}
.ps-compact-layer-row.active {
  background: rgba(229, 57, 35, 0.12);
  border-color: var(--ps-red);
  box-shadow: 0 0 0 1px var(--ps-red);
}
.ps-layer-row-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  font-size: 11px;
  flex-shrink: 0;
  color: var(--ps-red);
  font-weight: bold;
}
.ps-layer-row-title {
  flex: 1;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps-layer-row-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  color: var(--ps-muted);
  text-transform: uppercase;
}
.ps-layer-row-badge.badge-sleeve {
  background: rgba(0, 168, 89, 0.2);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}
.ps-layer-row-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.ps-layer-action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ps-muted);
  border-radius: 3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 11px;
  cursor: pointer;
  transition: all .12s;
}
.ps-layer-action-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: var(--ps-line);
}
.ps-layer-action-btn.btn-del:hover {
  background: rgba(255, 77, 79, 0.25);
  color: #ff6b6b;
  border-color: #ff4d4f;
}

/* ── ON-CANVAS INTERACTIVE MOUSE TRANSFORM HANDLES ──────── */
.ps-canvas-scale-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #E53923;
  border: 2px solid #ffffff;
  border-radius: 3px;
  cursor: nwse-resize;
  z-index: 105;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: auto;
  transition: transform .1s;
}
.ps-canvas-scale-handle:hover {
  transform: scale(1.25);
  background: #ff5238;
}

.ps-canvas-rotate-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #0055ff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: grab;
  z-index: 105;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: auto;
  transition: transform .1s;
}
.ps-canvas-rotate-handle:hover {
  transform: scale(1.25);
  background: #3377ff;
}

/* Target Placement Segmented Group */
.ps-placement-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.ps-placement-btn {
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.ps-placement-btn:hover {
  background: var(--ps-card-hover);
  color: #fff;
}
.ps-placement-btn.active {
  background: var(--ps-red);
  color: #fff;
  border-color: var(--ps-red);
}

/* ── ATHLETIC PANTONE COLOR BOOK (PALETTE) ──────────────── */
.ps-pantone-book {
  background: var(--ps-panel-bg);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  padding: 10px;
  margin-top: 10px;
}
.ps-pantone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ps-pantone-title {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ps-pantone-search {
  width: 100%;
  padding: 5px 8px;
  font-size: 11px;
  background: var(--ps-input-bg);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  color: #fff;
  margin-bottom: 8px;
  outline: none;
}
.ps-pantone-search:focus {
  border-color: var(--ps-red);
}
.ps-pantone-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  overflow-x: auto;
}
.ps-pantone-filter-btn {
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.ps-pantone-filter-btn.active, .ps-pantone-filter-btn:hover {
  background: rgba(229, 57, 35, 0.15);
  color: #fff;
  border-color: var(--ps-red);
}
.ps-pantone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}
.ps-pantone-swatch {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  border-radius: 4px;
  padding: 5px 6px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.ps-pantone-swatch:hover {
  background: var(--ps-card-hover);
  border-color: #555;
  transform: translateY(-1px);
}
.ps-pantone-swatch.active {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.3);
}
.ps-pantone-dot {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.5);
}
.ps-pantone-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  line-height: 1.2;
}
.ps-pantone-code {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  font-family: monospace;
}
.ps-pantone-name {
  font-size: 9.5px;
  color: var(--ps-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 4-CORNER GIZMO TRANSFORM BOX & ROTATION KNOB ───────── */
.ps-canvas-gizmo-box {
  position: absolute;
  pointer-events: none;
  z-index: 110;
  box-sizing: border-box;
}
.ps-gizmo-outline {
  position: absolute;
  inset: -2px;
  border: 1.5px dashed #00e5ff;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
  pointer-events: none;
}
.ps-gizmo-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid #0091ea;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  pointer-events: auto;
  z-index: 112;
  transition: transform .1s;
}
.ps-gizmo-corner:hover {
  transform: scale(1.3);
  background: #00e5ff;
}
.ps-gizmo-corner.ps-gizmo-tl {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}
.ps-gizmo-corner.ps-gizmo-tr {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}
.ps-gizmo-corner.ps-gizmo-bl {
  bottom: -6px;
  left: -6px;
  cursor: nesw-resize;
}
.ps-gizmo-corner.ps-gizmo-br {
  bottom: -6px;
  right: -6px;
  cursor: nwse-resize;
}
.ps-gizmo-rot-stalk {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 1.5px;
  height: 24px;
  background: #00e5ff;
  transform: translateX(-50%);
  pointer-events: none;
}
.ps-gizmo-rot-knob {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: #00e5ff;
  color: #000;
  border: 2px solid #ffffff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  pointer-events: auto;
  z-index: 115;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
  user-select: none;
  transition: transform .15s, background .15s;
}
.ps-gizmo-rot-knob:hover {
  transform: translateX(-50%) scale(1.2);
  background: #ffffff;
  color: #0091ea;
}
.ps-gizmo-rot-knob:active {
  cursor: grabbing;
}

/* ── TEXTURE ANGLE PRESETS & DUAL-MODE TOGGLE ───────────── */
.ps-tex-angle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 4px;
}
.ps-tex-angle-btn {
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  border-radius: 3px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  cursor: pointer;
  transition: all .15s;
}
.ps-tex-angle-btn:hover {
  background: var(--ps-card-hover);
  color: #fff;
}
.ps-tex-angle-btn.active {
  background: var(--ps-red);
  color: #fff;
  border-color: var(--ps-red);
}

.ps-mode-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.ps-mode-toggle-btn {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  background: var(--ps-card-bg);
  border: 1px solid var(--ps-line);
  color: var(--ps-muted);
  cursor: pointer;
  transition: all .15s;
}
.ps-mode-toggle-btn:hover {
  color: #fff;
  background: var(--ps-card-hover);
}
.ps-mode-toggle-btn.active {
  background: #00e5ff;
  color: #000;
  border-color: #00e5ff;
  font-weight: 800;
}

/* ============================================================
   APPIN SPORTS / KITBUILDER UK LIGHT STUDIO WORKBENCH THEME
   ============================================================ */
:root {
  --ap-bg: #F4F5F8;
  --ap-card-bg: #FFFFFF;
  --ap-card-hover: #F9FAFB;
  --ap-border: #E5E7EB;
  --ap-border-strong: #D1D5DB;
  --ap-text-main: #111827;
  --ap-text-muted: #6B7280;
  --ap-primary: #E53923;
  --ap-primary-hover: #C8102E;
  --ap-green: #10B981;
  --ap-thumb: #1F2937;
  --ap-track: #E5E7EB;
}

/* Appin Main App Shell */
.appin-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--ap-bg);
  color: var(--ap-text-main);
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
}

/* Appin Top Header Bar */
.appin-top-header {
  height: 60px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.appin-model-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.appin-model-id {
  font-size: 19px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.01em;
}
.appin-model-subtitle {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}
.appin-back-link {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ap-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  transition: color .15s;
}
.appin-back-link:hover {
  color: #059669;
  text-decoration: underline;
}

.appin-brand-center {
  display: flex;
  align-items: center;
  gap: 10px;
}
.appin-brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.appin-brand-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #111827;
  text-transform: uppercase;
}

.appin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.appin-btn-pdf {
  background: #F3F4F6;
  border: 1px solid var(--ap-border-strong);
  color: #374151;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.appin-btn-pdf:hover {
  background: #E5E7EB;
  color: #111827;
}
.appin-btn-checkout {
  background: var(--ap-green);
  border: none;
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transition: all .15s;
}
.appin-btn-checkout:hover {
  background: #059669;
  transform: translateY(-1px);
}

/* Appin Main Workbench (Center Canvas + Right Sidebar) */
.appin-workbench {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Left / Center 3D Stage Area */
.appin-stage-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--ap-bg);
  overflow: hidden;
}

.appin-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px 20px 165px 20px;
}

/* High-res Jersey Canvas Card */
.appin-jersey-card {
  width: 100%;
  max-width: 620px;
  height: 100%;
  max-height: calc(100% - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.appin-jersey-card svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.12));
}

/* Appin Floating Bottom Dock */
.appin-bottom-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 1px solid var(--ap-border);
  border-radius: 36px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  z-index: 95;
  user-select: none;
}
.appin-dock-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 20px;
  transition: all .15s;
}
.appin-dock-btn:hover {
  background: #F3F4F6;
  color: #111827;
}
.appin-dock-btn.active {
  background: #E5E7EB;
  color: #111827;
  font-weight: 700;
}
.appin-dock-sep {
  width: 1px;
  height: 16px;
  background: #E5E7EB;
}

/* Appin Right Sidebar (Accordion Content + Vertical Tab Rail) */
.appin-right-sidebar {
  width: 440px;
  background: #FFFFFF;
  border-left: 1px solid var(--ap-border);
  display: flex;
  flex-shrink: 0;
  height: 100%;
  box-shadow: -2px 0 10px rgba(0,0,0,0.02);
}

.appin-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  background: #FFFFFF;
}

/* Far-Right Vertical Tab Rail */
.appin-vertical-tabs {
  width: 52px;
  background: #F8F9FA;
  border-left: 1px solid var(--ap-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
  flex-shrink: 0;
}
.appin-vtab {
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 24px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B7280;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.appin-vtab:hover {
  color: #111827;
  background: #F1F3F5;
}
.appin-vtab.active {
  background: #FFFFFF;
  color: #111827;
  font-weight: 800;
  border-left: 3px solid var(--ap-primary);
  box-shadow: 2px 0 6px rgba(0,0,0,0.03);
}

/* Accordion Component */
.appin-accordion {
  border-bottom: 1px solid var(--ap-border);
  background: #FFFFFF;
}
.appin-acc-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.appin-acc-header:hover {
  background: #F9FAFB;
}
.appin-acc-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.appin-acc-chevron {
  width: 16px;
  height: 16px;
  color: #9CA3AF;
  transition: transform .2s ease;
}
.appin-accordion.open .appin-acc-chevron {
  transform: rotate(180deg);
  color: #111827;
}
.appin-acc-body {
  display: none;
  padding: 14px 20px 20px;
  border-top: 1px solid #F3F4F6;
  background: #FFFFFF;
}
.appin-accordion.open .appin-acc-body {
  display: block;
}

.appin-acc-desc {
  font-size: 11.5px;
  color: #6B7280;
  line-height: 1.45;
  margin: 0 0 14px;
}

/* Upload Image Button */
.appin-upload-btn {
  background: #E9ECEF;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #1F2937;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
}
.appin-upload-btn:hover {
  background: #DEE2E6;
  border-color: #9CA3AF;
}

/* 2x2 Slider Grid */
.appin-slider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 14px 0;
}
.appin-slider-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.appin-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
}
.appin-slider-val {
  font-size: 10.5px;
  color: #6B7280;
  font-family: monospace;
}

/* Appin Range Slider Input */
.appin-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--ap-track);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.appin-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ap-thumb);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform .1s, background .15s;
}
.appin-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #000000;
}

/* Reset Button */
.appin-reset-btn {
  background: #E9ECEF;
  border: none;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
}
.appin-reset-btn:hover {
  background: #DDE2E6;
  color: #111827;
}

/* Checkbox Toggle */
.appin-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  cursor: pointer;
  user-select: none;
}
.appin-checkbox-label {
  font-size: 12px;
  font-weight: 700;
  color: #1F2937;
}
.appin-checkbox-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #D1D5DB;
  background: #FFFFFF;
  cursor: pointer;
}

/* Sticky Bottom Checkout Footer */
.appin-bottom-footer {
  height: 64px;
  background: #FFFFFF;
  border-top: 1px solid var(--ap-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
  z-index: 100;
}
.appin-footer-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}
.appin-footer-price {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
}
.appin-footer-desc {
  font-size: 11.5px;
  color: #6B7280;
}

/* Responsive adjustments for Mobile & Tablet */
@media (max-width: 1024px) {
  .appin-top-header {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .appin-model-block {
    order: 1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .appin-model-subtitle {
    display: none;
  }
  .appin-brand-center {
    order: 2;
  }
  .appin-brand-logo {
    height: 28px;
  }
  .appin-brand-name {
    font-size: 14px;
  }
  .appin-top-actions {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
  }
  .appin-top-actions .appin-btn-checkout {
    flex: 1;
    justify-content: center;
    padding: 7px 12px;
    font-size: 13px;
  }
  .appin-top-actions .appin-btn-pdf {
    padding: 7px 10px;
    font-size: 12px;
  }
  .appin-header-currency-wrap label {
    display: none;
  }
  .appin-header-currency-wrap select {
    font-size: 11px;
    padding: 4px 6px;
  }

  .appin-workbench {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 54px);
  }
  .appin-stage-area {
    flex: none;
    width: 100%;
    height: 48vh;
    min-height: 340px;
    max-height: 460px;
    position: relative;
    background: var(--ap-bg);
  }
  .appin-canvas-container {
    padding: 38px 10px 58px 10px;
    height: 100%;
  }
  .appin-jersey-card {
    max-height: 100%;
    max-width: 100%;
    height: 100%;
  }
  .appin-jersey-card svg {
    max-height: 100%;
    max-width: 100%;
    height: 100%;
    width: auto;
  }
  .appin-bottom-dock {
    bottom: 8px;
    max-width: 96%;
    padding: 4px 8px;
    gap: 4px;
    transform: translateX(-50%) scale(0.88);
    transform-origin: bottom center;
  }
  .appin-dock-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .appin-product-textures-bar {
    bottom: 50px;
    left: 8px;
    right: 8px;
    padding: 6px 8px;
    gap: 8px;
  }
  .appin-textures-toggle-pill {
    bottom: 52px;
    right: 8px;
    font-size: 10px;
    padding: 3px 8px;
  }

  .appin-right-sidebar {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    flex: 1;
    min-height: 52vh;
    border-left: none;
    border-top: 2px solid var(--ap-border);
  }
  .appin-vertical-tabs {
    order: -1; /* Display categories navigation at the TOP of the controls on mobile */
    width: 100%;
    height: auto;
    min-height: 46px;
    background: #FFFFFF;
    border-left: none;
    border-bottom: 2px solid var(--ap-border);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 6px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    scrollbar-width: none;
  }
  .appin-vertical-tabs::-webkit-scrollbar {
    display: none;
  }
  .appin-vtab {
    writing-mode: horizontal-tb !important;
    transform: none !important;
    width: auto;
    flex: 1;
    min-width: 75px;
    padding: 10px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    border-left: none !important;
    border-bottom: 3px solid transparent;
    border-radius: 6px;
    color: #4b5563;
    white-space: nowrap;
    background: #F3F4F6;
  }
  .appin-vtab:hover {
    background: #E5E7EB;
    color: #111827;
  }
  .appin-vtab.active {
    background: #0B0C16;
    color: #FFFFFF;
    font-weight: 800;
    border-bottom: 3px solid var(--ap-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
  .appin-sidebar-scroll {
    width: 100%;
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
  .appin-sidebar-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .appin-sidebar-tabs::-webkit-scrollbar {
    display: none;
  }
  .appin-tab-btn {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .appin-stage-area {
    height: 44vh;
    min-height: 310px;
  }
  .appin-canvas-container {
    padding: 34px 8px 52px 8px;
  }
  .appin-bottom-dock {
    bottom: 6px;
    transform: translateX(-50%) scale(0.78);
    transform-origin: bottom center;
  }
  .appin-product-textures-bar {
    bottom: 46px;
    padding: 5px 6px;
    border-radius: 8px;
  }
  .appin-textures-toggle-pill {
    bottom: 48px;
  }
  .appin-slider-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .appin-btn-checkout {
    font-size: 12px;
  }
}


/* 1-Line Product Textures Bar Under Jersey Canvas */
.appin-product-textures-bar {
  position: absolute;
  bottom: 70px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ap-border);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 85;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease, visibility 0.28s;
}

.appin-product-textures-bar.collapsed {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.appin-textures-toggle-pill {
  position: absolute;
  bottom: 82px;
  right: 24px;
  z-index: 92;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--ap-border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.appin-textures-toggle-pill:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.appin-product-textures-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  border-right: 1px solid var(--ap-border);
  padding-right: 12px;
}

.appin-product-textures-bar .ps-texture-carousel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  padding: 2px 0;
  scrollbar-width: thin;
}

.appin-product-textures-bar .ps-texture-carousel::-webkit-scrollbar {
  height: 4px;
}
.appin-product-textures-bar .ps-texture-carousel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.appin-product-textures-bar .ps-tex-card {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.appin-product-textures-bar .ps-tex-card:hover {
  border-color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.appin-product-textures-bar .ps-tex-card.active {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px #0f172a;
  background: #f8fafc;
}

.appin-product-textures-bar .ps-tex-thumb {
  width: 100%;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
}

.appin-product-textures-bar .ps-tex-name {
  font-size: 9.5px;
  font-weight: 700;
  color: #334155;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

/* Crisp White Typography for Garment Parts & Pantone Header */
.ps-part-item {
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  transition: all 0.15s ease;
}

.ps-part-item:hover {
  background: #1f2937 !important;
  border-color: #ffffff !important;
}

.ps-part-item.active {
  background: #0f172a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 2px #ffffff, 0 4px 12px rgba(0,0,0,0.4) !important;
}

.ps-part-item span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.ps-pantone-header {
  background: #111827 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
}

.ps-pantone-title,
.ps-pantone-title span,
.ps-pantone-header span {
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* ── Interactive Layer Texture Prompt Card ───────────────── */
.ps-layer-tex-prompt-card {
  margin-bottom: 14px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.ps-layer-tex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ps-layer-tex-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.ps-layer-tex-status {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.ps-layer-tex-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ps-btn-layer-tex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ps-btn-layer-tex:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.ps-btn-layer-tex:active {
  transform: translateY(0);
}

/* Dock texture panel pills */
.appin-product-textures-bar .ps-tex-panel-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.appin-product-textures-bar .ps-tex-panel-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.appin-product-textures-bar .ps-tex-panel-btn.active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  font-weight: 700;
}



