/* ========================================
   Modern Minimal Design System
   ======================================== */

:root {
  /* Colors - Clean & Professional */
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --cta: #f97316;
  --cta-hover: #ea580c;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* Status Colors */
  --success: #10b981;
  --error: #ef4444;
  
  /* Spacing & Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  /* Shadows */
  --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 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Prevent iOS zoom on input focus - requires min 16px font-size */
@supports (-webkit-touch-callout: none) {
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="search"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ========================================
   Layout
   ======================================== */

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

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
  padding: 8rem 0 2rem;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--background) 100%);
  transition: all var(--transition-slow);
}

/* Compact Hero State (after search) */
.hero.compact {
  padding: calc(64px + 0.75rem) 0 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.hero.compact .hero-title,
.hero.compact .hero-subtitle,
.hero.compact .trust-badges {
  display: none;
}

.hero.compact .hero-content {
  max-width: 100%;
}

.hero.compact .search-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}

.hero.compact .search-mode-toggle {
  margin-bottom: 0;
  padding: 2px;
  flex: 0 0 auto;
  align-self: stretch;
}

.hero.compact .mode-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.hero.compact .search-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  grid-template-areas:
    "inputs submit"
    "filters filters";
  align-items: stretch;
  gap: 0.75rem 1rem;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.hero.compact .search-input-wrapper {
  flex: 1;
  grid-area: inputs;
}

.hero.compact input[type="text"],
.hero.compact input[type="number"] {
  padding: 0.75rem 1rem 0.75rem 3rem;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.hero.compact .input-icon {
  left: 1rem;
  width: 18px;
  height: 18px;
}

.hero.compact .advanced-inputs {
  flex: 1;
  align-items: center;
  grid-area: inputs;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.hero.compact .advanced-inputs label {
  display: none;
}

.hero.compact .input-group input {
  padding: 0.75rem 1rem;
}

.hero.compact .advanced-inputs .input-group {
  min-width: 140px;
}

.hero.compact .advanced-inputs .separator {
  padding-bottom: 0;
  align-self: center;
}

.hero.compact #searchBtn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  grid-area: submit;
  align-self: stretch;
}

.hero.compact .search-filters {
  gap: 1rem;
  padding: 0.25rem 0 0;
  justify-content: flex-start;
  grid-area: filters;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

@media (max-width: 900px) {
  .hero.compact .search-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inputs"
      "filters"
      "submit";
  }

  .hero.compact #searchBtn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero.compact {
    padding: calc(64px + 0.5rem) 0 0.5rem !important;
  }

  .hero.compact .search-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .hero.compact .search-mode-toggle {
    display: flex;
    margin-bottom: 0;
  }

  .hero.compact .mode-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    flex: 1;
    justify-content: center;
  }

  .hero.compact .search-form {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "inputs submit"
      "filters filters" !important;
    gap: 0.5rem;
  }

  .hero.compact #searchBtn {
    width: auto;
    padding: 0.5rem 1rem;
  }

  .hero.compact input[type="text"],
  .hero.compact input[type="number"] {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9375rem;
  }

  .hero.compact .input-icon {
    left: 0.75rem;
    width: 16px;
    height: 16px;
  }

  .hero.compact .search-filters {
    padding-top: 0;
    gap: 0.5rem;
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    max-width: 100%;
    align-items: center;
  }

  .hero.compact .search-filters::-webkit-scrollbar {
    display: none;
  }

  .hero.compact .filter-group {
    flex: 0 0 auto;
    min-width: auto;
  }

  .hero.compact .filter-group > label:not(.checkbox-label) {
    display: none;
  }

  .hero.compact select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.875rem;
    height: 36px;
  }

  .hero.compact .checkbox-label {
    font-size: 0.8125rem;
    white-space: nowrap;
  }
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ========================================
   Search Card
   ======================================== */

