/* ============================================
   PickPundit - Modern Product Comparison Site
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #10b981;
  --accent: #f59e0b;
  --dark: #1e1e2e;
  --darker: #11111b;
  --light: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-700);
  background: var(--light);
}

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

header {
  background: var(--darker);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 5px;
}

nav a {
  color: var(--gray-300);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

nav a:hover {
  color: white;
  background: var(--gray-800);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  min-width: 250px;
  padding: 10px;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-content {
  display: block;
}

.nav-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  color: var(--gray-700);
  border-radius: 8px;
}

.nav-dropdown-content a:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

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

.hero {
  background: var(--gradient);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 30px;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 18px 60px 18px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 50px;
  box-shadow: var(--shadow-xl);
}

.hero-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--primary-dark);
}

/* ============================================
   CATEGORY GRID
   ============================================ */

.categories-section {
  padding: 60px 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
}

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

.category-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--gray-200);
}

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

.category-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.category-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.category-card .btn {
  width: 100%;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

.btn-amazon {
  background: #ff9900;
  color: white;
}

.btn-amazon:hover {
  background: #e68a00;
  color: white;
}

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

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

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* ============================================
   FEATURED PRODUCTS
   ============================================ */

.featured-section {
  padding: 60px 20px;
  background: var(--gray-100);
}

.featured-category {
  margin-bottom: 50px;
}

.featured-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.featured-category-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.featured-product {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.featured-product:hover {
  box-shadow: var(--shadow);
}

.featured-product-image {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.featured-product-image img {
  max-height: 100%;
  object-fit: contain;
}

.featured-product h4 {
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.featured-product-rating {
  color: var(--accent);
  font-size: 0.9rem;
}

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

.category-hero {
  background: var(--gradient);
  padding: 50px 20px;
  text-align: center;
}

.category-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}

.category-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}

.category-hero .last-updated {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-top: 10px;
}

.affiliate-notice {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  padding: 15px 20px;
  border-radius: var(--radius);
  margin: 20px auto;
  max-width: 1200px;
  font-size: 0.9rem;
  color: var(--gray-700);
}

/* Comparison Table */
.comparison-section {
  padding: 40px 20px;
}

.comparison-table-wrapper {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.comparison-table th {
  background: var(--dark);
  color: white;
  padding: 18px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table td {
  padding: 20px 15px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.comparison-table tr:hover {
  background: var(--gray-50);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-thumb {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--gray-100);
  padding: 5px;
}

.product-name {
  font-weight: 600;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-badge {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.rank-badge.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.rank-badge.silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.rank-badge.bronze { background: linear-gradient(135deg, #d97706, #b45309); }

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

.rating-stars {
  color: var(--accent);
  font-size: 1rem;
}

.rating-count {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 2px;
}

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

.badge-bestseller {
  background: var(--accent);
  color: white;
}

/* Product Cards */
.products-section {
  padding: 40px 20px;
  background: var(--gray-100);
}

.products-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--dark);
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.product-card-header {
  background: var(--dark);
  padding: 15px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-card-rank {
  background: var(--gradient);
  padding: 6px 14px;
  border-radius: 20px;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.product-card-header h3 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  flex: 1;
}

.product-card-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  padding: 30px;
}

.product-card-image {
  text-align: center;
  position: relative;
}

.product-card-image img {
  max-height: 220px;
  object-fit: contain;
}

.product-card-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}

.product-card-info {
  display: flex;
  flex-direction: column;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: var(--accent);
  font-size: 1.1rem;
}

.review-count {
  color: var(--gray-500);
  font-size: 0.9rem;
}

.product-review {
  margin-bottom: 20px;
}

.product-review h4 {
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 10px;
}

.product-review p {
  color: var(--gray-600);
  line-height: 1.7;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.pros h5 {
  color: var(--success);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.cons h5 {
  color: var(--danger);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.pros-cons ul {
  list-style: none;
}

.pros-cons li {
  padding: 5px 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}

.pros li::before {
  content: '✓ ';
  color: var(--success);
  font-weight: bold;
}

.cons li::before {
  content: '✗ ';
  color: var(--danger);
  font-weight: bold;
}

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

footer {
  background: var(--darker);
  color: var(--gray-400);
  padding: 60px 20px 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 20px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--gray-400);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 25px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin-bottom: 5px;
}

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

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

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

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

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

  nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .featured-products {
    grid-template-columns: 1fr;
  }

  .product-card-body {
    grid-template-columns: 1fr;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .product-thumb {
    width: 60px;
    height: 60px;
  }

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

  .footer-brand .logo {
    justify-content: center;
  }
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

/* Mobile Slide-out Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--darker);
  z-index: 2000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 20px rgba(0,0,0,0.3);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--gray-800);
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-content {
  padding: 10px 0;
}

.mobile-menu-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  color: var(--gray-300);
  font-size: 1rem;
  border-bottom: 1px solid var(--gray-800);
  transition: all 0.2s;
}

.mobile-menu-content a:hover,
.mobile-menu-content a.active {
  background: var(--gray-800);
  color: white;
}

.mobile-menu-content a .icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.mobile-categories {
  background: var(--gray-900);
  padding: 10px 0;
}

.mobile-categories-title {
  padding: 10px 20px;
  color: var(--gray-500);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mobile-categories a {
  padding: 12px 20px 12px 35px;
  font-size: 0.95rem;
  border-bottom: none;
}

/* Bottom Navigation for Mobile */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-200);
  z-index: 999;
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--gray-500);
  font-size: 0.7rem;
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
}

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

.bottom-nav-item .icon {
  font-size: 1.4rem;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: block;
  }

  /* Add padding to body to prevent content from being hidden behind bottom nav */
  body {
    padding-bottom: 70px;
  }

  /* Adjust footer for bottom nav */
  footer {
    margin-bottom: 0;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center { text-align: center; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
