:root {
  --bg: #f4f7f8;
  --panel: rgba(255,255,255,.88);
  --card: #ffffff;
  --text: #132028;
  --muted: #6b7280;
  --line: #e6ecef;
  --brand: #27b257;
  --brand-dark: #209146;
  --shadow: 0 20px 60px rgba(15,23,42,.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; color: var(--text); background: radial-gradient(circle at top left, #fff 0%, #f7f9fa 35%, #edf2f4 100%); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }
.page-shell { min-height: 100vh; }
.container { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 22px 0; }
.brand { font-size: 28px; font-weight: 900; letter-spacing: -.04em; }
.brand span { color: var(--brand); }
.topbar-actions { display:flex; gap:10px; flex-wrap:wrap; }
.ghost-btn, .primary-btn, .soft-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}
.primary-btn {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 16px 32px rgba(39,178,87,.22);
}
.soft-btn { background: #f7faf8; }
.ghost-btn:hover, .soft-btn:hover, .primary-btn:hover { transform: translateY(-1px); }
.hero {
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  padding: 8px 0 30px;
}
.hero-card, .side-card, .product-card, .summary-card, .designer-panel, .designer-stage, .detail-card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--shadow);
}
.hero-card {
  border-radius: var(--radius-xl);
  padding: 32px;
}
.hero-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .22em; font-weight: 900; color: #7d8992; }
.hero h1 { font-size: clamp(34px, 4vw, 58px); line-height: .95; margin: 14px 0 12px; letter-spacing: -.06em; }
.hero p { font-size: 16px; line-height: 1.7; color: var(--muted); max-width: 58ch; }
.hero-badges { display:flex; flex-wrap:wrap; gap:10px; margin-top: 18px; }
.pill { border: 1px solid var(--line); background: #fff; padding: 10px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #59636d; }
.side-card {
  border-radius: var(--radius-xl);
  padding: 18px;
  display:flex; flex-direction:column; justify-content:space-between;
}
.side-preview {
  background: linear-gradient(180deg, #fbfcfd, #f2f6f8);
  border-radius: 24px;
  min-height: 360px;
  border: 1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  padding: 16px;
}
.grid-head { display:flex; align-items:end; justify-content:space-between; gap:16px; padding: 8px 0 16px; }
.grid-title { font-size: 32px; font-weight: 900; letter-spacing: -.04em; margin: 0; }
.grid-subtitle { color: var(--muted); margin-top: 6px; }
.products-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; padding-bottom: 48px; }
.product-card {
  border-radius: 24px;
  padding: 18px;
}
.product-visual {
  min-height: 290px; background: linear-gradient(180deg, #fbfcfd, #f3f6f8); border: 1px solid var(--line); border-radius: 22px; display:flex; align-items:center; justify-content:center; padding: 16px; margin-bottom: 16px;
}
.product-meta { display:flex; align-items:start; justify-content:space-between; gap:16px; margin-bottom: 12px; }
.product-name { font-size: 23px; font-weight: 900; letter-spacing: -.04em; margin: 0; }
.product-desc { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 8px 0 0; }
.price { font-size: 24px; font-weight: 900; white-space: nowrap; }
.swatches { display:flex; flex-wrap:wrap; gap:10px; }
.swatch {
  width: 28px; height: 28px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: .18s ease;
}
.swatch.active { box-shadow: 0 0 0 2px var(--brand); transform: scale(1.06); }
.product-foot { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top: 16px; }
.small-note { font-size: 12px; color: #7b8791; font-weight: 700; }
.layout-2 {
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
  padding-bottom: 34px;
}
.detail-card, .summary-card {
  border-radius: 28px;
  padding: 22px;
}
.detail-preview {
  min-height: 620px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfd, #f2f6f8);
  border-radius: 24px;
  display:flex; align-items:center; justify-content:center;
  padding: 18px;
}
.preview-switch { display:flex; gap:8px; margin-bottom: 14px; }
.preview-switch button.active { background: var(--brand); color:#fff; border-color: var(--brand); }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .18em; color: #7d8992; font-weight: 900; margin-bottom: 12px; }
.option-group { margin-bottom: 20px; }
.option-grid { display:flex; gap:10px; flex-wrap:wrap; }
.chip, .size-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 16px;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}
.chip.active, .size-chip.active { border-color: #bde1c8; background: #f3fbf6; color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(39,178,87,.1); }
.qty-box { display:flex; align-items:center; gap:10px; }
.qty-box button { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background:#fff; font-size:20px; font-weight:800; cursor:pointer; }
.qty-number { min-width: 48px; text-align:center; font-size: 18px; font-weight: 900; }
.summary-list { display:grid; gap: 10px; margin: 18px 0 22px; }
.summary-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding: 12px 14px; border-radius: 16px; background:#fff; border:1px solid var(--line); }
.summary-row span:last-child { font-weight: 900; }
.summary-actions { display:grid; gap: 12px; }
.muted { color: var(--muted); }
.designer-layout {
  display:grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 28px;
}
.designer-panel { border-radius: 28px; overflow: hidden; }
.panel-inner { padding: 18px; }
.product-summary-box { padding: 18px; border-bottom: 1px solid #edf1f3; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.84)); }
.designer-stage {
  min-height: calc(100vh - 116px);
  border-radius: 30px;
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.designer-workspace { height: 100%; display:flex; flex-direction:column; }
.designer-toolbar, .designer-actions-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap: wrap; }
.designer-toolbar { padding-bottom: 14px; }
.mockup-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fbfc, #eef3f5);
  overflow: hidden;
  padding: 30px 76px 72px;
}
.side-toggle { position:absolute; right: 18px; top:50%; transform: translateY(-50%); display:grid; gap:10px; z-index: 3; }
.side-toggle button { min-width: 70px; min-height: 50px; border-radius: 16px; border:1px solid var(--line); background:rgba(255,255,255,.92); font-weight: 900; text-transform: uppercase; letter-spacing:.08em; cursor:pointer; }
.side-toggle button.active { background: linear-gradient(180deg, var(--brand), var(--brand-dark)); color:#fff; border-color:transparent; }
.bottom-zoom {
  position:absolute; bottom:18px; right:18px; z-index:3; border:1px solid var(--line); background: rgba(255,255,255,.95); border-radius: 18px; padding: 12px 14px; display:flex; align-items:center; gap:12px; box-shadow: var(--shadow);
}
.bottom-zoom input { width: 170px; }
.tabs { display:flex; gap:8px; flex-wrap:wrap; padding: 12px 18px 0; }
.tab-btn {
  border-radius: 999px; border:1px solid var(--line); background:#fff; padding: 10px 14px; font-weight: 800; font-size: 13px; cursor:pointer;
}
.tab-btn.active { background:#f2fbf5; border-color:#bde1c8; color: var(--brand-dark); }
.panel-card {
  border:1px solid var(--line);
  background:#fff;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
}
.panel-card h4 { margin:0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: #7d8992; }
.field-label { display:block; font-size: 12px; font-weight: 800; color:#4a5560; margin: 0 0 8px; }
.field, .field-textarea, .field-color {
  width:100%; border:1px solid var(--line); border-radius: 12px; background:#fff; min-height: 44px; padding: 0 12px; outline:none;
}
.field-textarea { min-height: 94px; padding: 12px; resize: vertical; }
.range-read { font-size: 12px; color:#6b7280; font-weight: 800; }
.image-upload-btn {
  width:100%; min-height: 58px; border-radius: 18px; border: 1.5px dashed #bde1c8; background: linear-gradient(180deg, #f8fffa, #eefaf1); color: var(--brand-dark); font-weight: 900; cursor:pointer;
}
.asset-list, .layer-list { display:grid; gap:10px; }
.asset-item, .layer-item {
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; padding: 10px; border:1px solid var(--line); background:#fff; border-radius: 14px;
}
.asset-item.active, .layer-item.active { border-color:#bde1c8; box-shadow: 0 0 0 3px rgba(39,178,87,.1); }
.asset-thumb { width:58px; height:58px; border-radius: 12px; border:1px solid var(--line); background:#f7faf9; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.canvas-wrap { position: relative; display:inline-flex; }
canvas { max-width: 520px; max-height: 760px; border-radius: 22px; background: transparent; cursor: crosshair; display:block; }
.print-guide {
  position:absolute; border: 2px dashed rgba(39,178,87,.4); border-radius: 18px; pointer-events:none; z-index: 2;
}
.print-guide::before {
  content: 'PRINT AREA'; position:absolute; top:-12px; left:50%; transform:translateX(-50%); font-size:10px; font-weight:900; letter-spacing:.08em; color: var(--brand-dark); background:rgba(255,255,255,.95); border:1px solid #d9ece0; padding: 3px 8px; border-radius:999px;
}
.empty-state { color: var(--muted); font-size: 14px; line-height: 1.7; }
.inline-note { font-size: 12px; color: #6b7280; line-height: 1.6; }
.hidden { display:none !important; }
.footer-space { height: 10px; }
@media (max-width: 1080px) {
  .hero, .layout-2, .designer-layout, .products-grid { grid-template-columns: 1fr; }
  .designer-stage { min-height: 720px; }
  .mockup-shell { padding-right: 18px; }
  .side-toggle { position: static; transform:none; display:flex; margin-bottom: 12px; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1240px); }
  .hero-card, .side-card, .detail-card, .summary-card, .designer-panel, .designer-stage { padding: 16px; border-radius: 22px; }
  .mockup-shell { padding: 18px 14px 72px; }
  .topbar { padding: 16px 0; }
  .brand { font-size: 24px; }
  .grid-title { font-size: 25px; }
}