.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.search-mode-toggle {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.mode-btn {
  background: transparent;
  border: none;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-btn:hover {
  color: var(--text-secondary);
}

.mode-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Search Form */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Compact sticky layout overrides (after search) */
.hero.compact .search-form {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  grid-template-areas:
    "inputs submit"
    "filters filters";
  align-items: stretch;
  gap: 0.75rem 1.25rem;
  width: 100%;
}

.hero.compact .search-input-wrapper,
.hero.compact .advanced-inputs {
  grid-area: inputs;
}

.hero.compact .advanced-inputs {
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.hero.compact .advanced-inputs .input-group {
  min-width: 150px;
}

.hero.compact .advanced-inputs .separator {
  align-self: center;
  padding-bottom: 0;
}

.hero.compact #searchBtn {
  grid-area: submit;
  align-self: stretch;
  white-space: nowrap;
}

.hero.compact .search-filters {
  grid-area: filters;
  width: 100%;
  justify-content: flex-start;
  gap: 1rem;
  row-gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0 0;
}

@media (max-width: 900px) {
  .hero.compact .search-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inputs"
      "filters"
      "submit";
  }

  .hero.compact #searchBtn {
    width: 100%;
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper[hidden] {
  display: none;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 1rem 1rem 1rem 3.5rem;
  font-size: 1.0625rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

input[type="text"]:hover,
input[type="number"]:hover {
  border-color: var(--text-muted);
}

input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

input::placeholder {
  color: var(--text-muted);
}

/* Advanced Inputs */
.advanced-inputs {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.advanced-inputs[hidden] {
  display: none;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-group input {
  padding-left: 1rem;
}

.separator {
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 1rem;
}

/* Search Button */
#searchBtn {
  background: var(--cta);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.0625rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

#searchBtn:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

#searchBtn:active {
  transform: translateY(0);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.badge svg {
  width: 20px;
  height: 20px;
  color: var(--success);
}

/* ========================================
   Main Content & Results
   ======================================== */

.main-content {
  padding: 0 0 4rem;
  min-height: 0;
}

/* When the hero becomes compact, reduce top padding since we scroll to top */
.hero.compact ~ .main-content {
  padding-top: 1rem;
}

/* When main-content has results, add some top padding */
.main-content:has(.results-section:not([hidden])) {
  padding-top: 1.5rem;
}

/* Search Filters (integrated in search card) */
.search-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1rem 0;
  margin-top: 0.5rem;
}

.search-filters .filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-filters .filter-group[hidden] {
  display: none;
}

.search-filters label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.search-filters select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.search-filters .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.search-filters .checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Compact state for search filters */
.hero.compact .search-filters {
  gap: 1rem;
  padding: 0.25rem 0 0;
  justify-content: flex-start;
  grid-area: filters;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

@media (max-width: 640px) {
  .search-filters {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Filters Bar */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.filters-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.filters-bar label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filters-bar select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Results Section */
.results-section {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.results-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.results-count {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ========================================
   Tire Card
   ======================================== */

.tire-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.tire-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tire-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.tire-brand {
  display: inline-block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.tire-model {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.tire-specs {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9375rem;
}

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

.spec-value {
  font-weight: 600;
  color: var(--text-primary);
}

.tire-actions {
  padding: 1rem 1.5rem 1.5rem;
}

.buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.buy-btn:hover {
  background: var(--primary-light);
}

/* ========================================
   Message Cards (Error, No Results, Hint)
   ======================================== */

.message-section {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.message-card {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 400px;
}

.message-card svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.message-card.error svg {
  color: var(--error);
}

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

.message-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ========3rem 0 6rem==========================
   Info Sections (How it Works, Size Guide)
   ======================================== */

.info-section {
  padding: 6rem 0;
  background: var(--surface);
}

.info-section.alt {
  background: var(--surface-alt);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: 3.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 2rem 2rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 1.25rem;
}

.step h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ========================================
   Brands Section
   ======================================== */

.brands-section {
  padding: 6rem 0;
  background: var(--primary);
  color: white;
}

.brands-section .section-title {
  color: white;
}

.brands-section .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

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

.brand-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.brand-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.brand-card p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* ========================================
   Size Guide Grid
   ======================================== */

.size-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.size-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
}

.size-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.size-example {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.size-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
}

.size-card p em {
  font-style: italic;
  color: var(--text-primary);
}

.size-tip {
  margin-top: 2.5rem;
  padding: 1.25rem 1.75rem;
  background: linear-gradient(135deg, var(--accent-light) 0%, #fef3c7 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.size-tip strong {
  color: var(--text-primary);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6rem;
  margin-bottom: 3rem;
  align-items: start;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 5rem;
}

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ========================================
   Loading Spinner
   ======================================== */

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 6rem 0 1.5rem;
  }
  
  .info-section {
    padding: 2rem 0 4rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }

  .search-card {
    padding: 1.5rem;
  }

  .search-mode-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .search-form {
    gap: 0.0rem;
  }

  .advanced-inputs {
    flex-direction: column;
    align-items: stretch;
  }
  
  .separator {
    display: none;
  }
  
  .trust-badges {
    gap: 1rem;
  }
  
  .badge {
    font-size: 0.8125rem;
  }
  
  .filters-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  .steps-grid,
  .size-guide-grid {
    grid-template-columns: 1fr;
  }
  
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    gap: 2rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .brands-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .trust-badges {
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
  }
  
  .badge {
    width: auto;
    justify-content: center;
    padding: 0;
  }
  
  .search-filters {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    padding: 1.5rem 0 1rem;
    margin-top: -0.75rem;
  }
  
  .search-filters .filter-group {
    width: 100%;
  }
  
  .search-filters .filter-group:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }
  
  .search-filters label {
    font-size: 0.875rem;
  }
  
  .search-filters select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 0.9375rem;
  }
  
  .search-filters .checkbox-label {
    padding: 0.25rem 0;
    font-size: 0.9375rem;
  }
  
  .search-filters .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   Legal Pages
   ======================================== */

.legal-page {
  padding: 8rem 0 4rem;
  min-height: calc(100vh - 200px);
}

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

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.legal-content section {
  margin-bottom: 2.5rem;
}

.legal-content h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.legal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.legal-content address {
  font-style: normal;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-hover);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.legal-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--surface-alt);
}

.legal-table td {
  color: var(--text-secondary);
}

.legal-updated {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 6rem 0 3rem;
  }
  
  .legal-content h1 {
    font-size: 1.875rem;
  }
  
  .legal-table {
    font-size: 0.875rem;
  }
  
  .legal-table th,
  .legal-table td {
    padding: 0.625rem 0.75rem;
  }
}

/* ========================================
   Cookie Consent Banner
   ======================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--surface);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.cookie-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
}

.cookie-text h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-text h3 svg {
  width: 24px;
  height: 24px;
  color: var(--cta);
}

.cookie-text p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.cookie-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-text a:hover {
  color: var(--accent-hover);
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  white-space: nowrap;
}

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

.cookie-btn-primary:hover {
  background: var(--accent-hover);
}

.cookie-btn-secondary {
  background: var(--surface-alt);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.cookie-btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--text-muted);
}

.cookie-btn-link {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
}

.cookie-btn-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Cookie Settings Panel */
.cookie-settings {
  display: none;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

.cookie-banner.show-settings .cookie-settings {
  display: block;
}

.cookie-banner.show-settings .cookie-main {
  display: none;
}

.cookie-settings-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cookie-settings-header button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cookie-settings-header button:hover {
  background: var(--surface-alt);
  color: var(--text-primary);
}

.cookie-settings-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.cookie-options {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cookie-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
}

.cookie-option-toggle {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.cookie-option-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.cookie-option-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-option-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.cookie-option-info p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.cookie-option-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  background: var(--text-muted);
  color: white;
  border-radius: 9999px;
  margin-left: 0.5rem;
  font-weight: 500;
}

.cookie-settings-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .cookie-banner-content {
    padding: 1.25rem;
  }
  
  .cookie-main {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
  
  .cookie-settings-buttons {
    flex-direction: column;
  }
  
  .cookie-option {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .cookie-option-toggle {
    order: 2;
    margin-top: 0;
  }
}

/* ========================================
   Article Pages
   ======================================== */

.article-page {
  padding: 8rem 0 4rem;
  min-height: calc(100vh - 200px);
}

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

.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.article-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

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

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

.article-content section {
  margin-bottom: 3rem;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  padding-top: 1rem;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:not(.btn):hover {
  color: var(--accent-hover);
}

/* Table of Contents */
.table-of-contents {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.table-of-contents h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-top: 0;
}

.table-of-contents ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: var(--accent);
  text-decoration: none;
}

.table-of-contents a:hover {
  text-decoration: underline;
}

/* Info Boxes */
.info-box {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.info-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Stat Boxes */
.stat-box {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Size Tables */
.size-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.size-table th,
.size-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.size-table th {
  background: var(--surface-alt);
  font-weight: 600;
  color: var(--text-primary);
}

.size-table td {
  color: var(--text-secondary);
}

.size-table tbody tr:hover {
  background: var(--surface-alt);
}

/* Checklist */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.checklist-item:hover {
  background: var(--border-light);
}

.checklist-item input {
  margin-top: 0.25rem;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.checklist-item span {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Feature Lists */
.feature-list {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.feature-item {
  padding: 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
}

.feature-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.feature-item p {
  margin: 0;
  color: var(--text-secondary);
}

/* Highlight Section */
.highlight-section {
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.highlight-section h2 {
  padding-top: 0;
}

.intro-highlight {
  font-size: 1.125rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--accent-light), #f0f9ff);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.intro-highlight p {
  margin: 0;
  color: var(--text-primary);
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.cta-section h2 {
  color: white;
  margin-bottom: 0.5rem;
  padding-top: 0;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

/* Related Articles */
.related-articles {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.related-articles h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-top: 0;
}

.article-cards {
  display: grid;
  gap: 1rem;
}

.article-card {
  display: block;
  padding: 1.5rem;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.article-card h3 {
  color: var(--text-primary);
  font-size: 1.125rem;
  margin: 0 0 0.5rem 0;
}

.article-card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.9375rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

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

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

/* Navigation active state */
.nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Responsive Article Styles */
@media (max-width: 768px) {
  .article-page {
    padding: 6rem 0 3rem;
  }
  
  .article-header h1 {
    font-size: 1.75rem;
  }
  
  .article-subtitle {
    font-size: 1.0625rem;
  }
  
  .article-meta {
    flex-wrap: wrap;
  }
  
  .table-of-contents {
    padding: 1rem 1.25rem;
  }
  
  .size-table {
    font-size: 0.8125rem;
  }
  
  .size-table th,
  .size-table td {
    padding: 0.625rem 0.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .cta-section {
    padding: 2rem 1.5rem;
  }
  
  .highlight-section {
    padding: 1.5rem;
  }
}

/* ========================================
   Legacy Compatibility (keep for JS)
   ======================================== */

.filters {
  display: none;
}

#filters:not([hidden]) {
  display: flex;
}
