/* Custom Apparel Studio */
:root {
  --ink: #2e2142;
  --ink-soft: #5d5468;
  --accent: #d97742;
  --accent-dark: #b85c2c;
  --bg: #f7f5f2;
  --line: #e8e3ee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.97rem;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #e68a58; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #3a2d52; }

/* Header + hero */
.top { background: var(--ink); border-bottom: 4px solid var(--accent); position: sticky; top: 0; z-index: 40; }
.top-wrap { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.wordmark { color: #fff; font-weight: 900; letter-spacing: 2px; font-size: 1.05rem; }
.wordmark span { color: var(--accent); }
.top nav a { color: #cdc5da; text-decoration: none; font-weight: 600; margin-left: 20px; font-size: 0.95rem; }
.top nav a:hover { color: #fff; }

.hero { text-align: center; padding: 56px 20px 46px; background: var(--ink); color: #fff; }
.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 900; margin-bottom: 12px; }
.hero p { color: #cdc5da; max-width: 640px; margin: 0 auto 26px; }

/* Studio layout */
.studio {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: minmax(340px, 1.2fr) 1fr;
  gap: 34px;
  align-items: start;
}
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }

/* Stage */
.stage-col { position: sticky; top: 86px; }
@media (max-width: 900px) { .stage-col { position: static; } }

.view-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1; padding: 10px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink-soft);
}
.tab.active { border-color: var(--accent); color: var(--ink); background: #fdf1e8; }

.stage {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(27,30,36,0.07);
}
#garment { display: block; width: 100%; height: auto; }
.garment-fill { fill: #ffffff; stroke: #aab3bf; stroke-width: 3; stroke-linejoin: round; }
.garment-line { stroke: #aab3bf; stroke-width: 3; }

.print-zone {
  position: absolute;
  left: 30%; top: 30.5%;
  width: 40%; height: 46.4%;
  outline: 2px dashed rgba(27,30,36,0.28);
  outline-offset: 2px;
}
.print-zone .canvas-container { position: absolute !important; left: 0; top: 0; width: 100% !important; height: 100% !important; }
.print-zone canvas { width: 100% !important; height: 100% !important; }

.stage-hint { text-align: center; color: var(--ink-soft); font-size: 0.85rem; margin-top: 12px; }

/* Panels */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 20px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(27,30,36,0.05);
}
.panel h3 { font-size: 0.98rem; margin-bottom: 14px; letter-spacing: 0.4px; }

.field-row { display: flex; gap: 10px; margin-bottom: 12px; }
.field-row:last-child { margin-bottom: 0; }
.field-row input[type="text"], .field-row select {
  flex: 1; padding: 11px 12px; border: 1px solid #ccd3dc; border-radius: 8px; font: inherit;
}
.field-row input[type="color"] { width: 48px; height: 44px; border: 1px solid #ccd3dc; border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; }
.file-btn { text-align: center; flex: 1; }

.obj-actions { gap: 8px; }
.mini {
  flex: 1; padding: 9px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  border: 1px solid #ccd3dc; background: #fff; border-radius: 8px; color: var(--ink-soft);
}
.mini:hover { border-color: var(--ink); color: var(--ink); }

/* Swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c);
  border: 2px solid #cfd6de;
  cursor: pointer;
}
.swatch.active { border: 3px solid var(--accent); box-shadow: 0 0 0 2px #fff inset; }

/* Sizes */
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sizes label { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); display: flex; flex-direction: column; gap: 4px; }
.sizes input { width: 100%; padding: 8px; border: 1px solid #ccd3dc; border-radius: 8px; font: inherit; text-align: center; }

.estimate { margin-top: 16px; background: #fdf1e8; border: 1px solid #f0cfb4; border-radius: 10px; padding: 14px 16px; font-size: 0.95rem; }
.est-total { font-size: 1.1rem; margin-top: 4px; }
.est-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }

/* Quote */
.quote { max-width: 760px; margin: 0 auto; padding: 20px 20px 70px; text-align: center; }
.quote h2 { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.quote p { color: var(--ink-soft); margin-bottom: 24px; }
.quote-form { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: 0 2px 12px rgba(27,30,36,0.06); }
.qf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .qf-grid { grid-template-columns: 1fr; } }
.quote-form input, .quote-form textarea { width: 100%; padding: 12px; border: 1px solid #ccd3dc; border-radius: 8px; font: inherit; }
.quote-form textarea { margin-bottom: 14px; }
.qf-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.qf-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 12px; }

.bottom { text-align: center; padding: 26px; background: var(--ink); color: #cdc5da; font-size: 0.85rem; }

/* photo mode + product card */
.stage .shade { mix-blend-mode: multiply; }
.photo-layer { position: absolute; inset: 0; }
.photo-layer img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.photo-layer .tint { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.stage.photo #garment { visibility: hidden; }
.product-card { display: flex; gap: 14px; align-items: flex-start; background: #faf7fb; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0 14px; }
.pc-img { width: 96px; height: 108px; flex-shrink: 0; border-radius: 10px; background: #fff; border: 1px solid var(--line); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.pc-img svg { width: 86px; height: 96px; } .pc-img img { width: 100%; height: 100%; object-fit: contain; } .pc-img .tint { position: absolute; inset: 0; mix-blend-mode: multiply; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.pc-body { font-size: .86rem; color: var(--ink-soft); min-width: 0; } .pc-body b { color: var(--ink); font-size: .98rem; } .pc-price { color: var(--accent); font-weight: 700; margin-left: 6px; }
.pc-desc { margin: 4px 0 6px; } .pc-specs { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8rem; } .pc-specs li::before { content: "•"; margin-right: 5px; color: var(--accent); }
.pc-link { font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; }
