:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --muted:#5b6472;
  --ink:#0b0f18;
  --ink-soft:#2a2f38;
  --accent:#15c0d3; /* turquoise */
  --accent-ink:#06343a;
  --line:#e6eaf0;
  --chip:#f7fafc;
}

*{box-sizing:border-box}
html{scroll-behavior:auto}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;color:var(--ink);background:var(--bg)}

.container{max-width:1180px;margin:0 auto;padding:0 20px}

/* Header */
.site-header{background:var(--surface);border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{font-weight:800;font-size:18px;color:var(--accent)}
.nav a{color:var(--ink-soft);text-decoration:none;margin-left:18px;font-weight:600}
.nav a:hover{color:var(--accent)}

/* Hero */
.hero{padding:28px 0 12px}
.hero h1{margin:0 0 6px;font-weight:800;letter-spacing:-.2px}
.hero .sub{margin:0;color:var(--muted)}

/* Grid + Panels */
.grid{display:grid;grid-template-columns:1.4fr 1fr;gap:20px;margin-top:12px}
@media (max-width:980px){.grid{grid-template-columns:1fr}}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px}
.panel h3{margin:0;padding:14px 16px;border-bottom:1px solid var(--line);font-size:14px;letter-spacing:.2px;color:var(--muted)}
.panel .body{padding:16px}
.no-pad{padding:0}

/* Viewer */
.viewer-panel .body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  position: relative;
}

/* Viewer fills everything except reserved dropzone height (140px + gap) */
.viewer {
  flex: 1 1 auto;
  width: 100%;
  /* occupy remaining height: subtract dropzone height + desired gap (e.g. 0) */
  min-height: 520px; /* keeps a floor, but it will stretch taller */
  background: linear-gradient(0deg,#f7fafc 0%, #fff 100%);
}

/* Absolute dropzone stays at bottom, but viewer is flexible so gap disappears */
.dropzone {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 110px;                /* was 140px */
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255,255,255,.78); /* slightly less opaque */
  backdrop-filter: blur(2px);
  border-radius: 10px;          /* a bit tighter radius */
  padding: 12px 10px;           /* reduce vertical padding */
  font-size: 13px;              /* optional: smaller text */
}
.dropzone:hover { background: rgba(247,250,252,.92); }
.dropzone.drag { outline:2px dashed var(--accent); background:rgba(21,192,211,.15); }
.dropzone input[type=file]{position:absolute; inset:0; opacity:0; cursor:pointer;}

