/* AnglinGear - Professional Typography & Layout Optimization */
/* Version: 2026-03-14 - MVP Visual Enhancement */

/* ============================================
   1. IMPROVED TYPOGRAPHY SYSTEM
   ============================================ */

/* Import professional font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color System - Kept Original */
  --primary: #2c5530;
  --primary-dark: #1a3a1a;
  --secondary: #e8a838;
  --accent: #e8a838;
  --accent-hover: #d4962e;
  --light: #f5f5f0;
  --dark: #1a1a1a;
  --white: #ffffff;
  --muted: #666;
  --card-border: rgba(0,0,0,0.06);
  
  /* Typography Scale - Enhanced */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights - Optimized for readability */
  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  
  /* Letter Spacing - Professional */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.01em;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Shadows - Subtle & Professional */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  
  /* Border Radius - Consistent */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ============================================
   2. BASE STYLES - Enhanced Typography
   ============================================ */

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { 
  font-family: var(--font-main);
  font-weight: var(--font-weight-normal);
  line-height: var(--leading-normal);
  color: var(--dark); 
  background: var(--light);
  letter-spacing: var(--tracking-normal);
}

/* ============================================
   3. HEADING HIERARCHY - Improved Scale
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--leading-tight);
  color: var(--primary-dark);
  letter-spacing: var(--tracking-tight);
}

h1 { 
  font-size: clamp(1.75rem, 4vw, 2.5rem); 
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-lg);
}

h2 { 
  font-size: clamp(1.5rem, 3vw, 2rem); 
  margin-bottom: var(--space-md);
}

h3 { 
  font-size: clamp(1.25rem, 2.5vw, 1.5rem); 
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

h4 { 
  font-size: 1.125rem; 
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

/* ============================================
   4. PARAGRAPHS & TEXT - Better Readability
   ============================================ */

p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
  max-width: 70ch; /* Optimal reading width */
}

.text-large {
  font-size: 1.125rem;
  line-height: var(--leading-relaxed);
}

.text-small {
  font-size: 0.875rem;
  line-height: var(--leading-normal);
}

.text-muted {
  color: var(--muted);
}

/* ============================================
   5. LAYOUT CONTAINER - Enhanced Spacing
   ============================================ */

.container { 
  max-width: 1280px; /* Slightly reduced for better focus */
  margin: 0 auto; 
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container { 
    padding: 0 var(--space-md);
  }
}

/* ============================================
   6. NAVIGATION - Unchanged Structure
   ============================================ */

.navbar { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  padding: 1rem 0; 
  position: fixed; 
  width: 100%; 
  top: 0; 
  z-index: 1000; 
  box-shadow: var(--shadow-md);
}

.nav-container { 
  max-width: 1400px; 
  margin: 0 auto; 
  padding: 0 var(--space-lg); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  position: relative;
}

.logo { 
  font-size: 1.5rem; /* Slightly reduced */
  font-weight: var(--font-weight-bold);
  color: var(--white); 
  text-decoration: none; 
  display: flex; 
  align-items: center; 
  gap: 0.5rem;
  letter-spacing: var(--tracking-tight);
}

.logo i { color: var(--secondary); }

.nav-links { 
  display: flex; 
  list-style: none; 
  gap: 2rem;
  font-weight: var(--font-weight-medium);
}

.nav-links a { 
  color: var(--white); 
  text-decoration: none; 
  font-weight: var(--font-weight-medium);
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover { 
  color: var(--secondary); 
}

/* Mobile Nav - Unchanged */
.nav-toggle { 
  display: none; 
  align-items: center; 
  justify-content: center; 
  width: 44px; 
  height: 44px; 
  border: 1px solid rgba(255,255,255,0.25); 
  border-radius: var(--radius-md); 
  background: rgba(255,255,255,0.08); 
  color: inherit; 
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { 
    display: none; 
    position: absolute; 
    top: calc(100% + 10px); 
    left: 0; 
    right: 0; 
    padding: 10px; 
    border-radius: var(--radius-md); 
    flex-direction: column; 
    gap: 8px; 
    z-index: 1200; 
    background: linear-gradient(135deg, rgba(26,58,26,0.98) 0%, rgba(44,85,48,0.98) 100%); 
    border: 1px solid rgba(255,255,255,0.14); 
    box-shadow: var(--shadow-lg);
  }
  nav.is-open .nav-links { display: flex !important; }
  .nav-links a { 
    display: block; 
    padding: 12px; 
    border-radius: var(--radius-md);
    font-size: 1rem;
  }
  .nav-links a:hover { background: rgba(255,255,255,0.10); }
}

/* ============================================
   7. BREADCRUMB - Enhanced
   ============================================ */

.breadcrumb { 
  margin-top: 80px; 
  background: var(--white); 
  padding: var(--space-md) 0; 
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 0.875rem;
}

.breadcrumb a { 
  color: var(--primary); 
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  transition: opacity 0.2s;
}

.breadcrumb a:hover { 
  opacity: 0.8;
  text-decoration: underline;
}

/* ============================================
   8. HERO SECTION - Improved Typography
   ============================================ */

.hero { 
  margin-top: 80px; 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: var(--white); 
  padding: 5rem 2rem 3.5rem;
  text-align: center;
}

.hero h1 { 
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
}

.hero p { 
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto var(--space-lg);
  opacity: 0.95;
  line-height: var(--leading-relaxed);
  font-weight: var(--font-weight-normal);
}

/* ============================================
   9. PRODUCT DETAIL PAGE - Enhanced Layout
   ============================================ */

.product-detail { 
  padding: var(--space-xl) 0; 
  background: var(--white);
}

.product-detail .product-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 968px) {
  .product-detail .product-grid { 
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* Product Image Column */
.product-image-column { 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-md);
}

.product-image-container { 
  background: var(--light); 
  border-radius: var(--radius-lg); 
  padding: var(--space-xl);
  text-align: center;
}

.product-detail .product-image { 
  max-width: 100%; 
  max-height: 450px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* Product Info Column */
.product-info h1 { 
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--primary-dark); 
  margin-bottom: var(--space-xs);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
}

.product-sku { 
  color: var(--muted); 
  font-size: 0.9375rem;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-md);
  letter-spacing: var(--tracking-wide);
}

