/* ============================================================
   PANDA EXPRESS NUTRITION CALCULATOR — STYLESHEET
   Aesthetic: Clean editorial health-app / warm whites + red
   Fonts: Sora (UI) + DM Serif Display (headlines)
   ============================================================ */

:root {
  --red:         #d63031;
  --red-dark:    #b71c1c;
  --red-light:   #fff1f0;
  --orange:      #e17055;
  --green:       #00b894;
  --blue:        #0984e3;
  --yellow:      #fdcb6e;

  --bg:          #faf8f5;
  --surface:     #ffffff;
  --surface2:    #f5f1ec;
  --border:      #e8e0d8;
  --border-dark: #d0c8be;

  --text:        #1a1210;
  --text-2:      #4a3f38;
  --muted:       #8a7e78;

  --font-ui:     'Sora', sans-serif;
  --font-head:   'DM Serif Display', Georgia, serif;

  --radius:      10px;
  --radius-lg:   18px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.10);
  --transition:  0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
}

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

/* ── HEADER ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 14px 0;
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark { font-size: 24px; }
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1.1; }
.logo-primary {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  color: var(--red);
  letter-spacing: -0.02em;
}
.logo-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.main-nav { display: flex; gap: 8px; }
.nav-link {
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--surface2); color: var(--red); }
.nav-link.active { background: var(--red-light); color: var(--red); font-weight: 600; }

/* ── HERO ── */
.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 70% 50%, rgba(214,48,49,0.05) 0%, transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(225,112,85,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 280px; }
.hero-badge {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 62px);
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: var(--red); }
.hero-desc {
  color: var(--text-2);
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.btn-hero {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(214,48,49,0.3);
}
.btn-hero:hover { background: var(--red-dark); transform: translateY(-2px); }
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.stat-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
}
.stat-pill:nth-child(1) { animation-delay: 0.1s; }
.stat-pill:nth-child(2) { animation-delay: 0.18s; }
.stat-pill:nth-child(3) { animation-delay: 0.26s; }
.stat-pill:nth-child(4) { animation-delay: 0.34s; }
.stat-pill:nth-child(5) { animation-delay: 0.42s; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── CALCULATOR ── */
.calc-section { padding: 48px 0 60px; }
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

/* Menu Panel */
.menu-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.panel-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 {
  font-family: var(--font-head);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 2px;
}
.panel-header p { color: var(--muted); font-size: 14px; }

/* Category Tabs */
.cat-tabs {
  display: flex;
  padding: 16px 24px 0;
  gap: 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cat-tab {
  padding: 8px 18px;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cat-tab:hover { color: var(--red); }
.cat-tab.active { color: var(--red); border-bottom-color: var(--red); background: var(--red-light); }

/* Menu Items Grid */
.menu-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  max-height: 520px;
  overflow-y: auto;
}
.menu-items::-webkit-scrollbar { width: 6px; }
.menu-items::-webkit-scrollbar-track { background: var(--surface2); }
.menu-items::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
.menu-item-btn {
  background: var(--surface);
  border: none;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-ui);
}
.menu-item-btn:hover { background: var(--red-light); }
.menu-item-btn:active { background: #ffd5d5; }
.item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.item-cal {
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
}
.item-macros {
  font-size: 11px;
  color: var(--muted);
}
.item-add-hint {
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  opacity: 0;
  transition: opacity var(--transition);
}
.menu-item-btn:hover .item-add-hint { opacity: 1; }

/* Tray Panel */
.tray-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
}
.tray-header {
  padding: 20px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.tray-header h2 {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--text);
}
.btn-clear {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-clear:hover { color: var(--red); border-color: var(--red); }

.tray-items {
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
}
.tray-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
.empty-icon { font-size: 28px; margin-bottom: 6px; opacity: 0.5; }
.tray-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface2);
  margin-bottom: 5px;
  animation: popIn 0.2s ease;
}
@keyframes popIn { from { opacity:0; transform: scale(0.95); } to { opacity:1; transform: scale(1); } }
.tray-item-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); }
.tray-item-cal { font-size: 13px; font-weight: 700; color: var(--red); }
.tray-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}
.qty-btn {
  width: 22px; height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.qty-num { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }

/* Nutrition Summary */
.nutrition-summary {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.summary-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 600;
}
.macro-bars { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.macro-row { display: flex; align-items: center; gap: 8px; }
.macro-label { font-size: 12px; font-weight: 500; color: var(--text-2); width: 52px; flex-shrink: 0; }
.macro-bar-wrap { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.macro-bar { height: 100%; border-radius: 4px; width: 0%; transition: width 0.4s ease; }
.cal-bar  { background: var(--red); }
.pro-bar  { background: #6c5ce7; }
.carb-bar { background: var(--blue); }
.fat-bar  { background: var(--orange); }
.sod-bar  { background: #636e72; }
.macro-val { font-size: 12px; font-weight: 700; color: var(--text); width: 44px; text-align: right; flex-shrink: 0; }
.daily-ref { font-size: 10px; color: var(--muted); margin-bottom: 16px; text-align: center; border-top: 1px solid var(--border); padding-top: 10px; }

/* Calorie Gauge */
.calorie-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.gauge-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.gauge-svg { width: 100%; height: 100%; }
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-num { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1; }
.gauge-label { font-size: 11px; color: var(--muted); }
.gauge-legend { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot.red { background: var(--red); }
.dot.gray { background: #f0e8e0; border: 1px solid #d0c8be; }
.gauge-pct { font-size: 12px; font-weight: 600; color: var(--red); margin-top: 4px; }

.btn-copy-summary {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-copy-summary:hover { color: var(--text); border-color: var(--border-dark); }
.copy-msg { display: block; text-align: center; font-size: 12px; color: var(--green); min-height: 18px; margin-top: 4px; }

/* ── TIPS SECTION ── */
.tips-section { padding: 60px 0; background: var(--surface); border-top: 1px solid var(--border); }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 34px);
  color: var(--text);
  margin-bottom: 32px;
  text-align: center;
}
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.tip-card {
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid transparent;
}
.tip-card.green  { background: #f0faf6; border-color: #b2e4d0; }
.tip-card.blue   { background: #f0f7ff; border-color: #b3d4f5; }
.tip-card.orange { background: #fff7f0; border-color: #f5d0b0; }
.tip-icon { font-size: 32px; margin-bottom: 12px; }
.tip-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  color: var(--text);
  margin-bottom: 12px;
}
.tip-card ul { list-style: none; padding: 0; }
.tip-card li { font-size: 14px; color: var(--text-2); padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.tip-card li:last-child { border-bottom: none; }
.tips-cta-text { text-align: center; color: var(--muted); font-size: 15px; }
.tips-cta-text a { color: var(--red); text-decoration: none; font-weight: 600; }
.tips-cta-text a:hover { text-decoration: underline; }

/* ── FAQ ── */
.faq-section { padding: 60px 0; background: var(--bg); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color var(--transition);
}
.faq-item[open] { border-color: var(--red); }
.faq-item summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  padding-right: 22px;
  position: relative;
  user-select: none;
}
.faq-item summary::after { content: '+'; position: absolute; right: 0; color: var(--red); font-size: 18px; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 12px; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* ── BLOG CTA ── */
.blog-cta-section { padding: 40px 0 60px; }
.blog-cta-card {
  background: var(--red);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.blog-cta-text h2 {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 30px);
  color: #fff;
  margin-bottom: 10px;
}
.blog-cta-text p { color: rgba(255,255,255,0.85); margin-bottom: 20px; font-size: 16px; }
.btn-outline {
  display: inline-block;
  border: 2px solid #fff;
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
}
.btn-outline:hover { background: #fff; color: var(--red); }
.blog-cta-icon { font-size: 72px; flex-shrink: 0; opacity: 0.7; }

/* ── FOOTER ── */
.site-footer {
  background: var(--text);
  padding: 48px 0 28px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.site-footer .logo-primary { color: #fff; }
.site-footer .logo-sub { color: rgba(255,255,255,0.5); }
.footer-desc { color: rgba(255,255,255,0.45); font-size: 13px; margin-top: 8px; max-width: 400px; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px; transition: color var(--transition); }
.footer-nav a:hover { color: #fff; }
.footer-legal { color: rgba(255,255,255,0.3); font-size: 12px; }

/* ── BLOG STYLES ── */
.blog-page-hero { padding: 60px 0 40px; background: var(--surface); border-bottom: 1px solid var(--border); }
.blog-page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  color: var(--text);
  margin-bottom: 8px;
}
.blog-page-hero p { color: var(--muted); font-size: 17px; font-style: italic; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding: 48px 0 80px; }
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--red); }
.blog-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--red-light), #fff3e0);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.blog-card-body { padding: 22px; }
.blog-card-tag { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--red); font-weight: 600; margin-bottom: 8px; }
.blog-card h2 { font-family: var(--font-head); font-size: 19px; color: var(--text); margin-bottom: 8px; line-height: 1.35; }
.blog-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.blog-card-date { font-size: 12px; color: var(--muted); margin-top: 12px; opacity: 0.7; }
.blog-back-cta { background: var(--red-light); border: 1px solid rgba(214,48,49,0.2); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin-bottom: 60px; }
.blog-back-cta h2 { font-family: var(--font-head); font-size: 22px; color: var(--text); margin-bottom: 10px; }
.blog-back-cta p { color: var(--muted); margin-bottom: 18px; font-size: 15px; }
.btn-red { display: inline-block; background: var(--red); color: #fff; text-decoration: none; padding: 12px 28px; border-radius: var(--radius); font-weight: 600; font-size: 14px; transition: background var(--transition); }
.btn-red:hover { background: var(--red-dark); }

/* ── ARTICLE STYLES ── */
.article-hero { padding: 64px 0 40px; background: var(--surface); border-bottom: 1px solid var(--border); }
.article-tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--red); font-weight: 600; margin-bottom: 14px; }
.article-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 46px);
  color: var(--text);
  line-height: 1.2;
  max-width: 760px;
  margin-bottom: 16px;
}
.article-meta { color: var(--muted); font-size: 14px; }
.article-meta a { color: var(--red); text-decoration: none; }
.article-body { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.article-body h2 { font-family: var(--font-head); font-size: clamp(20px, 2.5vw, 28px); color: var(--text); margin: 44px 0 14px; }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--text); margin: 28px 0 10px; }
.article-body p { color: var(--text-2); margin-bottom: 18px; font-size: 16px; line-height: 1.75; }
.article-body strong { color: var(--text); }
.article-body ul, .article-body ol { color: var(--text-2); padding-left: 22px; margin-bottom: 18px; }
.article-body li { margin-bottom: 8px; font-size: 16px; }
.article-body a { color: var(--red); }
.article-inline-cta { background: var(--red); border-radius: var(--radius); padding: 28px 32px; text-align: center; margin: 40px 0; }
.article-inline-cta p { color: rgba(255,255,255,0.9); margin-bottom: 14px; font-size: 16px; }
.placeholder-block {
  background: var(--surface2);
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius);
  padding: 22px;
  margin: 22px 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}
.placeholder-block strong { color: var(--red); display: block; margin-bottom: 6px; font-style: normal; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .tray-panel { position: static; }
  .tips-grid { grid-template-columns: 1fr; }
  .blog-cta-card { flex-direction: column; text-align: center; }
}
@media (max-width: 680px) {
  .faq-grid { grid-template-columns: 1fr; }
  .menu-items { grid-template-columns: 1fr; }
  .hero-stats { display: none; }
  .blog-cta-card { padding: 32px 24px; }
}
