/* ============================================
   Modern CSS - Fallback & Enhancement Styles
   ============================================ */

* {
  box-sizing: border-box;
}

/* ============================================
   Typography & Base
   ============================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: #1a1a1a;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin: 2.5rem 0 1.5rem 0; padding-bottom: 0.75rem; border-bottom: 1px solid #e5e5e5; }
h2:first-child { margin-top: 0; }
h3 { font-size: 1.25rem; margin-bottom: 1rem; }

p {
  margin-bottom: 1.2rem;
  line-height: 1.7;
  color: #555;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

/* a:hover {
  opacity: 0.8;
} */

ul, ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: #555;
}

/* ============================================
   Layout & Container
   ============================================ */

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

/* Reduce padding on very small screens for zoom compatibility */
@media (max-width: 375px) {
  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 320px) {
  .container {
    padding: 0 0.75rem;
  }
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   Header
   ============================================ */

header {
background-color: rgba(255, 255, 255, 0.95);
border-bottom: 1px solid #e5e5e5;
padding: 0;
position: sticky;
top: 0;
z-index: 1000;
backdrop-filter: blur(8px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo a {
  color: #1a1a1a;
}

header nav {
  display: flex;
  gap: 1.5rem;
}

header nav a {
  color: #555;
  font-size: 0.95rem;
  font-weight: 500;
}

header nav a:hover {
  color: #0066cc;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  animation: slideDown 0.2s ease-out;
}

.mobile-menu.hidden {
  animation: slideUp 0.2s ease-in;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    max-height: 500px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .header-nav {
    display: none !important;
  }
}

/* ============================================
   Main Content
   ============================================ */

main {
  padding: 3rem 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: #0066cc;
  font-weight: 500;
}

.breadcrumb span {
  margin: 0 0.5rem;
  color: #ccc;
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }
  
  .breadcrumb span {
    margin: 0 0.25rem;
  }
}

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

footer {
  background: #1a1a1a;
  color: #ffffff;
  padding: 3rem 0;
  margin-top: 4rem;
}

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

.footer-section h3 {
  color: white;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-section a {
  color: #ccc;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: #0066cc;
}

.footer-bottom {
  text-align: center;
  font-size: 0.9rem;
  color: #999;
  border-top: 1px solid #333;
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer-bottom a {
  color: #ffffff;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Card & Boxes
   ============================================ */

.card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.affiliate-disclosure {
  background: #fffbeb;
  border-left: 4px solid #fbbf24;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: #78350f;
  margin-bottom: 2rem;
  border-radius: 6px;
}

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

.hero {
text-align: center;
padding: 4rem 1.5rem;
background-color: #f8f8f8;
border-bottom: 1px solid #e5e5e5;
margin-bottom: 3rem;
   position: relative;
}

.hero::before {
   content: "";
   position: absolute;
   top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
   z-index: 1;
}

.hero h1 {
font-size: 3rem;
color: #ffffff;
position: relative;
z-index: 2;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-title {
  /* Use relative units for text-shadow so it scales with zoom */
  text-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.5) !important;
}

.hero-image {
  height: 200px;
  display: block;
}

@media (min-width: 600px) {
  .hero-image {
    height: 280px;
  }
}

@media (min-width: 768px) {
  .hero-image {
    height: 350px;
  }
}

.hero-subtitle {
font-size: 1.25rem;
color: #ffffff;
max-width: 650px;
margin: 0 auto 2.5rem;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-content {
max-width: 100%;
position: relative;
z-index: 2;
}

.hero-text {
color: #ffffff;
position: relative;
z-index: 2;
}

.hero-text p {
color: #ffffff;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Device Selector
   ============================================ */

.device-selector {
  background: white;
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  font-size: 0.95rem;
}

.dropdown-search {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

#deviceInput {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: all 0.2s ease;
}

#deviceInput:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dropdown-list.active {
  display: block;
}

.dropdown-category {
  padding: 0.75rem 1rem;
  background: #f8f8f8;
  font-weight: 600;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5e5;
}

.dropdown-item {
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.95rem;
  display: block;
  color: #1a1a1a;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: #e6f2ff;
  color: #0066cc;
}

.dropdown-item small {
  color: #999;
  display: block;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background: #0066cc;
  color: white;
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

.btn-primary:hover {
  background: #0052a3;
}

.btn-secondary {
  background: #f8f8f8;
  color: #0066cc;
  border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
  background: #e6f2ff;
}

.btn-amazon {
  background: #ff9900;
  color: white;
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.8rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  margin-top: 1.5rem;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-amazon:hover {
  background: #e68900;
  color: white;
  opacity: 1;
}

/* ============================================
   Steps & Grid
   ============================================ */

.how-it-works {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 50px;
  height: 50px;
  background: #0066cc;
  color: white;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.9rem;
  color: #555;
}

/* ============================================
   Popular Devices
   ============================================ */

.popular-devices {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

.popular-devices h2 {
  margin-top: 0;
}

.popular-devices > p {
  margin-bottom: 1.5rem;
  color: #555;
}

.popular-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.popular-item {
  background: #f8f8f8;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid #e5e5e5;
  cursor: pointer;
}

.popular-item:hover {
  background: white;
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.popular-item a {
  display: block;
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.popular-item:hover a {
  color: #0066cc;
}

.devices-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.device-tag {
  background: #f8f8f8;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  border: 1px solid #e5e5e5;
  text-align: center;
}

.device-tag a {
  display: block;
  color: #0066cc;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}

.device-tag:hover {
  border-color: #0066cc;
  background: #e6f2ff;
}

/* ============================================
   Features Grid
   ============================================ */

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

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.feature-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80px;
}

.feature-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

/* Category Page Icon Hero */
.category-icon-hero {
  flex-shrink: 0;
}

.category-icon-hero img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
}

/* Device Page Breadcrumb Icon */
.device-breadcrumb-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}

.feature-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #555;
}

/* ============================================
   Search Styles
   ============================================ */

.search-section {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  font-size: 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: block;
}

.search-dropdown.hidden {
  display: none;
}

.search-group-header {
  padding: 0.75rem 1rem;
  background: #f8f8f8;
  font-weight: 600;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5e5;
}

.search-item {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f5f5f5;
  color: #1a1a1a;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.search-item:hover {
  background-color: #e6f2ff;
  color: #0066cc;
}

.search-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.search-item-category {
  font-size: 0.8rem;
  color: #999;
}

/* ============================================
   Answer Box
   ============================================ */

.answer-box {
  background: #e6f2ff;
  border-left: 4px solid #0066cc;
  padding: 2rem;
  margin-bottom: 2.5rem;
  border-radius: 6px;
}

.answer-box h2 {
  margin-top: 0;
  font-size: 1.3rem;
  border: none;
  padding: 0;
}

.answer-text {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0066cc;
}

.answer-explanation {
  font-size: 1rem;
  color: #004d99;
}

/* ============================================
   Specs Grid
   ============================================ */

.quick-reference {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

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

.spec-item {
  padding: 1.25rem;
  background: #f8f8f8;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

@media (max-width: 480px) {
  .spec-item {
    padding: 1rem;
  }
}

@media (max-width: 375px) {
  .spec-item {
    padding: 0.85rem;
  }
}

.spec-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.5rem;
}

.spec-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
}

/* ============================================
   Brands Table
   ============================================ */

.brands-section {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

.brands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.brands-table th,
.brands-table td {
  padding: 1rem;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: middle;
}

.brands-table th {
  background: #1a1a1a;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
}

.brands-table tbody tr {
  background: #ffffff;
}

.brands-table tbody tr:hover {
  background: #f8f8f8;
}

.tier-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.tier-recommended {
  background: #e6f2ff;
  color: #0052a3;
}

.tier-budget {
  background: #fffbeb;
  color: #b45309;
}

.tier-professional {
   background: #e0e7ff;
   color: #3730a3;
}

/* ============================================
   Alternative Cards
   ============================================ */

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

.alternative-card {
  padding: 0;
  transition: all 0.2s ease;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: white;
}

.alternative-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.alternative-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  background: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
}

.alternative-content {
  padding: 1.5rem;
}

.alternative-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.alternative-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0066cc;
  margin-bottom: 1rem;
}

.pros,
.cons {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: #555;
  padding-left: 1.5rem;
  position: relative;
}

.pros::before {
  content: "✓";
  color: #28a745;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.cons::before {
  content: "✗";
  color: #dc3545;
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* ============================================
   FAQ Section
   ============================================ */

.faq-section {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

.faq-item {
  border-bottom: 1px solid #e5e5e5;
  padding: 1.5rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #0066cc;
}

.faq-toggle {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  color: #999;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-toggle.open {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 1rem;
  color: #555;
  line-height: 1.7;
}

.faq-answer.open {
   display: block;
}

/* ============================================
    Related Devices
    ============================================ */

.related-devices {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
}

.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.device-card {
  background: #ffffff;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid #e5e5e5;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
  overflow: hidden;
}

.device-card:hover {
  border-color: #0066cc;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.device-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  flex-shrink: 0;
}

.device-card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  object-position: center;
}

.device-card-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
  padding: 1rem 1.5rem 0 1.5rem;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-card-info {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 0.75rem;
  padding: 0 1.5rem;
}

.device-card-link {
  color: #0066cc;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem 1.5rem 1.5rem;
}

.device-card-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* ============================================
Sidebar Navigation (Tailwind-based, in components.js)
============================================ */

/* Styles removed - using Tailwind classes in templates */

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  main {
    padding: 2rem 0;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  header nav {
    gap: 0;
  }

  header nav a {
    font-size: 0.9rem;
  }

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

  .devices-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .brands-table {
    font-size: 0.9rem;
  }

  .brands-table th,
  .brands-table td {
    padding: 0.75rem 0.5rem;
  }

  .steps-grid {
    gap: 1rem;
  }

  .alternatives-section {
    grid-template-columns: 1fr;
  }

  .footer-content {
     gap: 1.5rem;
   }
}

/* ============================================
   Search Dropdown Mobile Fix
   ============================================ */

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .search-dropdown {
    max-width: calc(100vw - 2rem);
    overflow-y: auto;
    max-height: 300px;
    right: 0;
    left: auto;
  }
}

.search-group-header {
  padding: 0.75rem 1rem;
  background: #f8f8f8;
  font-weight: 600;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5e5;
}

.search-item {
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.95rem;
  display: block;
  color: #1a1a1a;
  text-decoration: none;
}

.search-item:hover {
  background-color: #e6f2ff;
  color: #0066cc;
}

.search-item-name {
  font-weight: 600;
}

.search-item-category {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.25rem;
}

/* ============================================
    Trust Grid Mobile Fix
    ============================================ */

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

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

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

/* ============================================
   Text Shadow Responsive Fix
   ============================================ */

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 480px) {
  h1 {
    text-shadow: none;
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.3);
  }
}

/* ============================================
   Table Scroll Indicators
   ============================================ */

.brands-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  position: relative;
  box-shadow: inset -40px 0 40px -40px rgba(0, 0, 0, 0.1);
}

.brands-table > * {
  scroll-snap-align: start;
}

@media (hover: none) and (pointer: coarse) {
  .brands-table-container::after {
    content: "← Scroll →";
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.75rem;
    color: #999;
    animation: pulse 2s infinite;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================
   Touch Target Size Fix
   ============================================ */

.search-input {
   min-height: 48px;
   padding: 0.75rem 1.5rem 0.75rem 3.5rem;
}

.search-container {
   position: relative;
}

.search-icon {
   position: absolute;
   left: 1.5rem;
   top: 50%;
   transform: translateY(-50%);
   color: #999;
   pointer-events: none;
}

/* ============================================
   CRITICAL MOBILE UX FIXES
   ============================================ */

/* Issue #1: Search Dropdown Overflow on Mobile */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .search-dropdown {
    max-width: calc(100vw - 2rem);
    overflow-y: auto;
    max-height: 300px;
    right: 0;
    left: auto;
  }
}

.search-group-header {
  padding: 0.75rem 1rem;
  background: #f8f8f8;
  font-weight: 600;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5e5;
}

.search-item {
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.95rem;
  display: block;
  color: #1a1a1a;
  text-decoration: none;
}

.search-item:hover {
  background-color: #e6f2ff;
  color: #0066cc;
}

.search-item-name {
  font-weight: 600;
}

.search-item-category {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Issue #2: Hero Section Text Shadow Responsive */
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 480px) {
  h1 {
    text-shadow: none;
  }
}

/* Issue #3: Trust Grid Mobile Columns */
.trust-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 1.5rem;
   max-width: 800px;
   margin: 0 auto;
}

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

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

/* Issue #4: Table Scroll Indicators */
.brands-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  position: relative;
  box-shadow: inset -40px 0 40px -40px rgba(0, 0, 0, 0.1);
}

.brands-table > * {
  scroll-snap-align: start;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Issue #5: Touch Target Sizes - consolidated with main search styles above */

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .hero {
    padding: 1.5rem 1rem;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-height: 48px;
  }

  .btn-primary {
    padding: 0.85rem;
    font-size: 1rem;
    min-height: 48px;
  }

  .answer-text {
    font-size: 1.5rem;
  }

  .spec-value {
    font-size: 1.2rem;
  }

  .popular-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .answer-box {
    padding: 1.5rem;
  }

  .device-selector {
    padding: 1.25rem;
  }

  .specs-grid {
    gap: 1rem;
  }

  .alternatives-section {
    gap: 1rem;
  }

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

  header {
    padding: 1rem 0;
  }

  .logo {
    font-size: 1.1rem;
  }

  a, button, input, select, textarea {
    min-height: 44px;
  }
}

/* ============================================
    Amazon Badges Grid Styling (Consistent)
    ============================================ */

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

.amazon-product-badge {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.amazon-product-badge:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.badge-image {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 180px;
  background: #f9f9f9;
  overflow: hidden;
  padding: 1rem;
  flex-shrink: 0;
  border-bottom: 1px solid #f0f0f0;
}

.badge-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.badge-content {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  flex: 1;
  gap: 0.75rem;
}

.badge-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge-rating {
  font-size: 0.8rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 1.25rem;
}

.badge-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 0.25rem;
}

.badge-link {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: #FF9900;
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-top: auto;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(255, 153, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.badge-link:hover {
  background-color: #FF9900;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
}

.badge-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(255, 153, 0, 0.2);
}

@media (max-width: 768px) {
  .amazon-badges-grid {
    grid-template-columns: 1fr;
  }
  
  .badge-image {
    height: 150px;
  }
}
