/* ================================================
   SMART GYM PLANNER — style.css
   Aesthetic: Warm Sunrise / Athletic Light
   Fonts: Outfit (body) + Playfair Display (accents)
   ================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --bg: #fdf6ef;
  --surface: #ffffff;
  --surface2: #fef2e6;
  --border: rgba(220, 150, 80, 0.15);
  --text: #1a1208;
  --text-muted: #8a7060;
  --text-light: #b89880;
  --orange: #f26e22;
  --orange-lt: #ffa35e;
  --orange-glow: rgba(242, 110, 34, 0.2);
  --coral: #e84b3a;
  --amber: #ffb347;
  --green: #3ec46d;
  --blue: #3a7bd5;
  --purple: #7c5cbf;
  --bmi-under: #3a7bd5;
  --bmi-normal: #3ec46d;
  --bmi-over: #f0a500;
  --bmi-obese: #e84b3a;
  --shadow-sm: 0 2px 12px rgba(180, 100, 30, 0.08);
  --shadow-md: 0 6px 28px rgba(180, 100, 30, 0.13);
  --shadow-lg: 0 14px 48px rgba(180, 100, 30, 0.18);
  --radius: 18px;
  --radius-sm: 10px;
  --transition: 0.24s ease;
}

/* ---------- DARK MODE ---------- */
body.dark-mode {
  --bg: #131210;
  --surface: #1e1c18;
  --surface2: #252219;
  --border: rgba(255, 180, 80, 0.1);
  --text: #f0ebe3;
  --text-muted: #8a7e6a;
  --text-light: #5a5040;
  --orange-glow: rgba(242, 110, 34, 0.15);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 14px 48px rgba(0, 0, 0, 0.6);
}

/* ---------- RESET ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(242, 110, 34, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ================================================
   LOGIN SCREEN
   ================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Remove the fixed background glow when on login screen so it blends in */
.login-screen ~ * body::before { display: none; }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Orange glow blob behind login card */
.login-card::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(242,110,34,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Login logo — now an image instead of emoji */
.login-logo {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.login-logo-img {
  height: 90px;
  width: auto;
  display: block;
  object-fit: contain;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.login-btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  font-size: 1rem;
}

/* Error message shown if fields are empty */
.login-error {
  font-size: 0.82rem;
  color: var(--coral);
  font-weight: 600;
  background: rgba(232, 75, 58, 0.08);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(232, 75, 58, 0.2);
}

.login-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 18px;
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* ================================================
   WELCOME MSG & LOGOUT in header
   ================================================ */
.welcome-msg {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(242, 110, 34, 0.08);
  border: 1px solid rgba(242, 110, 34, 0.2);
  padding: 7px 16px;
  border-radius: 50px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-logout:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(232, 75, 58, 0.06);
}

/* ---------- HEADER ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.header-stripe {
  position: absolute;
  bottom: -10px;
  right: -40px;
  width: 220px;
  height: 60px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--amber) 100%);
  opacity: 0.07;
  transform: skewX(-18deg);
  border-radius: 4px;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
}

.brand-logo {
  height: 80px;
  width: auto;
  display: block;
}

#darkModeBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

#darkModeBtn:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 16px var(--orange-glow);
  transform: translateY(-1px);
}

/* ---------- NAV BAR ---------- */
#mainNav {
  position: sticky;
  top: 73px;
  z-index: 150;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(180, 100, 30, 0.07);
  transition: background var(--transition);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover { color: var(--orange); background: rgba(242, 110, 34, 0.07); }

.nav-link.active {
  color: var(--orange);
  background: rgba(242, 110, 34, 0.1);
  border-bottom: 2px solid var(--orange);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-icon { font-size: 1rem; line-height: 1; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  margin-right: 12px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

section[id] { scroll-margin-top: 130px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 999;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 13px 26px;
  border-radius: 50px;
  box-shadow: 0 6px 24px var(--orange-glow);
  transition: opacity 0.4s ease, transform 0.4s ease;
  letter-spacing: 0.2px;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
}

/* ---------- MAIN ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px 32px;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover { box-shadow: var(--shadow-lg); }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* ---------- DASHBOARD GRID ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-card {
  padding: 24px 26px;
  position: relative;
  overflow: hidden;
}

.dash-card::after {
  content: "";
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--orange) 0%, transparent 70%);
  opacity: 0.08;
}

.dash-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-icon { font-size: 1.6rem; }

.dash-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--surface2);
  color: var(--orange);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}

.dash-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.dash-value-row { display: flex; align-items: center; gap: 14px; }

.dash-value {
  font-family: "Playfair Display", serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.mini-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  overflow: hidden;
}

.mini-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.dash-date {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}

/* ---------- WORKOUT FORM ---------- */
.workout-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.field-group input,
.field-group select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7060' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.field-group input::placeholder { color: var(--text-light); }

.field-group input:focus,
.field-group select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-lt));
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--orange-glow);
  align-self: end;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(242, 110, 34, 0.35);
  filter: brightness(1.07);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--orange);
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px 22px;
  border: 2px solid var(--orange);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  margin-top: 4px;
}

