@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --aristas-sidebar-bg: #171814;
  --aristas-bg-warm: #FBFAF6;
  --aristas-paper: #F4F1EB;
  --aristas-surface: #FFFFFF;
  --aristas-border: #E8E4DA;
  --aristas-ink: #171815;
  --aristas-ink-muted: #5F6159;
  --aristas-orange: #D86B45;
  --aristas-orange-deep: #B94F2D;
  --aristas-gold: #C5A059;
  --aristas-gold-hover: #D4AF37;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--aristas-bg-warm);
  color: var(--aristas-ink);
  margin: 0;
  padding: 0;
  letter-spacing: -0.011em;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Smooth Scrolling for Section Navigation */
html {
  scroll-behavior: smooth;
}

/* Global Interactive Elements and Button Hit Area Fixes */
button,
a,
select,
input[type="button"],
input[type="submit"],
.sidebar-link,
.preset-btn,
.modal-cat-btn,
.floorplan-btn,
[role="button"] {
  cursor: pointer !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Ensure inner icons and text spans do not block parent button pointer events */
button > svg,
button > span,
button > path,
button > div,
a.sidebar-link > svg,
a.sidebar-link > span,
a.sidebar-link > div,
.floorplan-btn > svg,
.floorplan-btn > span {
  pointer-events: none !important;
}

/* Sidebar Styling */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #A1A1AA;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer !important;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, #C5A059 0%, #A88243 100%);
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(197, 160, 89, 0.38);
}

/* Floorplan Toolbar Single-Line Controls */
.floorplan-toolbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 12px !important;
}

.floorplan-toolbar-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.floorplan-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

/* Floorplan Stage Full Screen Width Container */
#floorStage {
  background-image: url('../img/store_blueprint.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border: 1.5 solid #374151;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  position: relative;
  width: 100%;
}

/* Blurred Heatmap Overlay */
.heatmap-blur-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 12px;
  z-index: 5;
}

.heatmap-blur-container.editing-active {
  pointer-events: auto !important;
  z-index: 40 !important;
}

.heat-zone-draggable {
  pointer-events: auto !important;
  touch-action: none !important;
}

