/* NC Courage Brand Design System */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

:root {
  --atlantic-blue: #00416B;
  --cardinal-red: #AB0033;
  --southern-gold: #B4A269;
  --white: #FFFFFF;
  --black: #000000;
  --blue-dark: #002d54;
  --blue-light: #004f82;
  --gold-light: #cfc08a;
  --red-dark: #85002a;
  --surface: #f4f7f9;
  --surface-card: #ffffff;
  --text-primary: #002d54;
  --text-secondary: #555;
  --text-muted: #888;
  --shadow-sm: 0 2px 8px rgba(0,65,107,0.10);
  --shadow-md: 0 4px 20px rgba(0,65,107,0.15);
  --shadow-lg: 0 8px 40px rgba(0,65,107,0.20);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--surface);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── TOP NAV BAR ── */
.site-header {
  background: var(--blue-dark);
  border-bottom: 3px solid var(--southern-gold);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.site-header .inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-wrap img { height: 26px; max-height: 26px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-wrap span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1;
}
.logo-wrap span em {
  color: var(--southern-gold);
  font-style: normal;
}
.nav-links {
  gap: 6px;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 6px;
  transition: 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--southern-gold);
  background: rgba(255,255,255,0.08);
}

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--atlantic-blue) 60%, var(--blue-light) 100%);
  padding: 36px 20px 28px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(180,162,105,0.12);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(171,0,51,0.10);
  pointer-events: none;
}
.page-hero .inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--white);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 6px;
}
.page-hero h1 span { color: var(--southern-gold); }
.page-hero p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}
.gold-bar {
  width: 48px; height: 3px;
  background: var(--southern-gold);
  margin-bottom: 10px;
  border-radius: 2px;
}