.product-category { 
  display: inline-block; 
  background: var(--primary); 
  color: var(--white); 
  padding: 0.35rem 1rem; 
  border-radius: 20px; 
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.product-description { 
  font-size: 1rem;
  line-height: var(--leading-relaxed);
  color: #444;
  margin-bottom: var(--space-lg);
}

/* ============================================
   10. SPECIFICATIONS TABLE - Enhanced
   ============================================ */

.specs-table { 
  width: 100%; 
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-lg) 0;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.specs-table th, 
.specs-table td { 
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.specs-table th { 
  background: var(--light); 
  color: var(--primary); 
  font-weight: var(--font-weight-semibold);
  width: 35%;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.specs-table td {
  background: var(--white);
  font-weight: var(--font-weight-medium);
  color: var(--dark);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   11. CTA SECTION - Improved
   ============================================ */

.cta-section { 
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
  color: var(--white); 
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-top: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.cta-section h3 { 
  margin-bottom: var(--space-sm);
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
}

.cta-section p {
  opacity: 0.95;
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
}

/* ============================================
   12. BUTTONS - Enhanced
   ============================================ */

.btn { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--secondary); 
  color: var(--white); 
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  text-decoration: none; 
  font-weight: var(--font-weight-semibold);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  letter-spacing: var(--tracking-wide);
}

.btn:hover { 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-md);
  background: var(--accent-hover);
}

.quote-btn { 
  background: var(--secondary); 
  color: var(--white); 
  border: none; 
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: var(--font-weight-semibold);
  cursor: pointer; 
  text-decoration: none; 
  text-align: center; 
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: var(--tracking-wide);
}

.quote-btn:hover { 
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

/* ============================================
   13. PRODUCT GRID & CARDS - Enhanced
   ============================================ */

.product-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 1.5rem;
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 968px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.product-card { 
  background: var(--white); 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border); 
  display: flex; 
  flex-direction: column; 
  transition: all 0.25s ease;
}

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

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--light);
  padding: var(--space-md);
}

.product-card-content {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  line-height: 1.4;
  color: var(--primary-dark);
}

.product-card .sku {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

/* ============================================
   14. CATEGORY SECTIONS - Enhanced
   ============================================ */

.category-section { 
  margin-bottom: var(--space-2xl);
}

.category-header { 
  background: var(--primary); 
  color: var(--white); 
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  display: flex; 
  align-items: center;
  justify-content: space-between;
}

.category-header h2 { 
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0;
}

.category-count { 
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: var(--font-weight-medium);
}

/* Category Pills */
.category-nav { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.5rem;
  margin: var(--space-md) 0 var(--space-xl);
}

.category-pill { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.4rem; 
  padding: 0.5rem 1rem;
  border-radius: 999px; 
  background: var(--white); 
  border: 1px solid var(--card-border); 
  color: var(--primary-dark); 
  text-decoration: none; 
  font-weight: var(--font-weight-medium);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.category-pill:hover { 
  border-color: var(--primary);
  background: var(--light);
}

/* ============================================
   15. FOOTER - Enhanced
   ============================================ */

footer { 
  background: var(--primary-dark); 
  color: var(--white); 
  padding: var(--space-2xl) var(--space-lg) var(--space-md);
  margin-top: var(--space-2xl);
}

.footer-content { 
  max-width: 1400px; 
  margin: 0 auto; 
  display: grid; 
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr; 
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-section h3 { 
  margin-bottom: var(--space-md);
  color: var(--secondary);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.footer-section p, 
.footer-section a { 
  color: rgba(255,255,255,0.85);
  text-decoration: none; 
  line-height: 1.8;
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-section a:hover { 
  color: var(--secondary);
}

.footer-bottom { 
  text-align: center; 
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.my-0 { margin-top: 0; margin-bottom: 0; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(44, 85, 48, 0.2);
  color: var(--primary-dark);
}
