/* ===== JERSEY MIKE'S NUTRITION CALCULATOR — MAIN STYLES ===== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Nunito:wght@400;600;700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --red: #c8102e;
  --red-dark: #a00c24;
  --red-light: #f5e9eb;
  --gold: #f5a623;
  --gold-light: #fef6e4;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --card: #ffffff;
  --bg: #f4f6f9;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --green: #22c55e;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.22s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --card: #1e2235;
  --bg: #13162b;
  --text: #e8eaf6;
  --text-muted: #9ca3af;
  --border: #2d3557;
  --red-light: #2d1520;
  --gold-light: #2a2210;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.45);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER / NAV ===== */
header {
  background: var(--dark);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 20px; color: white;
}
.logo-text {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px; color: white;
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.logo-text span { color: var(--gold); }

nav ul {
  list-style: none; display: flex; gap: 4px;
}
nav ul a {
  color: #cdd5e0;
  font-weight: 700; font-size: 0.9rem;
  padding: 6px 14px; border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}
nav ul a:hover, nav ul a.active {
  background: var(--red); color: white;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }

#theme-toggle {
  background: rgba(255,255,255,0.1);
  border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: var(--transition);
  color: white;
}
#theme-toggle:hover { background: rgba(255,255,255,0.2); }

.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; flex-direction: column; gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: white; border-radius: 2px; transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2d1520 50%, var(--red-dark) 100%);
  padding: 72px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: white; letter-spacing: 0.04em;
  line-height: 1.05; margin-bottom: 16px;
}
.hero h1 span { color: var(--gold); }
.hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1.15rem; margin-bottom: 32px;
  font-weight: 600;
}
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white; font-size: 0.85rem; font-weight: 700;
  padding: 6px 14px; border-radius: 100px;
  backdrop-filter: blur(4px);
}

/* ===== CONTAINER ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== SECTION HEADING ===== */
.section-heading {
  text-align: center; margin-bottom: 40px;
}
.section-heading h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.2rem; letter-spacing: 0.03em;
  color: var(--text);
}
.section-heading h2 span { color: var(--red); }
.section-heading p { color: var(--text-muted); margin-top: 6px; }

/* ===== CALCULATOR LAYOUT ===== */
.calculator-section { padding: 56px 0; }
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
}

/* ===== MENU PANEL ===== */
.menu-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 {
  font-size: 1.15rem; font-weight: 800;
  margin-bottom: 12px;
}
.search-bar {
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 10px 42px 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--red); }
.search-bar .search-icon {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}

/* Category tabs */
.category-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.cat-tab {
  padding: 5px 14px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent; cursor: pointer;
  color: var(--text-muted); transition: var(--transition);
}
.cat-tab:hover { border-color: var(--red); color: var(--red); }
.cat-tab.active { background: var(--red); border-color: var(--red); color: white; }

/* Size selector */
.size-filter {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-bottom: 1px solid var(--border);
}
.size-filter label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.size-filter select {
  flex: 1; padding: 7px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem; cursor: pointer;
}
.size-filter select:focus { outline: none; border-color: var(--red); }

/* Menu items list */
.menu-items-list {
  max-height: 560px; overflow-y: auto;
  padding: 8px 0;
}
.menu-items-list::-webkit-scrollbar { width: 5px; }
.menu-items-list::-webkit-scrollbar-track { background: transparent; }
.menu-items-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.menu-item-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; cursor: pointer;
  transition: var(--transition); border-bottom: 1px solid var(--border);
}
.menu-item-row:last-child { border-bottom: none; }
.menu-item-row:hover { background: var(--red-light); }

.item-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--red-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.item-info { flex: 1; min-width: 0; }
.item-name {
  font-weight: 700; font-size: 0.9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-meta {
  font-size: 0.78rem; color: var(--text-muted); font-weight: 600;
}
.item-cal {
  font-weight: 800; color: var(--red);
  font-size: 0.9rem; white-space: nowrap;
}
.add-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); border: none; cursor: pointer;
  color: white; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: var(--transition);
  font-weight: 700;
}
.add-btn:hover { background: var(--red-dark); transform: scale(1.1); }