.btn-secondary:hover {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 16px var(--orange-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(232, 75, 58, 0.05);
}

.btn-delete {
  background: none;
  color: var(--coral);
  border: 1px solid rgba(232, 75, 58, 0.3);
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-delete:hover { background: var(--coral); color: #fff; border-color: var(--coral); }

/* ---------- PRESET WORKOUT BUTTONS ---------- */
.preset-section {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.preset-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 12px;
}

.preset-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Individual preset button */
.btn-preset {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-preset:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(242, 110, 34, 0.07);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--orange-glow);
}

/* ---------- WORKOUT TABLE ---------- */
#workoutListWrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.empty-icon { font-size: 2.2rem; opacity: 0.5; }

.workout-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.workout-table thead tr { background: var(--surface2); }

.workout-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
}

.workout-table tbody tr {
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}

.workout-table tbody tr:hover { background: var(--surface2); }
.workout-table td { padding: 13px 16px; vertical-align: middle; }
.workout-table td:first-child { color: var(--text-muted); font-size: 0.78rem; font-weight: 600; }

.diff-badge {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.diff-badge.Beginner  { background: rgba(62, 196, 109, 0.15); color: var(--green); }
.diff-badge.Intermediate { background: rgba(240, 165, 0, 0.15); color: var(--bmi-over); }
.diff-badge.Advanced  { background: rgba(232, 75, 58, 0.15); color: var(--coral); }

.row-new { background: rgba(62, 196, 109, 0.12) !important; transition: background 1.5s ease !important; }

/* ---------- BMI SECTION ---------- */
.bmi-card .section-header { margin-bottom: 20px; }

.bmi-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.bmi-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.bmi-inputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Height unit toggle */
.unit-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.unit-toggle-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
}

.unit-toggle {
  display: flex;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  gap: 0;
}

/* Toggle button — Meters / Feet & Inches */
.unit-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.unit-btn.active {
  background: var(--orange);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.unit-btn:not(.active):hover {
  background: rgba(242, 110, 34, 0.08);
  color: var(--orange);
}

/* Row that holds Feet + Inches inputs side by side */
.feet-inches-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bmi-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.bmi-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}

.bmi-ring-inner { display: flex; flex-direction: column; align-items: center; }

.bmi-num {
  font-family: "Playfair Display", serif;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  transition: color 0.4s ease;
}

.bmi-unit {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bmi-category {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.4s ease;
  text-align: center;
}

.bmi-scale {
  display: flex;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  height: 10px;
  gap: 2px;
}

.scale-seg {
  flex: 1;
  border-radius: 4px;
  opacity: 0.35;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: help;
  font-size: 0.55rem;
  text-align: center;
}

.scale-seg.active { opacity: 1; transform: scaleY(1.3); }
.scale-seg.under  { background: var(--bmi-under); }
.scale-seg.normal { background: var(--bmi-normal); }
.scale-seg.over   { background: var(--bmi-over); }
.scale-seg.obese  { background: var(--bmi-obese); }

.scale-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 600;
}

.bmi-btn-row { display: flex; gap: 10px; align-items: center; }
.bmi-btn-row .btn-secondary { flex: 1; margin-top: 0; }

.btn-reset-bmi {
  background: transparent;
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  margin-top: 4px;
}

.btn-reset-bmi:hover {
  border-color: var(--coral);
  color: var(--coral);
  background: rgba(232, 75, 58, 0.06);
}

.bmi-saved-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* ================================================
   NUTRITION CALCULATOR
   ================================================ */
.nutrition-card {
  position: relative;
}

.nutrition-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(124, 92, 191, 0.12);
  color: var(--purple);
  border: 1px solid rgba(124, 92, 191, 0.25);
  transition: all var(--transition);
}