/* ── MAIN CONTENT WRAPPER ── */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ── CARDS ── */
.card {
  background: var(--surface-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 14px;
  border-left: 5px solid var(--cardinal-red);
  transition: box-shadow 0.2s, transform 0.15s;
  animation: fadeUp 0.35s ease-out both;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card.mobile-card { border-left-color: var(--southern-gold); }
.card.blue-card   { border-left-color: var(--atlantic-blue); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-cat  { background: #f0f4f8; color: var(--text-muted); }
.badge-price { background: #e8f5e9; color: #2e7d32; }
.badge-mobile { background: rgba(180,162,105,0.15); color: #8b7340; border: 1px solid var(--southern-gold); }
.badge-open { background: rgba(0,65,107,0.08); color: var(--atlantic-blue); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary {
  background: var(--cardinal-red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); transform: scale(1.02); }
.btn-secondary {
  background: var(--atlantic-blue);
  color: var(--white);
}
.btn-secondary:hover { background: var(--blue-dark); transform: scale(1.02); }
.btn-gold {
  background: var(--southern-gold);
  color: var(--blue-dark);
}
.btn-gold:hover { background: var(--gold-light); transform: scale(1.02); }
.btn-outline {
  background: transparent;
  color: var(--atlantic-blue);
  border: 2px solid var(--atlantic-blue);
}
.btn-outline:hover { background: var(--atlantic-blue); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.72rem; }
.btn-refresh {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: 0.2s;
}
.btn-refresh:hover { background: rgba(255,255,255,0.25); }
.btn-refresh:active { transform: scale(0.95); }

/* ── FILTERS / SEARCH ── */
.filter-bar {
  background: var(--surface-card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: 'Barlow', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 10px;
}
.search-input:focus { border-color: var(--atlantic-blue); }
.cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.cat-pill {
  background: white;
  border: 1.5px solid #ddd;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: 'Barlow', sans-serif;
  transition: 0.2s;
}
.cat-pill.active {
  background: var(--atlantic-blue);
  color: white;
  border-color: var(--atlantic-blue);
}

/* ── DIET FILTERS ── */
.diet-section {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.diet-section strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}
.diet-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.diet-group label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.mobile-filter-label {
  color: var(--cardinal-red);
  font-weight: 800;
  border-left: 2px solid #eee;
  padding-left: 14px;
}
.diet-key {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── SYNC BAR ── */
.sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.07);
  border-radius: 8px;
  margin-top: 8px;
}
.sync-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── LOCATION ACCORDION ── */
.loc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 0;
  border-top: 1px dashed #eee;
  margin-top: 10px;
  user-select: none;
}
.triangle {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--atlantic-blue);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.loc-toggle.open .triangle { transform: rotate(0); }
.loc-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.loc-panel-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
}
.loc-toggle.open + .loc-panel-wrap { grid-template-rows: 1fr; }
.loc-panel { min-height: 0; }
.loc-list {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 2;
  padding-bottom: 4px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s, transform 0.25s;
}
.loc-toggle.open + .loc-panel-wrap .loc-list {
  opacity: 1;
  transform: translateY(0);
}
.loc-item { cursor: pointer; text-decoration: underline dotted var(--atlantic-blue); color: var(--atlantic-blue); font-weight: 600; }
.loc-item.mobile { color: var(--cardinal-red); font-weight: 800; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,0.7);
  z-index: 9999 !important;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex !important; }
.modal-box {
  background: white;
  border-radius: 16px;
  padding: 28px;
  max-width: 88%;
  width: 420px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  border-top: 5px solid var(--atlantic-blue);
  animation: popIn 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  position: relative;
}
@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 10px; right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  font-weight: bold;
  line-height: 1;
}
.modal-close:hover { color: var(--cardinal-red); }
.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  color: var(--atlantic-blue);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

/* ── BACK TO TOP ── */
#backToTop {
  display: none;
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 999;
  background: var(--blue-dark);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.3s;
}
#backToTop:hover { background: var(--cardinal-red); }

/* ── LOADING STATE ── */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #eee;
  border-top-color: var(--atlantic-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.95rem; font-weight: 600; }

/* ── ITEM NAME ROW ── */
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  gap: 8px;
  flex-wrap: wrap;
}
.item-name {
  font-weight: 800;
  color: var(--blue-dark);
  font-size: 1.1rem;
}
.item-icons { font-size: 1rem; }

/* ── CART / ORDER SPECIFIC ── */
.cart-section {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.cart-section h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item-row:last-child { border-bottom: none; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: white;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: 0.15s;
  flex-shrink: 0;
  color: var(--blue-dark);
}
.qty-btn:hover { border-color: var(--atlantic-blue); background: var(--atlantic-blue); color: white; }
.qty-num { min-width: 24px; text-align: center; font-weight: 800; font-size: 0.95rem; }
.cart-item-name { flex: 1; font-weight: 700; font-size: 0.92rem; }
.cart-item-price { font-weight: 800; color: #2e7d32; font-size: 0.92rem; }
.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-weight: 800;
  font-size: 1.05rem;
}
.order-total-row.grand {
  border-top: 2px solid var(--blue-dark);
  font-size: 1.2rem;
  color: var(--blue-dark);
}

/* ── PAYMENT FORM ── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5e5e5;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'Barlow', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--atlantic-blue); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 70px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blue-dark);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── STORED VALUE SECTION ── */
.sv-toggle {
  text-align: center;
  margin: 14px 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.sv-toggle a { color: var(--atlantic-blue); font-weight: 700; cursor: pointer; }
.sv-panel {
  background: #f4f7f9;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 14px;
  display: none;
}
.sv-panel.open { display: block; }

/* ── RESPONSIVE NAV ── */
#nav-menu {
  display: none;
  position: fixed;
  top: 61px;
  right: 0;
  left: 0;
  background: #001f3f;
  border-bottom: 3px solid #B4A269;
  padding: 10px 16px 14px;
  z-index: 9999;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
#nav-menu a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 12px;
  border-radius: 8px;
}
#nav-menu a:hover, #nav-menu a.active { color: #B4A269; background: rgba(255,255,255,0.08); }
#nav-menu.open { display: block; }

#nav-toggle {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 10000;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

@media (max-width: 699px) {
  .page-hero h1 { font-size: 1.9rem; }
}