/* category header in list */
.category-label {
  padding: 10px 24px 4px;
  font-size: 0.7rem; font-weight: 800;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== SUMMARY PANEL ===== */
.summary-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky; top: 80px;
}
.summary-header {
  background: var(--red);
  padding: 20px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.summary-header h3 {
  color: white; font-weight: 800; font-size: 1.1rem;
}
.summary-header p { color: rgba(255,255,255,0.8); font-size: 0.85rem; }

/* Calorie ring */
.calorie-display {
  padding: 24px;
  display: flex; flex-direction: column; align-items: center;
  border-bottom: 1px solid var(--border);
}
.calorie-ring-wrap { position: relative; width: 140px; height: 140px; margin-bottom: 8px; }
.calorie-ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill {
  fill: none; stroke: var(--red); stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 376;
  stroke-dashoffset: 376;
  transition: stroke-dashoffset 0.6s cubic-bezier(.4,0,.2,1);
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-calories {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.4rem; line-height: 1; color: var(--text);
}
.ring-label { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.dv-text { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

/* Macro bars */
.macro-bars { padding: 16px 24px; border-bottom: 1px solid var(--border); }
.macro-row { margin-bottom: 12px; }
.macro-row:last-child { margin-bottom: 0; }
.macro-label-row {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; font-weight: 700; margin-bottom: 4px;
}
.macro-bar-track {
  height: 7px; background: var(--border); border-radius: 10px; overflow: hidden;
}
.macro-bar-fill {
  height: 100%; border-radius: 10px; transition: width 0.5s ease;
}
.bar-protein { background: #3b82f6; }
.bar-carbs { background: var(--gold); }
.bar-fat { background: var(--red); }

/* Nutrition grid */
.nutrition-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border);
  margin: 0 24px 16px; border-radius: var(--radius-sm); overflow: hidden;
}
.nutrition-cell {
  background: var(--card); padding: 10px 12px;
  text-align: center;
}
.nutrition-cell .val {
  font-weight: 800; font-size: 1rem; color: var(--text);
}
.nutrition-cell .lbl {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 600;
}

/* Order list */
.order-section { padding: 0 24px 8px; }
.order-section h4 {
  font-size: 0.85rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px;
}
.order-empty {
  text-align: center; padding: 24px 0;
  color: var(--text-muted); font-size: 0.88rem;
}
.order-empty .empty-icon { font-size: 2.5rem; margin-bottom: 8px; }

.order-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.order-item:last-child { border-bottom: none; }
.order-item-name { flex: 1; font-weight: 700; min-width: 0; }
.order-item-name small { display: block; color: var(--text-muted); font-weight: 600; font-size: 0.77rem; }
.order-item-cal { color: var(--red); font-weight: 800; white-space: nowrap; }
.qty-controls {
  display: flex; align-items: center; gap: 4px;
}
.qty-btn {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent;
  cursor: pointer; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: var(--transition);
}
.qty-btn:hover { background: var(--red); border-color: var(--red); color: white; }
.qty-val { font-weight: 800; min-width: 18px; text-align: center; }
.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px; padding: 2px;
  transition: var(--transition);
}
.remove-btn:hover { color: var(--red); }

/* Action buttons */
.summary-actions {
  padding: 16px 24px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.btn-primary {
  display: block; width: 100%;
  padding: 13px;
  background: var(--red); color: white;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: 0.95rem;
  cursor: pointer; text-align: center;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-secondary {
  display: block; width: 100%;
  padding: 11px;
  background: transparent; color: var(--text-muted);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 0.88rem;
  cursor: pointer; text-align: center;
  transition: var(--transition);
}
.btn-secondary:hover { border-color: var(--red); color: var(--red); }

/* ===== BLOG SECTION ===== */
.blog-section { padding: 56px 0; }
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  text-decoration: none; color: inherit;
  display: block;
}
.blog-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.blog-card-img {
  width: 100%; height: 190px;
  background: linear-gradient(135deg, var(--red-dark), var(--dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  position: relative; overflow: hidden;
}
.blog-card-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
}
.blog-tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: var(--red); color: white;
  font-size: 0.72rem; font-weight: 800;
  padding: 4px 10px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.blog-card-body { padding: 22px; }
.blog-card-body h3 {
  font-weight: 800; font-size: 1.05rem; margin-bottom: 8px;
  line-height: 1.35;
}
.blog-card-body p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.blog-card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted); font-weight: 600;
}
.read-more {
  color: var(--red); font-weight: 800;
  display: flex; align-items: center; gap: 4px;
}

/* ===== DISCLAIMER ===== */
.disclaimer {
  background: var(--gold-light);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 0 0 28px;
  font-size: 0.83rem; color: var(--text-muted);
  display: flex; gap: 10px; align-items: flex-start;
}
.disclaimer-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ===== FOOTER ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px; margin-bottom: 28px;
}
.footer-col h4 {
  color: white; font-weight: 800; margin-bottom: 14px; font-size: 0.95rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  color: rgba(255,255,255,0.6); font-size: 0.88rem;
  transition: var(--transition); text-decoration: none;
}
.footer-col ul a:hover { color: white; }
.footer-bottom {
  max-width: 1180px; margin: 0 auto;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center; font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  background: var(--dark);
  color: white; padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease forwards;
  pointer-events: none;
}
.toast.hide { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(16px); }
}