.nutrition-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: center;
}

.nutrition-inputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nutrition-result {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Protein ring — similar to BMI ring but purple */
.protein-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid rgba(124, 92, 191, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  flex-shrink: 0;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.protein-ring-inner { display: flex; flex-direction: column; align-items: center; }

.protein-num {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--purple);
  transition: all 0.4s ease;
}

.protein-unit {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nutrition-info { flex: 1; min-width: 150px; }

.nutrition-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
}

.nutrition-detail {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.5;
}

.nutrition-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Small food tip pills */
.tip-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  background: rgba(124, 92, 191, 0.08);
  border: 1px solid rgba(124, 92, 191, 0.18);
  color: var(--purple);
}

/* ================================================
   EXERCISE DATABASE
   ================================================ */
.exercises-card {
  position: relative;
}

/* Muscle group filter dropdown */
.filter-select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a7060' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

/* Grid of exercise cards */
.exercise-db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* Individual exercise card */
.ex-db-card {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}

.ex-db-card:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 16px var(--orange-glow);
  transform: translateY(-2px);
}

.ex-db-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.ex-db-muscle {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(242, 110, 34, 0.1);
  color: var(--orange);
  border: 1px solid rgba(242, 110, 34, 0.2);
  width: fit-content;
  letter-spacing: 0.3px;
}

/* Watch video button on each exercise card */
.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--coral);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  width: fit-content;
  margin-top: 4px;
}

.btn-watch:hover {
  background: #c93a2a;
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(232, 75, 58, 0.3);
}

/* ================================================
   PLAN TABS
   ================================================ */
.plan-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.plan-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
  min-width: 0;
}

.plan-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
}

.plan-tab:hover { border-color: var(--orange); color: var(--orange); background: rgba(242, 110, 34, 0.07); }

.plan-tab.active {
  background: linear-gradient(135deg, var(--orange), var(--orange-lt));
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 3px 14px var(--orange-glow);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.plan-tab:not(.active) .tab-count {
  background: var(--surface);
  color: var(--orange);
  border: 1px solid var(--border);
}

.tab-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  font-size: 0.65rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  border: none;
  color: inherit;
  padding: 0;
  margin-left: 2px;
}

.plan-tab:hover .tab-delete { opacity: 1; }
.plan-tab.active .tab-delete:hover { background: rgba(255, 255, 255, 0.5); }
.plan-tab:not(.active) .tab-delete:hover { background: rgba(232, 75, 58, 0.2); color: var(--coral); }

.btn-new-plan {
  background: transparent;
  color: var(--orange);
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 8px 16px;
  border: 1.5px dashed var(--orange);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn-new-plan:hover {
  background: var(--orange);
  color: #fff;
  border-style: solid;
  box-shadow: 0 3px 14px var(--orange-glow);
}

.tab-name-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  width: 80px;
  outline: none;
  padding: 0 2px;
}

/* ---- Workout completion checkbox ---- */
.workout-table td.check-cell,
.workout-table th.check-cell { text-align: center; width: 44px; padding-left: 10px; padding-right: 10px; }

.done-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  vertical-align: middle;
  flex-shrink: 0;
}

.done-checkbox:hover { border-color: var(--green); }

.done-checkbox:checked { background: var(--green); border-color: var(--green); }

.done-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.workout-table tr.row-done td {
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-color: var(--green);
}

.workout-table tr.row-done td.check-cell { opacity: 1; text-decoration: none; }

/* ================================================
   PROGRESS BAR — Workout Completion Tracker
   ================================================ */

/* Outer wrapper — hidden when no exercises exist */
.progress-section {
  margin-top: 20px;
  padding: 18px 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

/* Top row: label on the left, "X / Y done" counter on the right */
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* "X / Y done" counter badge */
.progress-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(62, 196, 109, 0.1);
  border: 1px solid rgba(62, 196, 109, 0.25);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Grey track that the green fill slides inside */
.progress-container {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

/* The green fill — width is set by JavaScript */
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green), #5de88a);
  border-radius: 5px;
  transition: width 0.4s ease; /* smooth animation when value changes */
}

