:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --accent: #c05621;
    --text: #1a202c;
    --text-light: #4a5568;
    --bg: #ffffff;
    --card-bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
}
/* WCAG AA: Ensure 4.5:1 contrast for text on backgrounds */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: var(--text); background: var(--card-bg); }
.container { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; width: 100%; box-sizing: border-box; }

/* Header */
header { background: var(--white); box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; flex-wrap: wrap; gap: 1rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; flex-shrink: 0; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav-links a:hover { color: var(--primary); }

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.nav-toggle-label { display: none; cursor: pointer; padding: 0.5rem; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--primary); user-select: none; font-size: 0; }
.nav-toggle-label:hover { color: var(--primary-light); }
/* CSS hamburger icon (replaces Unicode to avoid font rendering issues) */
.nav-toggle-label::before { content: ''; display: block; width: 22px; height: 2px; background: currentColor; box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor; }

/* Hero - WCAG AA: white text on dark blue meets contrast requirements */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #ffffff; padding: 3rem 0; text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: 0.95; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; text-decoration: none; transition: transform 0.2s; }
.btn-primary { background: var(--accent); color: white; border: none; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; color: white; border: 2px solid white; }
.btn-outline:hover { background: rgba(255,255,255,0.2); }

/* Page hero (for non-home pages) */
.page-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: #ffffff; padding: 2rem 0; text-align: center; }
.page-hero h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.page-hero p { font-size: 1rem; opacity: 0.95; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding: 2rem 0; text-align: center; }
.feature { font-size: 2rem; margin-bottom: 0.5rem; }
.flag-icon { vertical-align: middle; display: inline-block; }
.feature-flag { width: 1.5em; height: auto; max-height: 1.5em; object-fit: contain; }
.feature h3 { font-size: 1rem; color: var(--text); }

/* Products */
.section { padding: 2.5rem 0; }
.section h2 { font-size: 1.75rem; margin-bottom: 1rem; color: var(--primary); }
.section-subtitle { color: var(--text-light); margin-bottom: 2rem; }
.section-intro-center { text-align: center; }
.section-intro-center .section-subtitle { max-width: 640px; margin-left: auto; margin-right: auto; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.product-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: box-shadow 0.2s; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.product-icon { display: block; font-size: 1.75rem; margin-bottom: 0.5rem; }
.product-badge { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 600; background: var(--primary); color: white; border-radius: 4px; margin-bottom: 0.5rem; }
.product-card h3 { font-size: 1.1rem; margin: 0.5rem 0; color: var(--text); }
.product-rating { color: #1a202c; font-size: 0.9rem; margin-bottom: 0.5rem; }
/* Star emoji ⭐ for ratings - dark text ensures readability on light card background */
.product-features { list-style: none; font-size: 0.9rem; color: var(--text-light); margin-bottom: 1rem; }
.product-features li { padding: 0.2rem 0; padding-left: 1.2rem; position: relative; }
.product-features li::before { content: "•"; position: absolute; left: 0; color: var(--accent); }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.product-link { display: inline-block; color: var(--primary); font-weight: 600; text-decoration: none; margin-top: 0.5rem; }
.product-link:hover { text-decoration: underline; }
.product-inner { padding: 1.25rem; }

/* Guides */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.guide-card { background: var(--white); border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; color: inherit; display: block; transition: box-shadow 0.2s; }
.guide-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.guide-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.guide-card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--primary); }
.guide-card p { font-size: 0.9rem; color: var(--text-light); }

/* Guide sections (guides page) */
.main-content { padding: 2rem 0; }
.guide-section { background: var(--white); padding: 2rem; border-radius: 8px; margin-bottom: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.guide-section h2 { color: var(--primary); margin-bottom: 1rem; font-size: 1.5rem; }
.guide-section h3 { color: var(--primary-light); margin: 1rem 0 0.5rem; font-size: 1.15rem; }
.guide-section p { margin-bottom: 1rem; }
.guide-section ul { margin: 1rem 0 1rem 1.5rem; }
.guide-section li { margin-bottom: 0.5rem; }
.updated { font-size: 0.875rem; color: var(--text-light); margin-bottom: 1rem; }

/* Contact form */
.contact-form { background: var(--white); padding: 2rem; border-radius: 8px; max-width: 600px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.contact-form label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 1rem; font-family: inherit; }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: 600; cursor: pointer; }
.contact-form button:hover { background: var(--primary-light); }
.contact-info { margin-top: 2rem; }
.contact-info p { margin-bottom: 0.5rem; }

