/* ==========================================
   MODERN FURNITURE WEBSITE - CUSTOM STYLES
   Premium, Clean, Contemporary Design
   Mobile-First Approach
   ========================================== */

/* ==========================================
   1. CSS VARIABLES - DESIGN SYSTEM
   ========================================== */
:root {
  /* Modern Color Palette - Furniture Theme */
  --primary-color: #2C3E50;        /* Deep Navy Blue */
  --secondary-color: #8B7355;      /* Warm Wood Brown */
  --accent-color: #D4A574;         /* Light Gold/Beige */
  --text-dark: #1a1a1a;            /* Almost Black */
  --text-medium: #4a5568;          /* Medium Gray */
  --text-light: #718096;           /* Light Gray */
  --bg-light: #F7F7F7;             /* Off White */
  --bg-white: #FFFFFF;             /* Pure White */
  --border-color: #E2E8F0;         /* Soft Border */
  --success-color: #48BB78;        /* Green */
  --error-color: #F56565;          /* Red */
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  
  /* Spacing */
  --space-xs: 0.5rem;    /* 8px */
  --space-sm: 1rem;      /* 16px */
  --space-md: 1.5rem;    /* 24px */
  --space-lg: 2rem;      /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4rem;     /* 64px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==========================================
   2. MODERN TYPOGRAPHY
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap');

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
}

h1 { font-size: 3rem; }      /* 48px */
h2 { font-size: 2.5rem; }    /* 40px */
h3 { font-size: 2rem; }      /* 32px */
h4 { font-size: 1.5rem; }    /* 24px */
h5 { font-size: 1.25rem; }   /* 20px */
h6 { font-size: 1rem; }      /* 16px */

/* Responsive Typography */
@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }   /* 36px */
  h2 { font-size: 2rem; }      /* 32px */
  h3 { font-size: 1.75rem; }   /* 28px */
  h4 { font-size: 1.375rem; }  /* 22px */
}

/* ==========================================
   3. MODERN NAVIGATION
   ========================================== */
.modern-navbar {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.modern-navbar .navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.modern-navbar .nav-link {
  font-weight: 500;
  color: var(--text-medium);
  padding: 0.75rem 1.25rem;
  transition: all var(--transition-fast);
  position: relative;
}

.modern-navbar .nav-link:hover {
  color: var(--primary-color);
}

.modern-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transform: translateX(-50%);
  transition: width var(--transition-base);
}

.modern-navbar .nav-link:hover::after {
  width: 60%;
}

/* ==========================================
   4. MODERN HERO SECTION
   ========================================== */
.modern-hero {
  min-height: 600px;
  background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.modern-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path fill="%23f7f7f7" d="M0,0 L1000,0 L1000,1000 Q500,800 0,1000 Z"/></svg>');
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  color: var(--primary-color);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-medium);
  margin-bottom: var(--space-xl);
  font-family: var(--font-sans);
  font-weight: 400;
}

@media (max-width: 768px) {
  .modern-hero {
    min-height: 400px;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ==========================================
   5. MODERN BUTTONS
   ========================================== */
.btn-modern {
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-modern:active {
  transform: translateY(0);
}

.btn-primary-modern {
  background: var(--primary-color);
  color: white;
}

.btn-primary-modern:hover {
  background: #1a2732;
  color: white;
}

.btn-secondary-modern {
  background: var(--secondary-color);
  color: white;
}

.btn-outline-modern {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-modern:hover {
  background: var(--primary-color);
  color: white;
}

/* ==========================================
   6. MODERN PRODUCT CARDS
   ========================================== */
.modern-product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.modern-product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

.modern-product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-light);
}

.modern-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.modern-product-card:hover .modern-product-image img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--accent-color);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-product-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.product-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: auto;
  margin-bottom: var(--space-sm);
}

.product-price .old-price {
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: var(--space-xs);
  font-weight: 400;
}

/* ==========================================
   7. MODERN GRID LAYOUTS
   ========================================== */
.modern-grid {
  display: grid;
  gap: var(--space-lg);
}

.modern-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.modern-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.modern-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .modern-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .modern-grid-3,
  .modern-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .modern-grid,
  .modern-grid-2,
  .modern-grid-3,
  .modern-grid-4 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ==========================================
   8. MODERN SECTIONS
   ========================================== */
.modern-section {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-medium);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .modern-section {
    padding: var(--space-xl) 0;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

/* ==========================================
   9. MODERN FORMS
   ========================================== */
.modern-form-group {
  margin-bottom: var(--space-md);
}

.modern-form-label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-base);
  background: var(--bg-white);
}

.modern-form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.modern-form-control::placeholder {
  color: var(--text-light);
}

/* ==========================================
   10. MODERN FOOTER
   ========================================== */
.modern-footer {
  background: var(--primary-color);
  color: white;
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.modern-footer h5 {
  color: white;
  font-size: 1.125rem;
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.modern-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
  margin-bottom: var(--space-xs);
}

.modern-footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   11. UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--bg-white); }

/* ==========================================
   12. ANIMATIONS
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.5s ease forwards;
}

/* ==========================================
   13. MOBILE OPTIMIZATIONS
   ========================================== */
@media (max-width: 768px) {
  /* Larger touch targets */
  .btn-modern {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .modern-navbar .nav-link {
    padding: 1rem;
  }
  
  /* Better spacing on mobile */
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  
  /* Stack elements vertically */
  .mobile-stack {
    flex-direction: column !important;
  }
  
  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .modern-product-card:hover {
    transform: none;
  }
  
  .btn-modern:hover {
    transform: none;
  }
}

/* ==========================================
   14. LOADING & SKELETON STATES
   ========================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    #e0e0e0 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================
   15. RESPONSIVE IMAGES
   ========================================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