/* Percentage text shown below the bar */
.progress-percent {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 7px;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* When ALL exercises are done — celebrate with orange accent */
.progress-bar.all-done {
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.progress-percent.all-done {
  color: var(--orange);
}

/* ---------- MOTIVATION ---------- */
.motivation-card {
  background: linear-gradient(135deg, var(--surface) 60%, var(--surface2) 100%);
  position: relative;
  overflow: hidden;
}

.motivation-card::before {
  content: "\201C";
  font-family: "Playfair Display", serif;
  font-size: 12rem;
  color: var(--orange);
  opacity: 0.05;
  position: absolute;
  top: -30px;
  left: 16px;
  line-height: 1;
  pointer-events: none;
}

.motivation-body {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.quote-display {
  flex: 1;
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  border-left: 3px solid var(--orange);
  padding-left: 16px;
  min-width: 200px;
  transition: color var(--transition);
}

.btn-motivation {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--orange-glow);
  white-space: nowrap;
}

.btn-motivation:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 28px rgba(242, 110, 34, 0.38); }
.btn-motivation:active { transform: translateY(0) scale(1); }

/* ---------- PROFILE CARD ---------- */
.profile-card { position: relative; }

.profile-saved-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 13px;
  border-radius: 20px;
  background: rgba(62, 196, 109, 0.15);
  color: var(--green);
  border: 1px solid rgba(62, 196, 109, 0.3);
  letter-spacing: 0.3px;
  transition: opacity 0.4s ease;
}

.profile-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr auto;
  gap: 14px;
  align-items: end;
}

.profile-display {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--orange-glow);
}

.profile-info { flex: 1; min-width: 160px; }

.profile-info h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.goal-pill {
  background: rgba(242, 110, 34, 0.1);
  border-color: rgba(242, 110, 34, 0.25);
  color: var(--orange);
}

/* ---------- PROFILE USERNAME WELCOME ---------- */
/* Displayed at top of the profile card after login */
.profile-username-welcome {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--orange);
  background: rgba(242, 110, 34, 0.07);
  border: 1px solid rgba(242, 110, 34, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  margin-bottom: 18px;
  letter-spacing: 0.2px;
}

/* ---------- EXERCISE SEARCH BAR ---------- */
.exercise-search-bar {
  margin-bottom: 18px;
}

.exercise-search-bar input {
  width: 100%;
  max-width: 380px;
  padding: 11px 16px;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.exercise-search-bar input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
}

.exercise-search-bar input::placeholder {
  color: var(--text-light);
}

/* ---------- HEALTH CALCULATOR — PROTEIN RESULT PANEL ---------- */
/* Shown below the BMI layout after "Calculate" is clicked */
.health-protein-result {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.health-protein-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.4px;
  border-top: 1px solid var(--border);
}

/* ---------- UTILITIES ---------- */
.hidden { display: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
  .dashboard-grid { grid-template-columns: 1fr; }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
  }

  .nav-links.open { display: flex; }

  .nav-link { padding: 11px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; }

  .nav-link.active {
    border-bottom: none;
    border-left: 3px solid var(--orange);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .nav-inner { flex-direction: column; align-items: flex-start; padding: 0 16px; }
  .nav-hamburger { align-self: flex-end; margin: 6px 0 4px auto; }

  .workout-form, .profile-form { grid-template-columns: 1fr 1fr; }
  .workout-form .field-group:first-child, .workout-form .btn-primary,
  .profile-form .field-group:first-child, .profile-form .btn-primary { grid-column: span 2; }

  .bmi-layout { grid-template-columns: 1fr; }
  .nutrition-layout { grid-template-columns: 1fr; }

  .motivation-body { flex-direction: column; }
  .btn-motivation { width: 100%; justify-content: center; }

  .card { padding: 22px 18px; }
  .brand-logo { height: 72px; }

  /* Stack welcome + logout in header */
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .welcome-msg { font-size: 0.78rem; padding: 6px 12px; }
}

@media (max-width: 480px) {
  #modeLabel { display: none; }

  .workout-form, .profile-form { grid-template-columns: 1fr; }
  .workout-form .field-group:first-child, .workout-form .btn-primary,
  .profile-form .field-group:first-child, .profile-form .btn-primary { grid-column: span 1; }

  .exercise-db-grid { grid-template-columns: 1fr; }
}

/* ================================================
   SHOP SECTION — Supplement Marketplace
   ================================================ */

/* ---- CART BUTTON IN HEADER ---- */
.btn-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border: none;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--orange-glow);
  position: relative;
}

.btn-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(242, 110, 34, 0.4);
}

/* Cart badge — the red bubble showing item count */
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 50px;
  padding: 0 5px;
  line-height: 1;
}