/* Controls */
.controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}
label{font-size:12px;color:var(--muted)}
input[type=number],select,input[type=text],textarea{width:100%;background:#fff;border:1px solid var(--line);color:var(--ink);padding:10px 12px;border-radius:12px}
textarea{resize:vertical}
.row{display:flex;gap:10px;align-items:center}
.mb10{margin-bottom:10px}.mt10{margin-top:10px}.mt14{margin-top:14px}.mt8{margin-top:8px}.g8{gap:8px}

/* Chips + Quote */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{font-size:12px;color:var(--muted);background:var(--chip);border:1px solid var(--line);padding:6px 8px;border-radius:999px}
.sep{border:0;border-top:1px solid var(--line);margin:16px 0}
.quote{display:grid;gap:10px}
.quote .line{display:flex;align-items:center;justify-content:space-between;font-size:14px}
.quote .total{font-size:28px;font-weight:900}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:white;padding:10px 14px;border-radius:999px;font-weight:700;border:1px solid var(--accent);cursor:pointer}
.btn:hover{filter:brightness(0.98)}
.ghost{background:#e9fbfe;color:var(--accent-ink);border:1px solid #c8f3f7}
.outline{background:#fff;color:var(--ink);border:1px solid var(--line)}
.primary{background:var(--accent);color:#fff;border-color:var(--accent)}

/* About + Footer */
.about{padding:28px 0 40px}
.about h3{margin:0 0 8px;color:var(--muted)}
.site-footer{border-top:1px solid var(--line);padding:18px 0;color:var(--muted);font-size:14px}

/* Modal */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:60}
.modal.open{display:flex}
.modal-backdrop{position:absolute;inset:0;background:rgba(255,255,255,.55);backdrop-filter:blur(8px)}
.modal-card{position:relative;width:min(560px,92vw);background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 20px 60px rgba(0,0,0,.08);z-index:1}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.modal-close{border:none;background:transparent;font-size:22px;cursor:pointer;color:var(--ink-soft)}
.quote-summary{background:#f7fafc;border:1px solid var(--line);border-radius:12px;padding:10px 12px;color:var(--ink-soft);margin:8px 0 14px}
.form{display:grid;gap:12px}
.form-row{display:grid;gap:6px}
.form-row.checkbox{display:flex;align-items:center;gap:8px}
.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}
.success{font-weight:700;color:#0a7a14;background:#e8f8ec;border:1px solid #c6f0d0;border-radius:12px;padding:12px;text-align:center}
.error{font-weight:600;color:#7a1a0a;background:#fdeceb;border:1px solid #f2c5be;border-radius:12px;padding:12px;text-align:center;margin-top:10px}

/* Prints / Gallery */
.prints{padding:28px 0}
.prints h2{margin:0 0 14px;font-size:22px}
.prints-sub{margin:16px 0 8px;color:var(--muted);font-size:14px}
.prints-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:980px){.prints-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.prints-grid{grid-template-columns:1fr}}
.print-card{margin:0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.print-card img{display:block;width:100%;height:180px;object-fit:cover;background:#f2f4f7}
.print-card figcaption{padding:10px 12px;font-size:13px;color:var(--ink-soft)}


/* QQ3D v3.4: Swatches */
.swatch-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.swatch{width:26px;height:26px;border-radius:999px;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.12);cursor:pointer;position:relative;outline:2px solid transparent;transition:transform .12s ease, outline-color .12s ease}
.swatch:hover{transform:translateY(-1px)}
.swatch[aria-selected="true"]{outline-color:var(--accent)}
.swatch .check{position:absolute;inset:auto 0 0 auto;transform:translate(35%,-35%);width:10px;height:10px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.15)}


/* QQ3D v3.5: Color name display */
.color-name{font-size:13px;color:var(--muted);margin-top:4px;margin-bottom:4px}


/* === QQ3D v3.3 additions: Gallery & Lightbox === */
.gallery-container{max-width:1200px;margin:0 auto;padding:2rem 1rem;}
.gallery-container h1{font-size:2rem;margin:0 0 1rem 0}
.material-section{margin-top:2rem}
.material-section h2{margin:1rem 0}
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.gallery-grid a{display:block;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,0.08);transition:transform .15s ease}
.gallery-grid a:hover{transform:translateY(-2px)}
.gallery-grid img{width:100%;height:200px;object-fit:cover;display:block}

/* Simple Lightbox */
#qq3d-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.85);display:none;align-items:center;justify-content:center;z-index:9999}
#qq3d-lightbox.open{display:flex}
#qq3d-lightbox img{max-width:90vw;max-height:85vh}
#qq3d-lightbox .close{position:absolute;top:18px;right:22px;font-size:28px;color:#fff;cursor:pointer}


/* QQ3D v3.6: Carousel Gallery */
.carousel-container{position:relative;overflow:hidden;margin-top:8px}
.carousel-track{display:flex;gap:12px;overflow-x:auto;scroll-behavior:smooth;padding-bottom:8px;scroll-snap-type:x mandatory}
.carousel-track > a{flex:0 0 auto;scroll-snap-align:center}
.carousel-track::-webkit-scrollbar{height:6px}
.carousel-track::-webkit-scrollbar-thumb{background:var(--accent);border-radius:6px}
.carousel-btn{position:absolute;top:50%;transform:translateY(-50%);background:var(--accent);color:#fff;border:none;font-size:22px;width:34px;height:34px;border-radius:50%;cursor:pointer;opacity:0.9;transition:opacity .2s ease, transform .2s ease;z-index:10;box-shadow:0 4px 10px rgba(0,0,0,.12)}
.carousel-btn:hover{opacity:1;transform:translateY(-50%) scale(1.08)}
.carousel-btn.prev{left:6px}
.carousel-btn.next{right:6px}
@media (max-width:600px){.carousel-btn{font-size:18px;width:28px;height:28px}}
