@import "./animations.css";
@import "./typography.css";

/* ===== Premium Furniture E-Commerce Design System ===== */

:root {
  /* Shadcn mappings */
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);

  /* Font families */
  --font-serif: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "Inter", system-ui, sans-serif;

  /* Premium custom colors */
  --color-sand: #FAF8F5;
  --color-sand-dark: #F3EDE7;
  --color-warm-gray: #6B6560;
  --color-warm-gray-light: #9C9590;
  --color-gold: #C4A265;
  --color-gold-dark: #A8893F;
  --color-terracotta: #C67D5B;
  --color-sage: #8B9E82;
  --color-sage-dark: #6E8264;
  --color-wood: #8B6F4E;
  --color-cream: #F5F0EB;
  --color-linen: #EDE8E1;
  --color-charcoal: #1A1A1A;

  /* Radius */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);

  /* SELIS Design System Tokens */
  --color-selis-primary-50: #F7F7F7;
  --color-selis-primary-100: #E8E8E8;
  --color-selis-primary-200: #D4D4D4;
  --color-selis-primary-300: #ABABAB;
  --color-selis-primary-400: #737373;
  --color-selis-primary-500: #525252;
  --color-selis-primary-600: #404040;
  --color-selis-primary-700: #2C2C2E;
  --color-selis-primary-800: #1C1C1E;
  --color-selis-primary-900: #0D0D0F;
  --color-selis-primary: #1C1C1E;

  --color-selis-accent-50: #FDF9F0;
  --color-selis-accent-100: #FAF0D9;
  --color-selis-accent-200: #F3DFB0;
  --color-selis-accent-300: #E8C97A;
  --color-selis-accent-400: #D4AA6E;
  --color-selis-accent-500: #C9A96E;
  --color-selis-accent-600: #B8915A;
  --color-selis-accent-700: #9A7440;
  --color-selis-accent-800: #7A5A2C;
  --color-selis-accent-900: #5C4020;
  --color-selis-accent: #C9A96E;

  --color-selis-secondary-50: #FDFCFA;
  --color-selis-secondary-100: #FAF8F5;
  --color-selis-secondary-200: #F5F0EB;
  --color-selis-secondary-300: #EDE5DC;
  --color-selis-secondary-400: #E2D5C8;
  --color-selis-secondary-500: #D4C4B0;
  --color-selis-secondary-600: #C0AB91;
  --color-selis-secondary-700: #A08B6E;
  --color-selis-secondary-800: #7D6A50;
  --color-selis-secondary-900: #5A4C38;
  --color-selis-secondary: #F5F0EB;

  --color-selis-success: #4CAF50;
  --color-selis-success-light: #F0FFF4;
  --color-selis-error: #E53935;
  --color-selis-error-light: #FFF5F5;
  --color-selis-warning: #FF9800;
  --color-selis-warning-light: #FFFBF0;
  --color-selis-info: #3B82F6;
  --color-selis-info-light: #EFF6FF;

  --color-selis-whatsapp: #25D366;
  --color-selis-instagram: #E1306C;

  /* Shadows */
  --shadow-selis-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-selis-card-hover: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-selis-navbar: 0 1px 20px rgba(0, 0, 0, 0.08);
  --shadow-selis-drawer: -4px 0 40px rgba(0, 0, 0, 0.12);
  --shadow-selis-bottom-nav: 0 -4px 20px rgba(0, 0, 0, 0.06);
  --shadow-selis-gold: 0 8px 24px rgba(201, 169, 110, 0.35);
  --shadow-selis-gold-sm: 0 4px 12px rgba(201, 169, 110, 0.25);
  --shadow-selis-toast: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-selis-glass: 0 8px 32px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.20);

  --radius-selis: 2px;
  --breakpoint-xs: 375px;
  --breakpoint-2xl: 1440px;

  /* Admin Dashboard */
  --color-admin-sidebar: #0F0F10;
  --color-admin-bg: #141416;
  --color-admin-card: #1C1C1E;
  --color-admin-card-hover: #242426;
  --color-admin-border: rgba(255, 255, 255, 0.06);
  --color-admin-border-accent: rgba(201, 169, 110, 0.3);
  --color-admin-gold: #C9A96E;
  --color-admin-gold-hover: #D4B87A;
  --color-admin-gold-dim: rgba(201, 169, 110, 0.15);
  --color-admin-text-primary: #F5F0EB;
  --color-admin-text-secondary: #AEAEB2;
  --color-admin-text-dim: #636366;
  --color-admin-success: #30D158;
  --color-admin-error: #FF453A;
  --color-admin-warning: #FFD60A;
  --color-admin-info: #0A84FF;

  /* Light mode */
  --background: #FFFFFF;
  --foreground: #1A1A1A;
  --card: #FFFFFF;
  --card-foreground: #1A1A1A;
  --popover: #FFFFFF;
  --popover-foreground: #1A1A1A;
  --primary: #C4A265;
  --primary-foreground: #FFFFFF;
  --secondary: #FAF8F5;
  --secondary-foreground: #1A1A1A;
  --muted: #F3EDE7;
  --muted-foreground: #6B6560;
  --accent: #F3EDE7;
  --accent-foreground: #1A1A1A;
  --destructive: #dc2626;
  --border: #E8E2DB;
  --input: #E8E2DB;
  --ring: #C4A265;

  --selis-primary: #1C1C1E;
  --selis-gold: #C9A96E;
  --selis-gold-dark: #B8915A;
  --selis-cream: #F5F0EB;

  --color-accent: #BD8C40;
  --color-accent-hover: #A17336;
  --color-primary-dark: #0A0A0B;
  --color-success: #4CAF50;
  --color-error: #E53935;
  --color-warning: #FF9800;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-playfair: 'Playfair Display', Georgia, serif;

  --navbar-height: 72px;
  --bottom-nav-height: 64px;
  --container-max: 1280px;
  --container-pad: 24px;
  --container-pad-mobile: 16px;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(20px) saturate(180%);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