/* ---- SHOP CARD ---- */
.shop-card {
  position: relative;
}

/* "View Cart" button inside the shop section header */
.btn-open-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--orange);
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-open-cart:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
  box-shadow: 0 4px 16px var(--orange-glow);
}

/* Inline cart badge next to "View Cart" button */
.cart-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 50px;
  padding: 0 5px;
  line-height: 1;
}

.btn-open-cart:hover .cart-badge-inline {
  background: #fff;
  color: var(--orange);
}

/* ---- FILTER BAR ---- */
.shop-filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.shop-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shop-filter-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 68px;
  flex-shrink: 0;
}

.shop-filter-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Category filter buttons */
.shop-cat-btn,
.shop-brand-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.shop-cat-btn:hover,
.shop-brand-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(242, 110, 34, 0.06);
}

/* Active state for selected filter */
.shop-cat-btn.active,
.shop-brand-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 3px 12px var(--orange-glow);
}

/* ---- PRODUCT GRID ---- */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* "No results" message when filters return empty */
.shop-no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 40px 20px;
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ---- PRODUCT CARD ---- */
.shop-product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

/* Subtle glow on hover */
.shop-product-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  opacity: 0;
  transition: opacity var(--transition);
}

.shop-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(242, 110, 34, 0.3);
}

.shop-product-card:hover::after {
  opacity: 1;
}

/* Large emoji icon for the product */
.shop-product-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

.shop-product-info {
  flex: 1;
}

.shop-product-name {
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.3;
}

.shop-product-brand {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(242, 110, 34, 0.08);
  border: 1px solid rgba(242, 110, 34, 0.15);
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.shop-product-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Product card footer: price on left, button on right */
.shop-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.shop-product-price {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Add to Cart button */
.shop-add-btn {
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border: none;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-add-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px var(--orange-glow);
}

.shop-add-btn:active {
  transform: scale(0.98);
}

/* "In Cart" state — muted green style */
.shop-add-btn.in-cart {
  background: linear-gradient(135deg, var(--green), #5de88a);
  box-shadow: 0 3px 10px rgba(62, 196, 109, 0.25);
}

.shop-add-btn.in-cart:hover {
  box-shadow: 0 4px 16px rgba(62, 196, 109, 0.35);
}

/* ================================================
   CART MODAL
   ================================================ */

/* Full-screen backdrop */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 14, 8, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

/* Slide-in panel from the right */
.cart-panel {
  background: var(--surface);
  width: 100%;
  max-width: 400px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.25);
  animation: cartSlideIn 0.28s ease;
}

@keyframes cartSlideIn {
  from { transform: translateX(100%); opacity: 0.6; }
  to   { transform: translateX(0);    opacity: 1;   }
}

/* Cart header row */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.cart-close-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: "Outfit", sans-serif;
}

.cart-close-btn:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* Empty cart state */
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  text-align: center;
  gap: 10px;
}

.cart-empty-icon {
  font-size: 3.5rem;
  margin-bottom: 4px;
}

.cart-empty-text {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.cart-empty-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Cart content area (items + footer) */
.cart-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable items list */
.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Scrollbar styling */
.cart-items-list::-webkit-scrollbar { width: 5px; }
.cart-items-list::-webkit-scrollbar-track { background: var(--surface2); }
.cart-items-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Individual cart item row */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.cart-item:hover {
  border-color: rgba(242, 110, 34, 0.25);
}

.cart-item-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-brand {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Right side: price, qty, remove button */
.cart-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-item-price {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.cart-item-qty {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--orange);
  background: rgba(242, 110, 34, 0.1);
  border: 1px solid rgba(242, 110, 34, 0.2);
  padding: 2px 7px;
  border-radius: 20px;
}

/* Remove (✕) button */
.cart-remove-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: "Outfit", sans-serif;
  flex-shrink: 0;
}

.cart-remove-btn:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* Cart footer: total + action buttons */
.cart-footer {
  padding: 18px 20px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-total-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-total-price {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--orange);
}

.cart-actions {
  display: flex;
  gap: 10px;
}

.cart-clear-btn {
  flex: 1;
  font-size: 0.82rem;
  padding: 11px 14px;
}

.cart-checkout-btn {
  flex: 2;
  font-size: 0.9rem;
  padding: 12px 20px;
}

/* ================================================
   RESPONSIVE — SHOP
   ================================================ */
@media (max-width: 700px) {
  .shop-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .shop-filter-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cart-panel {
    max-width: 100%;
  }

  .btn-cart {
    padding: 9px 13px;
    font-size: 0.8rem;
  }

  .shop-product-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .shop-add-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .shop-product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cart-actions {
    flex-direction: column;
  }

  .cart-checkout-btn, .cart-clear-btn {
    flex: unset;
    width: 100%;
  }
}

/* ---- SHOP NAV LINK (opens new tab) ---- */
.nav-link-shop {
  color: var(--orange) !important;
  background: rgba(242, 110, 34, 0.07) !important;
  border: 1.5px solid rgba(242, 110, 34, 0.2) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
}

.nav-link-shop:hover {
  background: var(--orange) !important;
  color: #fff !important;
  border-color: var(--orange) !important;
}

/* ================================================
   SHOP SECTION EMBED — Added for in-page shop
   ================================================ */

/* Header right group: welcome msg + shop button together */
.header-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Shop button in header — sits right of "Welcome, [Name]" */
.btn-shop-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border: none;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 3px 12px var(--orange-glow);
  white-space: nowrap;
  position: relative;
}