/* Contact page - embedded form, centered layout */
.contact-section { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.contact-form-wrapper { margin: 1.5rem auto; max-width: 640px; }
.contact-form-wrapper { width: 100%; overflow-x: hidden; }
.contact-form-wrapper iframe { display: block; width: 100%; max-width: 100%; min-height: 600px; border: 1px solid var(--border); border-radius: 8px; }
.contact-form-fallback { margin-top: 0.75rem; font-size: 0.9rem; }
.contact-form-fallback a { color: var(--primary); font-weight: 600; text-decoration: none; }
.contact-form-fallback a:hover { text-decoration: underline; }

/* SEO Section */
.seo-section { background: var(--white); padding: 2.5rem 0; margin-top: 2rem; border-top: 1px solid var(--border); }
.seo-section h2 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary); }
.seo-section p { margin-bottom: 1rem; color: var(--text); max-width: 800px; }

/* Footer */
footer { background: var(--primary); color: white; padding: 2rem 0; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { font-size: 0.9rem; margin-bottom: 0.75rem; opacity: 0.9; }
.footer-grid a, .footer-grid span { display: block; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; margin-bottom: 0.25rem; }
.footer-grid a:hover { color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding-top: 1.5rem; text-align: center; font-size: 0.875rem; opacity: 0.9; }
.footer-bottom a { color: white; margin: 0 0.5rem; }

/* Blog/Guides page - card grid (air-fryer style) */
.blog-category-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; margin-bottom: 2rem; justify-content: center; }
.blog-category-tabs a { padding: 0.5rem 1rem; border-radius: 6px; background: var(--white); color: var(--text); text-decoration: none; font-weight: 500; border: 1px solid var(--border); transition: all 0.2s; white-space: nowrap; }
.blog-category-tabs a:hover, .blog-category-tabs a.active { background: var(--primary); color: white; border-color: var(--primary); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { background: var(--white); border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; color: inherit; display: block; transition: box-shadow 0.2s; }
.blog-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.blog-card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.blog-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--primary); line-height: 1.4; }
.blog-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }
.blog-card .read-more { display: inline-block; margin-top: 0.75rem; color: var(--primary); font-weight: 600; font-size: 0.9rem; }
.blog-card .read-more:hover { text-decoration: underline; }
.blog-about { background: var(--white); padding: 2rem; border-radius: 8px; margin-top: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.blog-about h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--primary); }
.blog-about p { margin-bottom: 1rem; color: var(--text); }
/* Article page */
.article-back { display: inline-block; margin-bottom: 1.5rem; color: var(--primary); font-weight: 600; text-decoration: none; }
.article-back:hover { text-decoration: underline; }
.article-meta { font-size: 0.9rem; color: var(--text-light); margin-bottom: 1.5rem; }
.article-content h2 { font-size: 1.35rem; margin: 2rem 0 1rem; color: var(--primary); }
.article-content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; color: var(--primary-light); }
.article-content p { margin-bottom: 1rem; }
.article-content p.caption { font-size: 0.9rem; color: var(--text-light); font-style: italic; margin-top: -0.5rem; margin-bottom: 1.5rem; }
.article-content ul { margin: 1rem 0 1rem 1.5rem; }
.article-content ol { margin: 1rem 0 1rem 1.5rem; }
.article-content ol.indented-list { margin-left: 2.5rem; margin-top: 0.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote { border-left: 4px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--text-light); font-style: italic; }
.article-content blockquote ul { margin: 0.5rem 0 0 1rem; }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; opacity: 0.85; }
.article-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.article-table th, .article-table td { border: 1px solid var(--border); padding: 0.75rem 1rem; text-align: left; }
.article-table th { background: var(--card-bg); font-weight: 600; color: var(--primary); }
.article-content .qc-default-table-wrapper { padding: 1rem 0; overflow-x: auto; }
.article-content .qc-default-table-wrapper table { width: 100%; border-collapse: collapse; margin: 0; }
.article-content .qc-default-table-wrapper th, .article-content .qc-default-table-wrapper td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.article-content .qc-default-table-wrapper th { background: var(--card-bg); font-weight: 600; color: var(--primary); }
.article-content .qc-default-table-wrapper table p { margin: 0; }
.article-faq { margin: 1.5rem 0; }
.article-faq dt { font-weight: 600; color: var(--primary); margin-top: 1rem; margin-bottom: 0.35rem; }
.article-faq dd { margin-left: 1rem; margin-bottom: 0.5rem; color: var(--text-light); }

