/* ODYS MOBILE HOMES - Architectural Luxury Stylesheet */
/* Light & Dark Theme Support, Responsive Chips & World-Class Layout */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #d97706;
  --primary-glow: rgba(217, 119, 6, 0.2);
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
}

html.dark {
  --primary: #f59e0b;
  --primary-glow: rgba(245, 158, 11, 0.25);
  --bg-main: #090a0d;
  --bg-card: #12151b;
  --bg-surface: #181d26;
  --border-color: #1e242d;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-subtle: #6b7280;
  --shadow-card: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #262b36;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Hide scrollbar for clean horizontal chip bars */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 3D Visualizer Canvas & Overlays */
#three-canvas-container {
  position: relative;
  width: 100%;
  height: 620px;
  background: radial-gradient(circle at 50% 40%, #161b24 0%, #090a0d 100%);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
html:not(.dark) #three-canvas-container {
  background: radial-gradient(circle at 50% 40%, #e2e8f0 0%, #cbd5e1 100%);
}

#three-canvas-container:active {
  cursor: grabbing;
}

#hotspots-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hotspot-pin {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  border: none;
  background: transparent;
  outline: none;
}

.pin-core {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f59e0b;
  color: #090a0d;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.8), 0 2px 5px rgba(0,0,0,0.5);
  border: 2px solid #ffffff;
  transition: transform 0.25s ease, background 0.25s ease;
}

.pin-pulse {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(245, 158, 11, 0.7);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.hotspot-pin:hover .pin-core {
  transform: scale(1.2);
  background: #ffffff;
  color: #d97706;
}

.pin-tooltip {
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(18, 21, 27, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.hotspot-pin:hover .pin-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hotspot Details Modal */
#hotspot-modal {
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
  max-width: 340px;
  background: rgba(18, 21, 27, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  z-index: 25;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html:not(.dark) #hotspot-modal {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(217, 119, 6, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
html:not(.dark) #hotspot-modal h3 {
  color: #0f172a;
}
html:not(.dark) #hotspot-modal p {
  color: #475569;
}

#hotspot-modal.active {
  display: block;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Lightbox Modal */
#gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 7, 10, 0.96);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
}

#gallery-lightbox.active {
  display: flex;
}

/* Custom Chip & Pill Utilities - Anti-Wrapping */
.chip-pill {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.color-pill {
  flex-shrink: 0;
  transition: transform 0.2s ease, outline 0.2s ease;
}

.color-pill.active {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  transform: scale(1.1);
}

.btn-pill.active {
  background-color: #f59e0b;
  color: #090a0d;
  font-weight: 700;
  border-color: #f59e0b;
}

.gallery-filter-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-filter-btn.active {
  background-color: #f59e0b;
  color: #090a0d;
  border-color: #f59e0b;
}

.calc-finish-card.active {
  border-color: #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(18, 21, 27, 0.8));
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.15);
}

html:not(.dark) .calc-finish-card.active {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), rgba(255, 255, 255, 0.95));
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.12);
}

.btn-calc-model.active {
  border-color: #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), rgba(18, 21, 27, 0.9));
}
html:not(.dark) .btn-calc-model.active {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08), #ffffff);
}

/* Smooth reveal animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Glow Background */
.hero-glow-dark {
  background: radial-gradient(circle at 50% -20%, rgba(245, 158, 11, 0.15), rgba(9, 10, 13, 0) 70%);
}
.hero-glow-light {
  background: radial-gradient(circle at 50% -20%, rgba(245, 158, 11, 0.18), rgba(248, 250, 252, 0) 70%);
}

/* Main Navigation Guaranteed Solid Background */
#main-nav {
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}
.dark #main-nav {
  background-color: rgba(9, 10, 13, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(38, 38, 38, 0.85);
}

/* Mobile Slide Menu */
#mobile-menu {
  background-color: rgba(255, 255, 255, 0.98) !important;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.dark #mobile-menu {
  background-color: rgba(9, 10, 13, 0.98) !important;
}
#mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
}

/* Theme Switcher Toggle Button */
.theme-toggle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.theme-toggle-btn:hover {
  transform: scale(1.05);
}

/* Range Sliders & Inputs */
input[type="checkbox"] {
  accent-color: #f59e0b;
}
