/**
 * ThreadByteCreative — Interactive Gallery Wall Layout Builder Stylesheet
 */

:root {
  --bg-primary: #FAF6F0;
  --bg-card: #FFFFFF;
  --ink: #1F1914;
  --muted: #6E6259;
  --line: #E8DFD5;
  --line-light: #F3EDE6;
  --accent: #C8956A;
  --accent-soft: #F9F3EC;
  --font-heading: 'Outfit', 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(43, 33, 24, 0.05);
  --shadow-md: 0 4px 14px rgba(43, 33, 24, 0.08);
}

body {
  background-color: var(--bg-primary);
  color: var(--ink);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Hero */
.gallery-hero {
  padding: 40px 0 28px;
  text-align: center;
}

.gallery-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.gallery-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.gallery-crumbs a:hover {
  color: var(--accent);
}

.gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid #EEDCC8;
}

.gallery-hero h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.gallery-hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Workspace Layout */
.gallery-workspace {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 60px;
}

@media (max-width: 960px) {
  .gallery-workspace {
    grid-template-columns: 1fr;
  }
}

.gallery-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.control-section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-light);
}

.control-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.control-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.control-title-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Chips & Buttons */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.btn-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  background: #FAF6F0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: #C8956A;
  background: #FFF;
}

.chip-btn.active {
  background: var(--ink);
  color: #FFF;
  border-color: var(--ink);
}

/* Template Grid Buttons */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.template-btn {
  background: #FAF7F2;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.template-btn:hover {
  border-color: var(--accent);
  background: #FFF;
}

.template-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* Frame Actions Row */
.frame-action-bar {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-secondary {
  flex: 1;
  background: #FAF7F2;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #FFF;
  border-color: var(--accent);
}

/* Swatches */
.swatch-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.swatch-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--accent);
}

/* Right Column: Virtual Wall Room Visualizer */
.gallery-visualizer-workspace {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-canvas-card {
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.gallery-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-canvas-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

/* The Room Wall Stage */
.wall-stage {
  height: 480px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
  transition: background-color 0.3s ease;
  user-select: none;
}

/* Eye level guide line */
.eye-level-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 48%;
  border-top: 1px dashed rgba(200, 149, 106, 0.6);
  pointer-events: none;
  z-index: 5;
}

.eye-level-tag {
  position: absolute;
  right: 12px;
  top: -10px;
  background: rgba(200, 149, 106, 0.9);
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Furniture Silhouette */
.furniture-stage-item {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #475569;
  border-radius: 12px 12px 0 0;
  opacity: 0.85;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E2E8F0;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
}

/* Floor & Baseboard */
.wall-baseboard {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: #E2DCD5;
  border-top: 2px solid #C8C0B7;
  z-index: 1;
}

.wall-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background: #C49A6C;
  z-index: 0;
}

/* Wall Frames on Stage */
.wall-frame-item {
  position: absolute;
  border: 4px solid #1E1E1E;
  background: #FDFBF7;
  box-shadow: 0 8px 16px rgba(43, 33, 24, 0.2);
  cursor: grab;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease;
}

.wall-frame-item:active {
  cursor: grabbing;
  box-shadow: 0 14px 28px rgba(43, 33, 24, 0.35);
  z-index: 20;
}

.wall-frame-inner {
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  padding: 5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-passepartout {
  width: 100%;
  height: 100%;
  background: #F4EFE6;
  border: 1px dashed #D6CBBC;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.frame-dim-tag {
  background: rgba(31, 25, 20, 0.78);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  pointer-events: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Hanging Blueprint Card */
.blueprint-card {
  background: linear-gradient(180deg, #FFFCF7 0%, #F8F2E8 100%);
  border: 1.5px solid #DFCFC0;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.blueprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.blueprint-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.blueprint-item span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
