/* ── Canvas Print Designer ── */
.cpd-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 0.5px solid rgba(0,0,0,0.1);
  background: #fff;
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 13px;
  color: #18181b;
  min-height: 640px;
}

/* ── LEFT ── */
.cpd-left {
  background: #f5f2ed;
  display: flex;
  flex-direction: column;
}
.cpd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
  background: #fff;
}
.cpd-logo {
  font-size: 16px;
  font-weight: 600;
  color: #18181b;
  letter-spacing: .01em;
}
.cpd-vtabs {
  display: flex;
  gap: 3px;
  background: rgba(0,0,0,0.06);
  border-radius: 7px;
  padding: 2px;
}
.cpd-vt {
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
  border: none;
  background: none;
  font-family: inherit;
  transition: all .18s;
  white-space: nowrap;
}
.cpd-vt.cpd-on { background: #fff; color: #18181b; }

.cpd-parea {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  min-height: 340px;
}

/* Views */
.cpd-view { display: none; width: 100%; }
.cpd-view.cpd-show { display: flex; align-items: center; justify-content: center; }
.cpd-view-3d.cpd-show { display: block; }
.cpd-view-text.cpd-show { flex-direction: column; gap: 10px; }
.cpd-view-multi.cpd-show { flex-direction: column; align-items: center; gap: 10px; }

/* 3D */
#cpd-v3d {
  width: 100%;
  height: 310px;
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  position: relative;
}
#cpd-v3d:active { cursor: grabbing; }
#cpd-three-canvas { width: 100%; height: 100%; display: block; }
.cpd-drag-hint {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: rgba(80,50,50,0.55);
  background: rgba(255,255,255,0.82); padding: 3px 12px;
  border-radius: 20px; pointer-events: none; white-space: nowrap;
}
.cpd-size-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255,255,255,0.92); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; font-weight: 500;
  color: #18181b; border: 0.5px solid rgba(0,0,0,0.1);
  pointer-events: none;
}

/* Flat */
.cpd-view-flat { flex-direction: column; gap: 8px; }
.cpd-flat-badge {
  text-align: center; font-size: 11px; font-weight: 500;
  color: #71717a; margin-bottom: 6px;
}
.cpd-ff {
  position: relative;
  box-shadow: 10px 10px 30px rgba(0,0,0,0.18), 2px 2px 6px rgba(0,0,0,0.08);
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.cpd-ff img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 2px; }
.cpd-fs {
  position: absolute; right: -12px; top: 2px; bottom: 2px;
  width: 12px; background: rgba(0,0,0,0.12); border-radius: 0 2px 2px 0;
}
.cpd-fb {
  position: absolute; left: 2px; right: 2px; bottom: -9px;
  height: 9px; background: rgba(0,0,0,0.07); border-radius: 0 0 2px 2px;
}