/* ===== HIGHLIGHT BANNER ===== */
.stats-strip {
  background: var(--red);
  padding: 14px 20px;
}
.stats-strip-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 10px;
}
.stat-item { text-align: center; color: white; }
.stat-item .stat-num {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.6rem; line-height: 1;
}
.stat-item .stat-lbl { font-size: 0.75rem; opacity: 0.85; font-weight: 600; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  .summary-panel { position: static; }
}
@media (max-width: 600px) {
  nav ul { display: none; }
  .hamburger { display: flex; }
  nav.open ul {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--dark2); padding: 12px;
    gap: 2px; z-index: 99;
  }
  nav.open ul a { display: block; padding: 10px 16px; }
  .hero h1 { font-size: 2.6rem; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ===== BLOG PAGE ===== */
.blog-page { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.blog-page h1 {
  font-family: 'Bebas Neue', cursive;
  font-size: 2.6rem; letter-spacing: 0.03em;
  color: var(--text); margin-bottom: 16px;
}
.blog-page .blog-meta {
  color: var(--text-muted); font-size: 0.88rem;
  margin-bottom: 28px; display: flex; gap: 16px; flex-wrap: wrap;
  font-weight: 600;
}
.blog-page h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.7rem; letter-spacing: 0.02em; margin: 32px 0 12px;
  color: var(--red);
}
.blog-page h3 {
  font-size: 1.1rem; font-weight: 800; margin: 22px 0 8px;
}
.blog-page p { margin-bottom: 16px; line-height: 1.75; color: var(--text); }
.blog-page ul, .blog-page ol {
  margin: 0 0 18px 24px; line-height: 1.75;
}
.blog-page li { margin-bottom: 6px; }
.blog-page .highlight-box {
  background: var(--red-light); border-left: 4px solid var(--red);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0;
}
.blog-page table {
  width: 100%; border-collapse: collapse;
  margin: 20px 0; font-size: 0.9rem;
}
.blog-page th {
  background: var(--red); color: white;
  padding: 10px 14px; text-align: left; font-weight: 700;
}
.blog-page td {
  padding: 9px 14px; border-bottom: 1px solid var(--border);
}
.blog-page tr:nth-child(even) td { background: var(--red-light); }
.blog-hero-img {
  width: 100%; height: 260px;
  background: linear-gradient(135deg, var(--red-dark), var(--dark));
  border-radius: var(--radius); margin-bottom: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}
.breadcrumb {
  font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 20px; font-weight: 600;
}
.breadcrumb a { color: var(--red); }
