/**
 * Ravikanta Doors - Neumorphism Core Design System
 * Pure Neumorphic Tactile Aesthetics & Dynamic Micro-Animations
 */

@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;800&display=swap');

:root {
  /* Surface and Background */
  --bg-base: #e6ecf4;
  --bg-surface: #e6ecf4;
  --bg-surface-light: #f3f7fc;
  --bg-surface-dark: #d5dfea;
  
  /* Neumorphic Shadow Tokens */
  --neu-shadow-dark: #b8c4d4;
  --neu-shadow-light: #ffffff;
  
  --neu-flat: 8px 8px 18px var(--neu-shadow-dark), -8px -8px 18px var(--neu-shadow-light);
  --neu-flat-sm: 4px 4px 10px var(--neu-shadow-dark), -4px -4px 10px var(--neu-shadow-light);
  --neu-flat-xs: 2px 2px 6px var(--neu-shadow-dark), -2px -2px 6px var(--neu-shadow-light);
  --neu-flat-lg: 14px 14px 28px var(--neu-shadow-dark), -14px -14px 28px var(--neu-shadow-light);
  
  --neu-pressed: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
  --neu-pressed-sm: inset 2px 2px 5px var(--neu-shadow-dark), inset -2px -2px 5px var(--neu-shadow-light);
  --neu-pressed-deep: inset 6px 6px 14px #aebcd0, inset -6px -6px 14px var(--neu-shadow-light);
  
  --neu-convex: linear-gradient(145deg, #f6fcff, #cfd9e6);
  --neu-concave: linear-gradient(145deg, #cfd9e6, #f6fcff);
  
  /* Brand Luxury Wood & Gold Gradients */
  --primary-gold: #c9933b;
  --primary-gradient: linear-gradient(135deg, #d49e35 0%, #b88126 50%, #875510 100%);
  --gold-glow: 0 4px 20px rgba(184, 129, 38, 0.35);
  
  --wood-teak-gradient: linear-gradient(135deg, #6c3b17 0%, #462208 100%);
  --wood-honne-gradient: linear-gradient(135deg, #915423 0%, #572d0b 100%);
  --wpc-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  
  --whatsapp-green: #25D366;
  --whatsapp-gradient: linear-gradient(135deg, #2ae06e 0%, #1da851 100%);
  --whatsapp-glow: 0 4px 16px rgba(37, 211, 102, 0.4);
  
  --accent-blue: #2563eb;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Border Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Body Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =======================================================
   NEUMORPHIC PRIMITIVES
======================================================= */

/* Flat Extruded Card */
.neu-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--neu-flat);
  transition: all var(--transition-normal);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.neu-card-sm {
  border-radius: var(--radius-md);
  box-shadow: var(--neu-flat-sm);
  padding: 1.25rem;
}

.neu-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--neu-flat-lg);
}

/* Inset / Pressed Container */
.neu-inset {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed);
  border: 1px solid rgba(184, 196, 212, 0.2);
}

.neu-inset-deep {
  background: #dfe6f0;
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed-deep);
}

/* Neumorphic Buttons */
.neu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  box-shadow: var(--neu-flat-sm);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-normal);
  user-select: none;
}

.neu-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--neu-flat);
  color: #0f172a;
}

.neu-btn:active, .neu-btn.active {
  transform: translateY(1px);
  box-shadow: var(--neu-pressed);
  color: var(--primary-gold);
}

/* Primary Button with Warm Amber Gold Accent */
.neu-btn-primary {
  background: var(--primary-gradient);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 4px 4px 14px rgba(184, 129, 38, 0.4), -4px -4px 14px var(--neu-shadow-light);
}

.neu-btn-primary:hover {
  box-shadow: 6px 6px 18px rgba(184, 129, 38, 0.5), -6px -6px 18px var(--neu-shadow-light);
  transform: translateY(-2px);
}

.neu-btn-primary:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.3), inset -3px -3px 6px rgba(255, 255, 255, 0.2);
  transform: translateY(1px);
}

/* WhatsApp Button */
.neu-btn-whatsapp {
  background: var(--whatsapp-gradient);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 4px 4px 14px rgba(37, 211, 102, 0.35), -4px -4px 14px var(--neu-shadow-light);
}

.neu-btn-whatsapp:hover {
  box-shadow: 6px 6px 18px rgba(37, 211, 102, 0.5), -6px -6px 18px var(--neu-shadow-light);
  transform: translateY(-2px);
}

.neu-btn-whatsapp:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

/* Circular Icon Button */
.neu-btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

.neu-btn-icon-lg {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Form Controls (Inset) */
.neu-input, .neu-select, .neu-textarea {
  width: 100%;
  padding: 0.85rem 1.2rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid rgba(184, 196, 212, 0.3);
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed-sm);
  outline: none;
  transition: all var(--transition-fast);
}

.neu-input:focus, .neu-select:focus, .neu-textarea:focus {
  box-shadow: var(--neu-pressed);
  border-color: rgba(201, 147, 59, 0.6);
  background: #f0f5fc;
}

.neu-textarea {
  resize: vertical;
  min-height: 90px;
}

/* Badges */
.neu-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  box-shadow: var(--neu-flat-xs);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
}

.neu-badge-gold {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  box-shadow: 2px 2px 8px rgba(184, 129, 38, 0.3);
}

.neu-badge-wpc {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
}

.neu-badge-green {
  background: var(--whatsapp-gradient);
  color: #fff;
  border: none;
}

/* =======================================================
   FULL DOOR FRAME DISPLAY (CRITICAL SPECIFICATION)
   Shows the full door vertically without cutting off top/bottom
======================================================= */
.neu-door-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 2.05;
  background: #dfe6f0;
  border-radius: var(--radius-md);
  box-shadow: var(--neu-pressed);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.neu-door-frame-sm {
  aspect-ratio: 1 / 2;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.neu-door-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* CRITICAL: NEVER crop the top or bottom of the door */
  object-position: center;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
  transition: transform var(--transition-normal);
  
  /* Catalog Image Protection */
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* Disables right click context menu directly on image */
}

.neu-card:hover .neu-door-img {
  transform: scale(1.03);
}

/* Image Protection Overlay */
.image-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Watermark Badge */
.door-watermark {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 6;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  pointer-events: none;
}

/* Tabs */
.neu-tabs {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--neu-pressed-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.neu-tabs::-webkit-scrollbar {
  display: none;
}

.neu-tab-item {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.neu-tab-item.active {
  background: var(--bg-surface);
  color: var(--primary-gold);
  box-shadow: var(--neu-flat-xs);
  font-weight: 700;
}

/* Modal Popup */
.neu-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1rem;
}

.neu-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.neu-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.3), -10px -10px 40px rgba(255, 255, 255, 0.8);
  max-width: 580px;
  width: 100%;
  padding: 2rem;
  transform: scale(0.92) translateY(20px);
  transition: all var(--transition-bounce);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.neu-modal-backdrop.show .neu-modal {
  transform: scale(1) translateY(0);
}

/* Drawer / Slide-out Cart */
.neu-drawer-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.neu-drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.neu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100%;
  height: 100dvh;
  background: var(--bg-surface);
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.neu-drawer.show {
  transform: translateX(0);
}

/* Animations */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-float {
  animation: floatGentle 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(184, 129, 38, 0.3); }
  50% { box-shadow: 0 0 25px rgba(184, 129, 38, 0.65); }
}

.anim-glow {
  animation: pulseGlow 2.5s infinite;
}
