/* ===== GroceryBudgetCalc.com - Global Styles ===== */
/* Theme: Avocado Green + Cream White (Fresh Grocery Theme) */
/* DO NOT modify navigation structure or page width across pages */

:root {
  --primary: #34A853;
  --primary-dark: #2D8F47;
  --primary-light: #E8F5E9;
  --accent: #66BB6A;
  --accent-light: #C8E6C9;
  --bg-cream: #F8F5F0;
  --bg-white: #FFFFFF;
  --text-primary: #2D3748;
  --text-secondary: #5A6B7F;
  --text-muted: #8899AA;
  --border: #E2E8F0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ===== Unified Container Width (ALL pages must match) ===== */
.container {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
}

/* ===== Top Navigation (100% identical across ALL pages) ===== */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-logo img { height: 36px; width: auto; }

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.5rem;
}

/* ===== Calculator Box (MANDATORY: NO ads inside) ===== */
.calculator-box {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--bg-white);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

.calculator-box h2,
.calculator-box h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-cream) 100%);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

/* ===== Ad Space ===== */
.ad-banner {
  text-align: center;
  margin: 0.75rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Prevent double container nesting shrinking */
.ad-banner.container {
  width: 100%;
}

/* Reserve space only when ad is filled */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
ins.adsbygoogle[data-ad-status="filled"],
ins.adsbygoogle:not([data-ad-status]) {
  min-height: 90px;
}

/* ===== Content Cards ===== */
.content-section {
  padding: 1rem 0;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover { color: var(--primary); }

.card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card .btn {
  display: inline-block;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

/* ===== Forms & Inputs ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.925rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-primary);
  transition: border-color var(--transition);
  font-family: inherit;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(52,168,83,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== Results Box ===== */
.result-box {
  background: linear-gradient(135deg, var(--primary-light), #F1F8E9);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1.5rem;
  text-align: center;
}

.result-box h3 {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.result-box .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.result-box .amount small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.result-table th,
.result-table td {
  padding: 0.6rem 0.8rem;
  text-align: center;
  font-size: 0.9rem;
}

.result-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}

.result-table td {
  border-bottom: 1px solid var(--border);
}

.result-table tr:last-child td { border-bottom: none; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover { color: var(--primary); }

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== FAQ Section ===== */
.faq-list { margin: 0 auto; }

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.25rem;
  font-size: 0.975rem;
  font-weight: 600;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question:hover { color: var(--primary); }

.faq-question .faq-icon {
  font-size: 1.1rem;
  transition: transform var(--transition);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }

.faq-answer {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.7;
  display: none;
}

.faq-item.open .faq-answer { display: block; }

/* ===== External Links Section ===== */
.external-links {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.external-links h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.external-links ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.5rem;
}

.external-links li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 0.925rem;
  transition: color var(--transition);
}

.external-links li a:hover { color: var(--primary); text-decoration: underline; }

/* ===== Sibling Sites Section ===== */
.sibling-sites {
  padding: 1.5rem 0;
}

.sibling-sites h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.sibling-sites ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.5rem;
}

.sibling-sites li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.sibling-sites li a:hover { color: var(--primary); text-decoration: underline; }

/* ===== Intro Content (420+ words for SEO) ===== */
.page-intro {
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.page-intro h2 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.page-intro h2:first-child { margin-top: 0; }

.page-intro p { margin-bottom: 1.1rem; }

.page-intro ul,
.page-intro ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.page-intro li { margin-bottom: 0.5rem; }

.page-intro .divider {
  text-align: center;
  color: var(--accent);
  margin: 1rem 0;
  font-size: 1.2rem;
  letter-spacing: 0.3em;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  text-align: center;
  padding: 2rem 0 1.5rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-cream) 100%);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.page-header h1 span { color: var(--primary); }

.page-header p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ===== Disclaimer Highlight ===== */
.disclaimer-highlight {
  background: #FFF8E1;
  border-left: 4px solid #FFA000;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-weight: 600;
  color: #5D4037;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.925rem;
}

/* ===== Footer (100% identical across ALL pages) ===== */
.site-footer {
  background: var(--text-primary);
  color: #CBD5E0;
  padding: 2rem 0 1.5rem;
  margin-top: 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.footer-col a {
  display: block;
  color: #CBD5E0;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid #4A5568;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #A0AEC0;
}

.footer-bottom a { color: var(--accent); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ===== Breadcrumb ===== */
/* ===== Comparison Table ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.comparison-table th {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.comparison-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}

.comparison-table tr:nth-child(even) td { background: #FAFBFC; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.highlight { color: var(--primary); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  html { font-size: 15px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: block; }

  .hero h1 { font-size: 1.8rem; }

  .tabs { overflow-x: auto; }

  .tab-btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .form-row { grid-template-columns: 1fr; }

  .card-grid { grid-template-columns: 1fr; }

  .calculator-box { padding: 1.25rem; }

  .result-box .amount { font-size: 1.8rem; }

  .result-table { font-size: 0.8rem; }
  .result-table th, .result-table td { padding: 0.4rem 0.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .results-actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .section-title { font-size: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --primary: #43CE6A;
  --primary-dark: #34A853;
  --primary-light: #1A3A1A;
  --accent: #66BB6A;
  --accent-light: #1A3A1A;
  --bg-cream: #1A1D21;
  --bg-white: #252830;
  --text-primary: #E8E8E8;
  --text-secondary: #A0AEC0;
  --text-muted: #718096;
  --border: #3A3F4B;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] .site-header { background: #1E2028; border-color: var(--border); }
[data-theme="dark"] .result-box { background: linear-gradient(135deg, #1A3A1A, #1A2D1A); border-color: #2D5A2D; }
[data-theme="dark"] .card { background: #2A2D35; }
[data-theme="dark"] .calculator-box { background: var(--bg-white); }
[data-theme="dark"] .site-footer { background: #121418; }
[data-theme="dark"] .footer-bottom { border-color: #3A3F4B; }
[data-theme="dark"] .comparison-table tr:nth-child(even) td { background: #2A2D35; }
[data-theme="dark"] .external-links { border-color: #3A3F4B; }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #1A3A1A 0%, #1A1D21 100%); }
[data-theme="dark"] .page-header { background: linear-gradient(135deg, #1A3A1A 0%, #1A1D21 100%); }
[data-theme="dark"] .disclaimer-highlight { background: #2D2610; border-color: #8D6E00; color: #FFD54F; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #2A2D35; color: #E8E8E8; border-color: var(--border); }
[data-theme="dark"] .ad-banner { background: transparent; }

.theme-toggle {
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-left: 0.5rem;
  color: var(--text-secondary);
}

.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Skip Navigation Link (hidden by default) ===== */
.skip-link {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
}

/* ===== Results Actions Bar ===== */
.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.btn-sm:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-sm:active { transform: scale(0.97); }

.btn-sm.saved {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== Share Popover ===== */
.share-popover {
  position: absolute;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  display: none;
  z-index: 100;
  min-width: 200px;
}

.share-popover.open { display: block; }

.share-popover a,
.share-popover button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
}

.share-popover a:hover,
.share-popover button:hover { background: var(--primary-light); }

/* ===== CountUp Animation ===== */
.counter-animate {
  display: inline-block;
  transition: color 0.3s;
}

.counter-animate.updated { color: var(--primary); }

/* ===== Chart Container ===== */
.chart-container {
  margin: 1.5rem 0;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.chart-container canvas {
  width: 100% !important;
  max-height: 350px;
}

/* ===== Pro Tip Card ===== */
.pro-tip {
  background: linear-gradient(135deg, #FFF8E1, #FFFDE7);
  border: 1px solid #FFE082;
  border-left: 4px solid #FFA000;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.925rem;
  color: #5D4037;
  line-height: 1.7;
}

.pro-tip strong {
  color: #E65100;
  display: block;
  margin-bottom: 0.25rem;
}

[data-theme="dark"] .pro-tip { background: #2D2610; border-color: #8D6E00; color: #FFD54F; }
[data-theme="dark"] .pro-tip strong { color: #FFB74D; }

/* ===== Social Counter ===== */
.social-counter {
  text-align: center;
  padding: 1.5rem;
  margin: 1rem 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.social-counter .count-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.social-counter .count-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

[data-theme="dark"] .toast { background: #E8E8E8; color: #1A1D21; }

/* ===== Floating Action Button ===== */
.fab-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9990;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.6rem;
}

.fab-main {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: transform 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-main:hover { background: var(--primary-dark); transform: scale(1.08); }
.fab-main.active { transform: rotate(45deg); background: var(--text-primary); }

.fab-menu {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.fab-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.15s;
  white-space: nowrap;
}

.fab-item:hover { background: var(--primary-light); }
.fab-item i { width: 16px; text-align: center; color: var(--primary); }

[data-theme="dark"] .fab-main { background: var(--primary); }
[data-theme="dark"] .fab-item { background: #1E2028; border-color: #3A3F4B; color: #E8E8E8; }

/* ===== USDA Badge ===== */
.usda-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.5rem;
}

.usda-badge img { height: 20px; width: auto; }

/* ===== Save Scenarios Panel ===== */







/* ===== Print Styles ===== */
@media print {
  @page { margin: 1.5cm; }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }

  .site-header,
  .site-footer,
  .ad-banner,
  .nav-toggle,
  .theme-toggle,
  .results-actions .btn-sm:not(.print-only),
  .share-popover,
  .social-counter,
  .sibling-sites,
  .external-links,
  .card-grid,
  .toast,
  .fab-container,
  .calculator-box .tabs,
  .skip-link,
  .page-intro .divider,
  .faq-list,
  .waste-card,
  .social-compare,
  .inflation-alert,
  .dietary-options,
  .toggle-row,
  .quick-look,
  .results-actions,
  .chart-container,
  .theme-toggle,
  ins.adsbygoogle {
    display: none !important;
  }

  .container { max-width: 100%; width: 100%; }
  .calculator-box { box-shadow: none; border: 1px solid #ccc; padding: 1rem; }
  .result-box { border: 2px solid #34A853; background: #fff; }
  .hero, .page-header { background: #fff !important; padding: 1rem 0; border-bottom: 2px solid #34A853; }
  .hero h1, .page-header h1 { font-size: 18pt; }

  .results-actions { display: none !important; }

  .print-header {
    display: block !important;
    text-align: center;
    border-bottom: 2px solid #34A853;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }

  .print-header .print-logo { font-size: 16pt; font-weight: 800; color: #34A853; }
  .print-header .print-url { font-size: 9pt; color: #666; }

  .print-footer {
    display: block !important;
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #ccc;
    font-size: 8pt;
    color: #666;
  }

  .chart-container { break-inside: avoid; max-height: 250px; }
  table { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .pro-tip { background: #FFF8E1 !important; border-left: 4px solid #FFA000 !important; }
}

.print-header, .print-footer { display: none; }

/* ===== Dietary Preference Checkboxes ===== */
.dietary-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dietary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  margin: 0.25rem;
  border: 2px solid var(--border);
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-white);
  color: var(--text-secondary);
  transition: all var(--transition);
  user-select: none;
}

.dietary-chip:hover { border-color: var(--primary); color: var(--primary); }
.dietary-chip.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }

.dietary-chip .adjust-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}

/* ===== Range Slider ===== */
.slider-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.slider-group label {
  font-weight: 600;
  font-size: 0.925rem;
  min-width: 80px;
  color: var(--text-primary);
}

.slider-group input[type="range"] {
  -webkit-appearance: none;
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }

.slider-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===== Quick Look Snapshot Table ===== */
.quick-look {
  margin: 1.5rem 0;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.quick-look h4 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.quick-look table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.quick-look th {
  background: var(--primary);
  color: #fff;
  padding: 0.55rem 0.7rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
}

.quick-look th:first-child { text-align: left; border-radius: var(--radius-sm) 0 0 0; }
.quick-look th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.quick-look td {
  padding: 0.55rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.quick-look td:first-child { text-align: left; font-weight: 600; }

.quick-look tr:last-child td { border-bottom: none; }

.quick-look .highlight-cell { background: var(--primary-light); font-weight: 700; color: var(--primary-dark); }

/* ===== Toggle Switch ===== */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.toggle-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ===== Waste Savings Card ===== */
.waste-card {
  background: linear-gradient(135deg, #FFF3E0, #FFF8E1);
  border: 1px solid #FFE082;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1.25rem;
  text-align: center;
}

.waste-card .waste-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #E65100;
}

.waste-card .waste-label {
  color: #5D4037;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

[data-theme="dark"] .waste-card { background: linear-gradient(135deg, #2D2010, #2D2610); border-color: #6D4C00; }
[data-theme="dark"] .waste-card .waste-amount { color: #FFB74D; }
[data-theme="dark"] .waste-card .waste-label { color: #FFD54F; }

/* ===== Scenario Compare ===== */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.compare-card {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.compare-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52,168,83,0.15); }

.compare-card h5 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.compare-card .amount { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.compare-card .vs { font-size: 1.2rem; font-weight: 700; color: var(--text-muted); margin-top: 0.5rem; }

/* ===== Social Comparison Bar ===== */
.social-compare {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.social-compare .bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin: 0.75rem 0;
  position: relative;
  overflow: hidden;
}

.social-compare .bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width 0.8s ease;
}

.social-compare .bar-marker {
  position: absolute;
  top: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  transform: translateX(-50%);
  transition: left 0.8s ease;
}

.social-compare .bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Inflation Alert ===== */
.inflation-alert {
  background: var(--primary-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.inflation-alert strong { color: var(--primary-dark); }

