/* ===== SleepSupportGuide — Enhanced Professional Design ===== */
:root{
  --bg: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  --surface: #ffffff;
  --muted: #f1f5f9;
  --ink: #1e293b;
  --ink-2: #475569;
  --divider: #e2e8f0;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-ink: #065f46;
  --accent-50: #ecfdf5;
  --accent-light: #d1fae5;
  --warn-50: #fef3c7;
  --warn-border: #f59e0b;
  --link: #0ea5e9;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Source Sans 3", "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.section {
  padding: 40px 0;
  border-top: 1px solid var(--divider);
}

.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: 1.2fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

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

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.2px;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.brand img {
  height: 40px;
  width: auto;
  transition: all 0.2s ease;
}

.brand:hover img {
  transform: scale(1.05);
}

.brand:hover {
  color: var(--accent-hover);
}

nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

nav a:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--muted) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--divider);
  padding: 60px 0;
}

.hero .container {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
  color: var(--ink);
}

.hero p.lead {
  font-size: 22px;
  color: var(--ink-2);
  margin: 0 0 24px;
  line-height: 1.5;
}

.hero .img-wrap {
  height: 300px;
  background: var(--surface) url("/assets/img/hero-home.jpg") center/cover no-repeat;
  border: 1px solid var(--divider);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero .img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-radius: 16px;
}

/* Meta/Disclosure */
.meta-bar {
  background: var(--warn-50);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: #92400e;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

/* Cards & Tiles */
.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

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

.card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  color: var(--ink);
}

.card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
}

.tiles {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tile {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

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

.tile .txt {
  max-width: 65%;
}

.tile .cta {
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 16px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-50);
  transform: translateY(-1px);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--success-bg);
  color: var(--accent-ink);
  border: 1px solid var(--success);
  border-radius: 20px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
}

.badge-top {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  font-weight: 800;
}

.badge-value {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  font-weight: 800;
}

.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin: 2rem 0;
}

#supplements-comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: white;
}

#supplements-comparison-table thead {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

#supplements-comparison-table thead th {
  padding: 1.5rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

#supplements-comparison-table thead th:not(:last-child):after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: #e2e8f0;
}

#supplements-comparison-table tbody td {
  padding: 2rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

/* Enhanced button styling for table CTAs */
#supplements-comparison-table .btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4) !important;
}

#supplements-comparison-table .btn-ghost:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border-color: #047857;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
  transform: translateY(-2px) scale(1.02);
}

#supplements-comparison-table .btn-primary:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  border-color: rgba(255,255,255,0.3);
}

/* Product cell styling */
.product-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-image {
  flex-shrink: 0;
}

.product-image img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.product-info {
  flex: 1;
}

/* Enhanced badge styling */
.badge {
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  animation: badge-shine 3s ease-in-out infinite;
}

@keyframes badge-shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
  100% { transform: translateX(-100%) rotate(45deg); }
}

#supplements-comparison-table tbody tr:nth-child(even) {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

#supplements-comparison-table tbody tr:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(44, 90, 160, 0.12);
}

