/* Critical CSS - Inline for fastest loading */
:root {
  --primary-color: #0056b3;
  --secondary-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #f8f9fa;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
  --radius: 8px;
  --max-width: 1200px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: #fff;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.tagline {
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 0.25rem;
}

/* Navigation */
.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 0.9375rem;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 0.9375rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #004494;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
}

.btn-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-link:hover {
  text-decoration: underline;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Categories Section */
.categories {
  padding: 4rem 0;
  background: var(--light-gray);
}

.categories h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--dark);
}

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

.category-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.category-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.category-card p {
  color: var(--gray);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Products Section */
.products {
  padding: 4rem 0;
}

.products h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
}

.category-section {
  margin-bottom: 3rem;
}

.category-section h3 {
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

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

/* Product Card */
.product-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

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

.product-image {
  position: relative;
  padding-top: 75%;
  background: var(--light-gray);
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background: var(--secondary-color);
  color: white;
}

.badge-warning {
  background: var(--warning-color);
  color: var(--dark);
}

.product-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-content h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6rem;
}

.product-description {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
}

.brand {
  color: var(--primary-color);
  font-weight: 500;
}

.sku {
  color: var(--gray);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.stars {
  color: #ffc107;
  letter-spacing: 2px;
}

.reviews {
  color: var(--gray);
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.product-actions .btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Product Detail Page */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--gray);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

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

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0 3rem;
}

.product-images {
  position: relative;
}

.product-images img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.product-info h1 {
  font-size: 1.875rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.product-info .product-meta {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.product-info .product-rating {
  margin-bottom: 1.5rem;
}

.rating-value {
  font-weight: 600;
  color: var(--dark);
}

.price-section {
  margin-bottom: 1.5rem;
}

.price-label {
  font-size: 1rem;
  color: var(--gray);
  margin-right: 0.5rem;
}

.price-section .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

.description h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.description p {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.features {
  margin-bottom: 1.5rem;
}

.features h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.features ul {
  list-style: none;
  padding: 0;
}

.features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray);
  border-bottom: 1px solid var(--border-color);
}

.features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.cta-section {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Specifications Table */
.product-specs {
  margin: 3rem 0;
}

.product-specs h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.specs-table td {
  padding: 0.75rem;
}

.spec-label {
  font-weight: 500;
  color: var(--dark);
  width: 40%;
}

.spec-value {
  color: var(--gray);
}

/* Related Products */
.related-products {
  margin: 3rem 0;
}

.related-products h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

/* Trust Signals */
.trust-signals {
  background: var(--light-gray);
  padding: 3rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.trust-item {
  text-align: center;
}

.trust-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.trust-item p {
  color: var(--gray);
  font-size: 0.9375rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-section p {
  color: #adb5bd;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #495057;
  color: #adb5bd;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h2 {
    font-size: 1.875rem;
  }

  .hero p {
    font-size: 1rem;
  }

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

  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-section {
    flex-direction: column;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Performance Optimizations */
img {
  loading: lazy;
  decoding: async;
}

/* Accessibility */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .nav,
  .cta-buttons,
  .footer {
    display: none;
  }

  .product-card {
    break-inside: avoid;
  }
}