/* Article pages: more horizontal padding on smartphone so text isn’t tight to edges */
/* Article pages: explicit horizontal padding for cross-browser consistency (fixes Brave, Bind, etc.) */
.container.main-content {
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 768px) {
  .container.main-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .article-back { margin-top: 1.5rem; }
}

/* Article pages: more horizontal padding on iPad/tablet so text isn't tight to edges */
@media (min-width: 769px) and (max-width: 1024px) {
  .container.main-content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ========== Mobile nav: hamburger menu (≤768px) ========== */
@media (max-width: 768px) {
  nav { flex-wrap: nowrap; position: relative; }
  .nav-toggle-label { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { display: block; padding: 0.75rem 1rem; min-height: 44px; align-items: center; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* ========== RESPONSIVE: Smartphone (320px - 480px) ========== */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .logo { font-size: 1.15rem; max-width: 60%; }
  nav { padding: 0.75rem 0; gap: 0.5rem; }
  .nav-links { gap: 0; font-size: 0.9rem; }
  .hero { padding: 2rem 0; }
  .hero h1 { font-size: 1.35rem; line-height: 1.3; }
  .hero p { font-size: 0.95rem; }
  .hero-btns { flex-direction: column; gap: 0.75rem; }
  .btn { padding: 0.875rem 1.25rem; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .page-hero { padding: 1.5rem 0; }
  .page-hero h1 { font-size: 1.35rem; }
  .page-hero p { font-size: 0.9rem; }
  .features { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 0; }
  .product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .section { padding: 1.5rem 0; }
  .section h2 { font-size: 1.4rem; }
  .section-subtitle { font-size: 0.95rem; }
  .product-inner { padding: 1rem; }
  .product-card h3 { font-size: 1rem; word-break: break-word; }
  .guides-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; gap: 1rem; }
  .blog-card { padding: 1.25rem; }
  .blog-card h3 { font-size: 1rem; }
  .blog-category-tabs { gap: 0.35rem; margin-top: 0.1rem; margin-bottom: 1.5rem; padding-top: 0.75rem; }
  .guides-page .container.main-content { padding-top: 1.5rem; }
  .blog-category-tabs a { padding: 0.5rem 0.75rem; font-size: 0.85rem; }
  .guide-section { padding: 1.25rem; margin-bottom: 1.5rem; }
  .guide-section h2 { font-size: 1.25rem; }
  .contact-form-wrapper { padding: 0; }
  .contact-form-wrapper iframe { min-height: 450px !important; }
  .guide-section { overflow-x: hidden; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .footer-bottom { padding-top: 1rem; font-size: 0.8rem; }
  .footer-bottom a { display: inline-block; margin: 0.25rem; }
  .seo-section { padding: 1.5rem 0; }
  .seo-section h2 { font-size: 1.25rem; }
  .article-content h2 { font-size: 1.2rem; }
  .article-content h3 { font-size: 1.05rem; }
}

/* Responsive tables: horizontal scroll when content overflows */
.table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin: 1.5rem 0; }
.article-content .article-table { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.article-content .qc-default-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ========== RESPONSIVE: Tablet (481px - 768px) ========== */
@media (min-width: 481px) and (max-width: 768px) {
  .container { padding: 0 1.25rem; }
  .logo { font-size: 1.25rem; }
  .blog-category-tabs { margin-top: 2rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-form-wrapper iframe { min-height: 500px !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== RESPONSIVE: Small tablet / large phone (481px - 600px) ========== */
@media (min-width: 481px) and (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ========== RESPONSIVE: Tablet landscape (769px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Prevent horizontal overflow on all viewports */
html { overflow-x: hidden; }
body { overflow-x: hidden; }

/* Ensure images scale within containers */
img { max-width: 100%; height: auto; }

/* Prevent long words/URLs from overflowing on small screens */
.article-content, .product-card, .blog-card, .guide-card { overflow-wrap: break-word; word-wrap: break-word; }

/* Touch-friendly: ensure tap targets are at least 44px */
@media (pointer: coarse) {
  .nav-links a { padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
  .blog-card, .guide-card { min-height: 44px; }
  .product-link { padding: 0.5rem 0; min-height: 44px; display: inline-flex; align-items: center; }
}
