/* ==========================================================================
   HIDDEN GEM FINDER - MAIN STYLES
   Professional Tech Review Aesthetic
   ========================================================================== */

/* CSS Variables */
:root {
  /* Colors */
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-secondary: #8b5cf6;
  --color-accent: #f59e0b;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  
  /* Neutrals */
  --color-white: #ffffff;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Layout */
  --container-max: 1280px;
  --container-narrow: 768px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gray-900);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  z-index: 10000;
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-md);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.logo-icon {
  font-size: 1.5rem;
}

.logo .highlight {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.hamburger {
  width: 24px;
  height: 2px;
  background: var(--color-gray-700);
  transition: var(--transition-fast);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-gray-600);
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-link:hover {
  color: var(--color-gray-900);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.dropdown-arrow {
  transition: transform var(--transition-fast);
}

.dropdown[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  color: var(--color-gray-600);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--color-gray-50);
  color: var(--color-gray-900);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.main-content {
  min-height: calc(100vh - 64px - 400px);
  padding: var(--space-2xl) 0;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-gray-200);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.hero h1 .highlight {
  color: var(--color-primary);
  position: relative;
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(59, 130, 246, 0.2);
  z-index: -1;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  margin-bottom: var(--space-xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-top: var(--space-2xl);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* ==========================================================================
   CATEGORY GRID (Homepage)
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
}

.category-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--card-color, var(--color-primary));
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-gray-300);
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: var(--space-xs);
}

.category-card p {
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-bottom: var(--space-md);
}

.category-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-gray-400);
}

.category-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  color: var(--color-primary);
}

.category-link svg {
  transition: transform var(--transition-fast);
}

.category-card:hover .category-link svg {
  transform: translateX(4px);
}

/* ==========================================================================
   TOP PICKS SECTION
   ========================================================================== */

.top-picks {
  background: var(--color-gray-50);
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-3xl);
}

.top-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

/* ==========================================================================
   CATEGORY PAGE HEADER
   ========================================================================== */

.category-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding: var(--space-2xl) 0;
  background: linear-gradient(135deg, var(--color-gray-50) 0%, var(--color-white) 100%);
  border-radius: var(--radius-xl);
}

.category-header .badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.category-description {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   PRODUCTS GRID
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-xl);
}

/* ==========================================================================
   PRODUCT CARD (RTINGS Style)
   ========================================================================== */

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--color-gray-300);
}

.product-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-lg);
  transition: transform var(--transition-base);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.category-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white);
}

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

.product-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-900);
  line-height: 1.4;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

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

/* Score Circle (RTINGS Style) */
.score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid;
  text-align: center;
}

.score-circle.excellent {
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.1);
}

.score-circle.good {
  border-color: var(--color-accent);
  background: rgba(245, 158, 11, 0.1);
}

.score-circle.average {
  border-color: var(--color-gray-400);
  background: rgba(156, 163, 175, 0.1);
}

.score-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-gray-900);
}

.score-label {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-gray-500);
  margin-top: 2px;
}

.product-summary {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

/* Pros & Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-gray-50);
  border-radius: var(--radius-md);
}

.pros h4,
.cons h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.pros h4 {
  color: var(--color-success);
}

.cons h4 {
  color: var(--color-danger);
}

.pros ul,
.cons ul {
  list-style: none;
  font-size: 0.75rem;
}

.pros li,
.cons li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--color-gray-600);
}

.pros li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.cons li::before {
  content: '−';
  position: absolute;
  left: 0;
  color: var(--color-danger);
  font-weight: 700;
}

/* CTA Button */
.cta-button {
  display: block;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--color-accent) 0%, #d97706 100%);
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  margin-top: auto;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--color-white);
}

.cta-button::after {
  content: ' →';
  transition: transform var(--transition-fast);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-logo .highlight {
  color: var(--color-primary);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  margin-bottom: var(--space-lg);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-gray-800);
  border-radius: var(--radius-md);
  color: var(--color-gray-400);
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

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

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-gray-400);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-newsletter h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.footer-newsletter p {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  margin-bottom: var(--space-md);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-gray-800);
  border: 1px solid var(--color-gray-700);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: 0.875rem;
}

.newsletter-form input::placeholder {
  color: var(--color-gray-500);
}

.btn-subscribe {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-subscribe:hover {
  background: var(--color-primary-dark);
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-800);
  padding-top: var(--space-xl);
}

.affiliate-disclaimer {
  background: var(--color-gray-800);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.affiliate-disclaimer p {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  line-height: 1.6;
}

.copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.last-updated {
  font-size: 0.75rem;
  color: var(--color-gray-600);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
    display: none;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .copyright {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .product-card {
    margin: 0 calc(-1 * var(--space-md));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

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

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

.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); }

/* Loading Animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .cta-button {
    display: none;
  }
  
  .product-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