/* Dark Mode */
.dark {
  --background: #09090B;
  --foreground: #FCFBF7;
  --card: #121212;
  --card-foreground: #FCFBF7;
  --popover: #121212;
  --popover-foreground: #FCFBF7;
  --primary: #C9A96E;
  --primary-foreground: #09090B;
  --secondary: #18181B;
  --secondary-foreground: #FCFBF7;
  --muted: #27272A;
  --muted-foreground: #A1A1AA;
  --accent: #27272A;
  --accent-foreground: #FCFBF7;
  --destructive: #dc2626;
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.08);
  --ring: #C9A96E;
  --selis-primary: #FCFBF7;
  --selis-gold: #C9A96E;
  --selis-gold-dark: #B8915A;
  --selis-cream: #121212;
  --glass-bg: rgba(9, 9, 11, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(30px) saturate(220%);
}

/* Smooth scrolling */
html { 
  scroll-behavior: smooth; 
  overflow-x: hidden;
  width: 100%;
  scrollbar-gutter: stable;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  transition: color 0.3s, background-color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Premium text styles */
.text-display {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
}

.text-body-lg {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-warm-gray);
}

/* Container */
.container-premium {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .container-premium { padding-left: 3rem; padding-right: 3rem; }
}
@media (min-width: 1280px) {
  .container-premium { padding-left: 5rem; padding-right: 5rem; }
}

/* Glass */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

.glass-premium {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.dark .glass-premium {
  background: rgba(13, 13, 15, 0.88);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Fade animations */
.fade-in-up { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

.delay-100 { transition-delay: 100ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }
.delay-500 { transition-delay: 500ms !important; }
.delay-700 { transition-delay: 700ms !important; }
.delay-1000 { transition-delay: 1000ms !important; }

/* Scrollbar */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #E8E3DC 0%, #F5F0EB 40%, #E8E3DC 80%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 2px;
}
.dark .skeleton {
  background: linear-gradient(90deg, #2C2C2E 0%, #3A3A3C 40%, #2C2C2E 80%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F5F0EB; }
::-webkit-scrollbar-thumb { background: #C9A96E; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #B8915A; }
.dark ::-webkit-scrollbar-track { background: #2C2C2E; }
.dark ::-webkit-scrollbar-thumb { background: #9A7440; }

/* Text selection */
::selection { background-color: rgba(201, 169, 110, 0.25); color: #1C1C1E; }
.dark ::selection { background-color: rgba(201, 169, 110, 0.30); color: #F5F0EB; }

/* Focus */
:focus-visible { outline: 2px solid #C9A96E; outline-offset: 2px; }

/* Touch scrolling */
.touch-scroll { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* Heritage Material for navbar */
.heritage-material {
  background: rgba(252, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 213, 188, 0.30);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}
.dark .heritage-material {
  background: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, 0.20);
}

/* Image crossfade */
.img-crossfade { position: relative; overflow: hidden; }
.img-crossfade img:last-child { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.img-crossfade:hover img:last-child { opacity: 1; }

/* Keyframes */
@keyframes shimmer { 0% { background-position: 200% center; } 100% { background-position: -200% center; } }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }
@keyframes videoRing { 0% { transform: scale(1); opacity: 0.5; } 70% { transform: scale(1.6); opacity: 0; } 100% { transform: scale(1.6); opacity: 0; } }

/* Alpine.js x-cloak to prevent FOUC */
[x-cloak] { display: none !important; }