/* Room */
.cpd-rscene { width: 100%; height: 300px; border-radius: 10px; overflow: hidden; position: relative; }
.cpd-rwall  { width: 100%; height: 72%; background: #ddd7ce; position: relative; }
.cpd-rfloor { position: absolute; bottom: 0; left: 0; right: 0; height: 28%; background: #b0a090; }
.cpd-rbaseboard { position: absolute; bottom: 28%; left: 0; right: 0; height: 3px; background: #c8bba8; }
.cpd-rcw { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-60%); transition: all .4s; }
.cpd-rci { display: block; box-shadow: 0 6px 24px rgba(0,0,0,0.28); }
.cpd-rside { position: absolute; right: -9px; top: 1px; bottom: 1px; width: 9px; background: rgba(0,0,0,0.18); }
.cpd-rbot  { position: absolute; left: 1px; right: 1px; bottom: -7px; height: 7px; background: rgba(0,0,0,0.10); }
.cpd-rlabel {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: rgba(80,60,40,0.5); white-space: nowrap;
}

/* Text overlay */
.cpd-twrap { position: relative; display: inline-block; }
.cpd-twrap img { display: block; border-radius: 4px; width: 260px; height: 195px; object-fit: cover; }
.cpd-tov {
  position: absolute; cursor: move; user-select: none; white-space: nowrap;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  bottom: 14px; left: 50%; transform: translateX(-50%);
  font-family: Georgia, serif; font-size: 20px; color: #fff;
}
.cpd-tctrl { display: flex; flex-direction: column; gap: 7px; width: 260px; }
.cpd-tcrow { display: flex; align-items: center; gap: 6px; }
.cpd-tclb  { font-size: 10px; color: #71717a; min-width: 44px; text-transform: uppercase; letter-spacing: .08em; }
.cpd-tcinp {
  flex: 1; border: 0.5px solid rgba(0,0,0,0.1); border-radius: 6px;
  padding: 5px 8px; font-size: 12px; background: #fff; color: #18181b; outline: none;
}
.cpd-tcinp:focus { border-color: #e17279; }
.cpd-color-row { display: flex; gap: 5px; }
.cpd-csw {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s;
}
.cpd-csw.cpd-on { border-color: #e17279; }

/* Multi */
.cpd-pbtns { display: flex; gap: 5px; }
.cpd-pb {
  border: 0.5px solid rgba(0,0,0,0.1); border-radius: 6px;
  padding: 5px 10px; font-size: 11px; font-weight: 500;
  cursor: pointer; background: #fff; color: #71717a;
  font-family: inherit; transition: all .2s;
}
.cpd-pb.cpd-on { background: #fdf0f1; border-color: #e17279; color: #c45560; }
#cpd-mpanels { display: flex; gap: 3px; justify-content: center; width: 100%; height: 220px; }

/* Bottom bar */
.cpd-bbar {
  padding: 10px 14px; border-top: 0.5px solid rgba(0,0,0,0.1);
  background: #fff; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cpd-sth {
  width: 36px; height: 36px; border-radius: 6px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent; transition: border-color .15s; flex-shrink: 0;
}
.cpd-sth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cpd-sth.cpd-on { border-color: #e17279; }
.cpd-upl {
  display: flex; align-items: center; gap: 5px; background: #f5f2ed;
  border: 0.5px solid rgba(0,0,0,0.1); border-radius: 20px;
  padding: 5px 12px; font-size: 11px; color: #71717a;
  cursor: pointer; margin-left: auto; white-space: nowrap; transition: border-color .2s;
}
.cpd-upl:hover { border-color: #e17279; }

/* ── RIGHT ── */
.cpd-right {
  border-left: 0.5px solid rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  overflow-y: auto; max-height: 640px;
}
.cpd-ri { padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; }
.cpd-pname { font-size: 22px; font-weight: 600; color: #18181b; }
.cpd-psub  { font-size: 11px; color: #71717a; margin-top: 3px; }

.cpd-price-block {
  background: #fdf0f1; border-radius: 10px; padding: 12px 14px;
  border: 0.5px solid rgba(225,114,121,0.2);
}
.cpd-price-row   { display: flex; align-items: baseline; gap: 6px; }
.cpd-price-num   { font-size: 30px; font-weight: 600; color: #c45560; }
.cpd-price-cur   { font-size: 15px; font-weight: 600; color: #c45560; }
.cpd-price-hint  { font-size: 11px; color: #71717a; margin-top: 3px; }

.cpd-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.cpd-badge  {
  font-size: 10px; background: #fdf0f1; color: #c45560;
  padding: 2px 8px; border-radius: 20px; border: 0.5px solid rgba(225,114,121,0.25);
}
.cpd-dv { height: 0.5px; background: rgba(0,0,0,0.1); flex-shrink: 0; }
.cpd-sl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #71717a; font-weight: 500; margin-bottom: 8px; }

/* Orientation */
.cpd-orient-row { display: flex; gap: 6px; }
.cpd-ori-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
  border: 0.5px solid rgba(0,0,0,0.1); border-radius: 8px; padding: 10px 6px;
  cursor: pointer; background: #fff; transition: all .18s;
}
.cpd-ori-btn:hover { border-color: #e17279; }
.cpd-ori-btn.cpd-on { border-color: #e17279; background: #fdf0f1; }
.cpd-ori-label { font-size: 11px; font-weight: 500; color: #18181b; }

/* Size list */
.cpd-sz-list { display: flex; flex-direction: column; gap: 6px; }
.cpd-sz {
  border: 0.5px solid rgba(0,0,0,0.1); border-radius: 8px;
  cursor: pointer; background: #fff; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; transition: all .18s;
}
.cpd-sz:hover { border-color: #e17279; }
.cpd-sz.cpd-on { border-color: #e17279; background: #fdf0f1; }
.cpd-sz-dim   { font-size: 13px; font-weight: 500; color: #18181b; }
.cpd-sz-price { font-size: 13px; font-weight: 500; color: #c45560; }

/* Quantity */
.cpd-qtw  { display: flex; align-items: center; gap: 10px; }
.cpd-qtc  { display: flex; align-items: center; border: 0.5px solid rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; }
.cpd-qb   {
  background: none; border: none; width: 32px; height: 32px;
  cursor: pointer; font-size: 16px; color: #18181b;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.cpd-qb:hover { background: #f5f2ed; }
.cpd-qv   {
  width: 36px; text-align: center; font-size: 13px; font-weight: 500;
  border: none; border-left: 0.5px solid rgba(0,0,0,0.1);
  border-right: 0.5px solid rgba(0,0,0,0.1); background: none; outline: none; color: #18181b;
}
.cpd-qn   { font-size: 11px; color: #71717a; flex: 1; line-height: 1.4; }

/* WC Summary */
.cpd-wcs  { background: #fdf0f1; border-radius: 9px; padding: 12px; border: 0.5px solid rgba(225,114,121,0.15); }
.cpd-wct  { font-size: 10px; font-weight: 500; color: #c45560; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.cpd-wcf  { display: flex; flex-direction: column; gap: 5px; }
.cpd-wcr  { display: flex; justify-content: space-between; font-size: 11px; }
.cpd-wck  { color: #71717a; }
.cpd-wcv  { font-weight: 500; color: #18181b; }
.cpd-wctot {
  display: flex; justify-content: space-between;
  padding-top: 8px; margin-top: 5px;
  border-top: 0.5px solid rgba(225,114,121,0.2);
  font-size: 14px; font-weight: 600; color: #18181b;
}

/* CTA */
.cpd-cta {
  width: 100%; padding: 14px; border-radius: 9px;
  background: #e17279; color: #fff; border: none; cursor: pointer;
  font-size: 14px; font-weight: 500; letter-spacing: .03em;
  transition: all .2s; font-family: inherit;
}
.cpd-cta:hover   { background: #c45560; }
.cpd-cta:active  { transform: scale(.98); }
.cpd-cta.cpd-loading { background: #aaa; cursor: wait; }
.cpd-cta.cpd-done    { background: #2d6a4f; }

#cpd-msg.cpd-success { background: #e8f5e9; color: #2d6a4f; border: 0.5px solid #2d6a4f30; }
#cpd-msg.cpd-error   { background: #fdecea; color: #c62828; border: 0.5px solid #c6282830; }

.cpd-hint { font-size: 10px; color: #71717a; margin: 0; }

/* Responsive */
@media (max-width: 780px) {
  .cpd-wrap { grid-template-columns: 1fr; }
  .cpd-right { border-left: none; border-top: 0.5px solid rgba(0,0,0,0.1); max-height: none; }
  #cpd-v3d { height: 260px; }
}