.table thead th {
  background: linear-gradient(135deg, var(--muted) 0%, #e2e8f0 100%);
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 18px 16px;
  border-bottom: 2px solid var(--divider);
  border-right: 1px solid var(--border);
  box-sizing: border-box !important;
}

.table thead th:last-child {
  border-right: none;
}

.table thead th:nth-child(1) { width: 28% !important; } /* Product column */
.table thead th:nth-child(2) { width: 28% !important; } /* Key Points */
.table thead th:nth-child(3) { width: 12% !important; } /* Form column */
.table thead th:nth-child(4) { width: 20% !important; } /* Notes */
.table thead th:nth-child(5) { width: 12% !important; } /* Action */

.table tbody td {
  padding: 20px 16px;
  border-top: 1px solid var(--divider);
  vertical-align: top;
  color: var(--ink-2);
  line-height: 1.5;
  border-right: 1px solid var(--border);
  box-sizing: border-box !important;
}

.table tbody td:last-child {
  border-right: none;
}

/* Match tbody column widths to header */
.table tbody td:nth-child(1) { width: 28% !important; } /* Product column */
.table tbody td:nth-child(2) { width: 28% !important; } /* Key Points */
.table tbody td:nth-child(3) { width: 12% !important; } /* Form column */
.table tbody td:nth-child(4) { width: 20% !important; } /* Notes */
.table tbody td:nth-child(5) { width: 12% !important; } /* Action */

.table tbody td:nth-child(2) {
  font-size: 14px;
  line-height: 1.6;
}

.table tbody td:nth-child(2) br {
  margin: 4px 0;
}

.table tbody td .small {
  font-size: 13px;
  line-height: 1.4;
}

.table tbody tr:nth-child(even) {
  background: #fafcff;
}

.table tbody tr:hover {
  background: var(--accent-light);
}

.table .top-pick {
  background: linear-gradient(135deg, var(--accent-50) 0%, #ecfdf5 100%);
  position: relative;
}

.table .top-pick::before {
  content: "#1 CHOICE";
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.table .k {
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
}

/* Rating Stars */
.rating {
  color: #fbbf24;
  font-size: 18px;
  margin: 4px 0;
}

/* FAQ & Footer */
details {
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 0;
}

details[open] {
  background: #fbfeff;
}

/* Enhanced Footer Styling */
footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h3 {
  color: #10b981;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-section p {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

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

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

.footer-section ul li a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: #10b981;
}

.footer-bottom {
  border-top: 1px solid #475569;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

footer .container {
  padding: 0 24px;
}

/* Testimonials */
.testimonial {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 16px;
  color: var(--ink-2);
}

.testimonial-author {
  font-weight: 600;
  color: var(--accent);
}

/* Social Proof */
.social-proof {
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
  text-align: center;
  font-weight: 600;
  color: var(--accent-ink);
}

/* Product Images in Tables */
.product-cell {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.table tbody td:first-child {
  vertical-align: top;
}

.product-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
  align-self: flex-start;
  position: relative;
  transition: all 0.3s ease;
}

.product-image:before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-image:hover:before {
  opacity: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

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

.product-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.product-info .k {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .rating {
  margin: 6px 0;
  font-size: 16px;
  color: #f59e0b;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.product-info .small {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-info .badge {
  margin-top: 6px;
}

/* Key Points Styling */
.key-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-point {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  position: relative;
  padding-left: 16px;
}

.key-point:before {
  content: '•';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 16px;
}

/* Responsive Table Adjustments */
@media (max-width: 1200px) {
  .product-cell {
    min-width: 240px;
  }
  
  .product-image {
    width: 75px;
    height: 75px;
  }
  
  .table thead th:nth-child(1) { width: 30%; }
  .table thead th:nth-child(2) { width: 26%; }
}

@media (max-width: 768px) {
  .table {
    font-size: 12px;
  }
  
  .product-cell {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 180px;
    gap: 12px;
  }
  
  .product-image {
    width: 60px;
    height: 60px;
  }
  
  .table thead th,
  .table tbody td {
    padding: 12px 8px;
  }
}

/* Helpers */
.m0 { margin: 0; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.small { font-size: 15px; color: var(--ink-2); }
.large { font-size: 20px; }

a { color: var(--link); }
img { max-width: 100%; display: block; }

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

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Mobile Responsiveness */
/* Enhanced FAQ Dropdown Styling */
.faq-container {
  max-width: 800px;
  margin: 2rem auto;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  font-weight: 600;
  font-size: 16px;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  margin-bottom: 0;
}

.faq-question:hover {
  background: #f8fafc;
  color: #10b981;
}

.faq-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
}

.faq-item.active .faq-toggle {
  background: #10b981;
  color: white;
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem;
  color: #475569;
  line-height: 1.6;
  display: none;
  animation: fadeInDown 0.3s ease;
}

.faq-item.active .faq-answer {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Discreet Footer for Legal Pages */
.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-legal-left {
  flex: 0 0 auto;
}

.footer-legal-right {
  text-align: right;
  flex: 1;
}

.footer-links {
  margin-bottom: 8px;
  font-size: 12px;
  color: #8a8a8a;
}

.footer-links a {
  color: #8a8a8a;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-disclosure {
  font-size: 12px;
  color: #8a8a8a;
  margin: 0;
}

.footer-legal-left p {
  font-size: 12px;
  color: #8a8a8a;
  margin: 0;
}

/* ===== MOBILE OPTIMIZATIONS ===== */

/* Small tablets and large phones (portrait) */
@media (max-width: 768px) {
  /* Container and spacing */
  .container {
    padding: 16px;
    max-width: 100%;
  }
  
  /* Navigation fixes */
  nav ul {
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  nav a {
    padding: 8px 12px;
    font-size: 16px;
  }
  
  .brand {
    font-size: 20px;
  }
  
  /* Typography responsive scaling */
  h1 {
    font-size: 28px !important;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  h2 {
    font-size: 24px !important;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  h3 {
    font-size: 20px !important;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }
  
  /* Body text optimization */
  body {
    font-size: 16px !important;
    line-height: 1.6;
  }
  
  /* Hero sections */
  .hero {
    padding: 2rem 0;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero h1 {
    font-size: clamp(24px, 6vw, 32px) !important;
    text-align: center !important;
  }
  
  .hero p.lead {
    font-size: 18px !important;
  }
  
  /* Grid layouts - force single column */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }
  
  /* All inline grids should stack on mobile */
  [style*="grid-template-columns: 1fr 1fr"] {
    display: block !important;
  }
  
  [style*="grid-template-columns: 1fr 1fr"] > div {
    margin-bottom: 1rem;
  }
  
  /* Table responsiveness */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    border-radius: 8px;
    margin: 1rem 0;
  }
  
  /* MOBILE-ONLY TABLE FORMATTING - Complete Override */
  #supplements-comparison-table {
    width: 1800px !important;
    min-width: 1800px !important;
    font-size: 18px !important;
    table-layout: fixed !important;
  }
  
  #supplements-comparison-table th,
  #supplements-comparison-table td {
    padding: 24px 20px !important;
    line-height: 1.6 !important;
    vertical-align: top !important;
    word-wrap: break-word !important;
  }
  
  /* Product column - wide space for images and names */
  #supplements-comparison-table th:nth-child(1),
  #supplements-comparison-table td:nth-child(1) {
    width: 350px !important;
  }
  
  /* Key Points column - lots of space for bullet points */
  #supplements-comparison-table th:nth-child(2),
  #supplements-comparison-table td:nth-child(2) {
    width: 450px !important;
  }
  
  /* Form column */
  #supplements-comparison-table th:nth-child(3),
  #supplements-comparison-table td:nth-child(3) {
    width: 200px !important;
  }
  
  /* Notes column - space for descriptions */
  #supplements-comparison-table th:nth-child(4),
  #supplements-comparison-table td:nth-child(4) {
    width: 500px !important;
  }
  
  /* Action column - space for buttons */
  #supplements-comparison-table th:nth-child(5),
  #supplements-comparison-table td:nth-child(5) {
    width: 300px !important;
  }
  
  .product-cell {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    width: 100%;
  }
  
  .product-image {
    width: 50px;
    height: 50px;
  }
  
  .product-info {
    text-align: center !important;
  }
  
  .product-info .k {
    font-size: 14px !important;
  }
  
  /* Button and CTA optimizations */
  .btn, .cta {
    padding: 12px 16px !important;
    font-size: 14px !important;
    min-width: 120px;
    text-align: center;
  }
  
  /* Cards and tiles */
  .card, .tile {
    padding: 16px;
    margin-bottom: 1rem;
  }
  
  .tile {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .tile .txt {
    max-width: 100%;
  }
  
  /* Section spacing */
  .section {
    padding: 2rem 0;
  }
  
  /* Footer responsive */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-legal {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-legal-right {
    text-align: center;
  }
}

/* Small phones (portrait) */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  /* Extra small typography */
  h1 {
    font-size: 24px !important;
  }
  
  h2 {
    font-size: 20px !important;
  }
  
  h3 {
    font-size: 18px !important;
  }
  
  body {
    font-size: 15px !important;
  }
  
  /* Navigation for very small screens */
  nav ul {
    gap: 0.5rem;
  }
  
  nav a {
    padding: 6px 8px;
    font-size: 14px;
  }
  
  .brand {
    font-size: 18px;
  }
  
  /* Extra tight spacing */
  .section {
    padding: 1.5rem 0;
  }
  
  .hero {
    padding: 1.5rem 0;
  }
  
  /* Smaller buttons on tiny screens */
  .btn, .cta {
    padding: 10px 12px !important;
    font-size: 13px !important;
    min-width: 100px;
  }
  
  /* More aggressive table scrolling */
  #supplements-comparison-table {
    min-width: 500px;
    font-size: 12px;
  }
  
  #supplements-comparison-table th,
  #supplements-comparison-table td {
    padding: 8px 6px !important;
    min-width: 100px;
  }
  
  .product-image {
    width: 40px;
    height: 40px;
  }
}

/* Landscape phones */
@media (max-width: 896px) and (orientation: landscape) {
  /* Optimize for landscape mobile viewing */
  .hero {
    padding: 1.5rem 0;
  }
  
  .section {
    padding: 1.5rem 0;
  }
  
  .hero .container {
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
  }
}

/* Mobile Product Layout Override - Force stacked centered layout */
@media (max-width: 768px) {
  /* Completely override product cell layout on mobile */
  .product-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }
  
  .product-image {
    width: 80px !important; 
    height: 80px !important; 
    margin: 0 auto !important;
    flex-shrink: 0 !important;
    align-self: center !important;
  }
  
  .product-info {
    text-align: center !important;
    width: 100% !important;
  }
  
  .product-info .k {
    text-align: center !important;
    margin-bottom: 8px !important;
  }
  
  .product-info .rating {
    text-align: center !important;
    justify-content: center !important;
  }
  
  .product-info .small {
    text-align: center !important;
  }
  
  .product-info .badge {
    text-align: center !important;
    display: block !important;
    margin: 8px auto 0 !important;
  }
}