/* Zone H1 - Red (Caliente - Top Center) */
.heat-zone-h1 {
  position: absolute;
  top: 6%;
  left: 28%;
  width: 38%;
  height: 42%;
  background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.48) 0%, rgba(239, 68, 68, 0.28) 55%, rgba(239, 68, 68, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Zone H2 - Red (Caliente - Bottom Center) */
.heat-zone-h2 {
  position: absolute;
  bottom: 8%;
  left: 45%;
  width: 32%;
  height: 40%;
  background: radial-gradient(ellipse at center, rgba(239, 68, 68, 0.48) 0%, rgba(239, 68, 68, 0.26) 55%, rgba(239, 68, 68, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Zone T1 - Yellow (Tibia - Top Right) */
.heat-zone-t1 {
  position: absolute;
  top: 6%;
  right: 6%;
  width: 26%;
  height: 42%;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.45) 0%, rgba(245, 158, 11, 0.22) 55%, rgba(245, 158, 11, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Zone T2 - Yellow (Tibia - Middle Left) */
.heat-zone-t2 {
  position: absolute;
  bottom: 12%;
  left: 6%;
  width: 34%;
  height: 42%;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.42) 0%, rgba(245, 158, 11, 0.2) 55%, rgba(245, 158, 11, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Zone F1 - Blue (Fría - Top Left) */
.heat-zone-f1 {
  position: absolute;
  top: 6%;
  left: 4%;
  width: 22%;
  height: 42%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.42) 0%, rgba(59, 130, 246, 0.2) 55%, rgba(59, 130, 246, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Zone F2 - Blue (Fría - Bottom Right) */
.heat-zone-f2 {
  position: absolute;
  bottom: 12%;
  right: 4%;
  width: 20%;
  height: 46%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.42) 0%, rgba(59, 130, 246, 0.2) 55%, rgba(59, 130, 246, 0) 80%);
  filter: blur(12px);
  border-radius: 40px;
}

/* Tinted Zone Bounding Overlays matching Reference Image */
.zone-box {
  position: absolute;
  pointer-events: none;
  border-radius: 8px;
  box-sizing: border-box;
  padding: 8px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.zone-box-h01 {
  top: 6%;
  left: 24%;
  width: 30%;
  height: 42%;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
}

.zone-box-t01 {
  top: 6%;
  left: 55%;
  width: 22%;
  height: 42%;
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
}

.zone-box-f02 {
  top: 6%;
  left: 78%;
  width: 17.5%;
  height: 42%;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
}

.zone-box-f01 {
  top: 54%;
  left: 24%;
  width: 22%;
  height: 40%;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.35);
}

.zone-box-h02 {
  top: 54%;
  left: 55%;
  width: 22%;
  height: 40%;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
}

/* Photorealistic Furniture Item Container */
.furniture-item-node {
  position: absolute !important;
  transform: translate(-50%, -50%) !important;
  cursor: grab;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 35 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: max-content !important;
  height: auto !important;
  min-width: 10px !important;
  min-height: 10px !important;
}

.furniture-item-node.selected-node {
  transform: translate(-50%, -50%) scale(1.05) !important;
  z-index: 50 !important;
}

.furniture-item-node.dragging-node {
  transform: translate(-50%, -50%) scale(1.1) !important;
  z-index: 50 !important;
}

.furniture-item-node:active {
  cursor: grabbing;
}

.furniture-item-node:hover {
  transform: translate(-50%, -50%) scale(1.04) !important;
  z-index: 45 !important;
}

.furniture-img {
  filter: none !important;
  object-fit: contain;
  display: block !important;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  width: auto;
  height: auto !important;
  min-width: 10px !important;
  min-height: 10px !important;
  max-height: 140px !important;
}

/* Status Dot Indicator - Hidden for clean architectural floor plan view */
.status-dot-indicator {
  display: none !important;
}

/* Floating Zone Badges */
.zone-pill-badge {
  position: absolute;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  z-index: 15;
  border: 1px solid #E2E2DC;
}

.badge-red {
  color: #991b1b;
  background-color: rgba(254, 242, 242, 0.95);
  border-color: rgba(248, 113, 113, 0.5);
}

.badge-yellow {
  color: #92400e;
  background-color: rgba(254, 252, 232, 0.95);
  border-color: rgba(251, 191, 36, 0.5);
}

.badge-blue {
  color: #075985;
  background-color: rgba(240, 249, 255, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F3F4F6;
}
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ==========================================================================
   METRIC 1M² ARCHITECTURAL GRID OVERLAY (CALIBRATED & BOUNDED)
   ========================================================================== */

.canvas-grid-layer {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
  box-sizing: border-box;
  border: 1.5px solid rgba(160, 110, 45, 0.65);
  box-shadow: inset 0 0 0 1px rgba(197, 160, 89, 0.25);
  background-image: 
    /* 5m Accent Major Grid Lines */
    linear-gradient(to right, rgba(140, 95, 30, 0.55) 1.5px, transparent 1.5px),
    linear-gradient(to bottom, rgba(140, 95, 30, 0.55) 1.5px, transparent 1.5px),
    /* 1m Standard Grid Lines (1m x 1m = 1.0 m²) */
    linear-gradient(to right, rgba(160, 115, 45, 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(160, 115, 45, 0.32) 1px, transparent 1px);
  background-position: 0 0;
}

.grid-scale-legend {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(197, 160, 89, 0.7);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #3D3220;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 10;
  user-select: none;
}

.grid-cell-sample {
  width: 12px;
  height: 12px;
  border: 1.5px solid #C5A059;
  background: rgba(197, 160, 89, 0.45);
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