.btn-shop-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 110, 34, 0.42);
}

/* Red badge on header shop button showing cart count */
.header-cart-badge {
  background: #fff;
  color: var(--orange);
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---- SHOP SECTION EMBED ---- */
.shop-section-embed {
  /* By default hidden, shown when navigateToShop() is called */
}

/* Hero banner with background image + overlay text */
.shop-hero-banner {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 140px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--amber) 100%);
  display: flex;
  align-items: center;
}

.shop-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
}

.shop-hero-overlay {
  position: relative;
  z-index: 1;
  padding: 28px 32px;
  color: #fff;
}

.shop-hero-overlay h3 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 900;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.shop-hero-overlay p {
  font-size: 0.88rem;
  opacity: 0.92;
  font-weight: 500;
}

/* ---- PRODUCT CARDS with image support ---- */

/* Product image wrapper (new addition) */
.shop-product-image-wrap {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}

/* Actual product <img> */
.shop-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.3s ease;
}

.shop-product-card:hover .shop-product-img {
  transform: scale(1.07);
}

/* Fallback emoji shown when image fails to load */
.shop-product-emoji-fallback {
  font-size: 2.8rem;
  line-height: 1;
}

/* ---- CART MODAL (in-page overlay) ---- */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 14, 8, 0.55);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cart-modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-modal-header h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.cart-modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: "Outfit", sans-serif;
}

.cart-modal-close:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* Empty state */
.cart-modal-empty {
  padding: 48px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cart-modal-empty span {
  font-size: 3.5rem;
}

.cart-modal-empty p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.cart-modal-empty button {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--orange);
  font-family: "Outfit", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
}

.cart-modal-empty button:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Items list inside modal */
.cart-modal-items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-modal-footer {
  padding: 18px 24px 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.cart-modal-total-value {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--orange);
}

.cart-modal-btns {
  display: flex;
  gap: 10px;
}

.cart-modal-clear-btn {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: "Outfit", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.cart-modal-clear-btn:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.cart-modal-checkout-btn {
  flex: 2;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border: none;
  color: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px var(--orange-glow);
}

.cart-modal-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(242, 110, 34, 0.4);
}

/* Responsive adjustments for shop section */
@media (max-width: 600px) {
  .header-right-group {
    gap: 7px;
  }
  .btn-shop-header {
    font-size: 0.75rem;
    padding: 8px 13px;
  }
  .shop-hero-overlay {
    padding: 20px 20px;
  }
  .cart-modal-btns {
    flex-direction: column;
  }
}

/* ================================================
   PRODUCT CARD IMAGE — override padding for image-first layout
   ================================================ */

/* When card has an image, reduce top padding so image sits flush */
.shop-product-card {
  padding: 0 0 16px 0; /* image fills top, content has side padding */
}

/* Image wrapper fills the card top edge */
.shop-product-image-wrap {
  width: 100%;
  height: 130px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0;
}

.shop-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform 0.3s ease;
}

.shop-product-card:hover .shop-product-img {
  transform: scale(1.08);
}

.shop-product-emoji-fallback {
  font-size: 3.2rem;
  line-height: 1;
}

/* Give the info and footer sections side padding since card padding is now 0 */
.shop-product-info {
  padding: 12px 16px 0;
}

.shop-product-footer {
  padding: 12px 16px 0;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
