/* =========================================================
   Cute Character & Food Truck Location Map - Custom Styles
   (Connected to street-musician Firebase)
   ========================================================= */

:root {
  --primary-color: #ff5e7e;
  --primary-hover: #e04867;
  --secondary-color: #4A90E2;
  --accent-color: #ff9f43;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.15);
  --border-radius: 16px;
  --footer-height: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #f8fafc;
}

#app-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

/* Glassmorphism Header Overlay */
.top-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 12px 18px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 94vw;
  width: 520px;
}

.top-bar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.top-bar h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: #e2e8f0;
  color: #4a5568;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.status-badge.active {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.warning {
  background: #fef3c7;
  color: #b45309;
}

/* Category Filter Chips */
.filter-bar {
  display: flex;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.filter-chip.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(255, 94, 126, 0.3);
}

/* =========================================================
   Fixed Bottom Navigation Footer Bar (Mobile Safe Area)
   ========================================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 120px;
  position: relative;
}

.nav-item:hover, .nav-item.active {
  color: var(--primary-color);
  background: rgba(255, 94, 126, 0.08);
}

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

.nav-label {
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  background: var(--primary-color);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge.hidden {
  display: none;
}

/* =========================================================
   Leaflet Custom User & Food Truck Pins
   ========================================================= */

.custom-char-marker {
  position: relative;
  width: 64px;
  height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  animation: pinBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pin-bubble {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 2;
}

.pin-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pin-tail {
  position: absolute;
  bottom: 10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid var(--primary-color);
  z-index: 1;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}

.pin-pulse-ring {
  position: absolute;
  bottom: 2px;
  width: 30px;
  height: 12px;
  background: rgba(255, 94, 126, 0.35);
  border-radius: 50%;
  z-index: 0;
  animation: pulseGlow 1.8s infinite ease-out;
}

/* Food Truck Pin */
.truck-pin-marker {
  position: relative;
  width: 56px;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.truck-pin-marker:hover {
  transform: scale(1.15) translateY(-4px);
}

.truck-badge {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: #ffffff;
  border: 3px solid var(--truck-color, #ff9f43);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  z-index: 2;
  position: relative;
}

.truck-status-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.truck-pin-tail {
  position: absolute;
  bottom: 8px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 14px solid var(--truck-color, #ff9f43);
  z-index: 1;
}

@keyframes pinBounce {
  0% { transform: translateY(-40px) scale(0.7); opacity: 0; }
  60% { transform: translateY(6px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* =========================================================
   Food Truck List Drawer (Bottom Sheet)
   ========================================================= */

.truck-drawer {
  position: fixed;
  bottom: -500px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  height: 480px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  z-index: 1300;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  transition: bottom 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.truck-drawer.open {
  bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px));
}

.drawer-handle {
  width: 36px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 0 auto 10px;
  flex-shrink: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.drawer-header h2 {
  font-size: 1rem;
  color: #1e293b;
  font-weight: 700;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
}

/* Drawer search bar */
.drawer-search {
  position: relative;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.drawer-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
}

.drawer-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.85rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
}

.drawer-search input:focus {
  border-color: var(--primary-color);
}

.truck-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.truck-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
}

.truck-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.truck-card-img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.truck-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #fff;
}

.truck-card-info {
  flex: 1;
  min-width: 0;
}

.truck-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.truck-card-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.truck-card-meta {
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 3px;
  display: flex;
}

.truck-card-dist {
  color: var(--primary-color);
  font-weight: 600;
}

.truck-card-arrow {
  font-size: 1.3rem;
  color: #cbd5e1;
  flex-shrink: 0;
}

/* =========================================================
   Food Truck Detail Modal & MyPage Modal
   ========================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.truck-modal, .mypage-modal {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  border-radius: 24px;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .truck-modal,
.modal-overlay.open .mypage-modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: #475569;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-banner {
  height: 140px;
  background: linear-gradient(135deg, #ff9f43, #ff5e7e);
  position: relative;
  overflow: hidden;
}

.modal-banner #modal-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.category-badge {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.status-chip {
  background: #22c55e;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 20px;
}

.modal-title {
  font-size: 1.2rem;
  color: #1e293b;
  font-weight: 700;
}

.modal-catchphrase {
  font-size: 0.85rem;
  color: #ff5e7e;
  font-weight: 600;
  margin-top: 4px;
}

.modal-distance {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 4px;
}

.modal-distance strong {
  color: var(--primary-color);
}

.modal-desc {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 10px;
  line-height: 1.4;
}

/* =========================================================
   MyPage Specific Styles
   ========================================================= */

.mypage-header {
  background: linear-gradient(135deg, #ff5e7e, #4A90E2);
  padding: 24px 20px 20px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mypage-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.mypage-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mypage-user-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.mypage-user-info p {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 2px;
}

.mypage-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mypage-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #f1f5f9;
}

.mypage-section h4 {
  font-size: 0.92rem;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 12px;
}

.mypage-char-grid {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 12px;
  padding: 8px 4px;
  flex-wrap: wrap;
}

.mypage-char-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.mypage-char-grid .char-option {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3.5px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.mypage-char-grid .char-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mypage-char-item:hover .char-option {
  transform: translateY(-3px) scale(1.05);
  border-color: #cbd5e1;
}

.mypage-char-grid .char-option.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 18px rgba(255, 94, 126, 0.45);
  transform: scale(1.1);
}

.mypage-char-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-align: center;
}

.auth-tab-bar {
  display: flex;
  background: #e2e8f0;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 14px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form.hidden, .auth-view.hidden {
  display: none;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
}

.input-group input {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-group input:focus {
  border-color: var(--primary-color);
}

.auth-error-msg {
  font-size: 0.76rem;
  color: #dc2626;
  font-weight: 600;
}

.account-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 14px;
}

.status-icon {
  font-size: 1.4rem;
}

.btn-secondary {
  width: 100%;
  background: #e2e8f0;
  color: #475569;
  border: none;
  padding: 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

/* Coupons Section */
.coupons-section, .notices-section {
  margin-top: 16px;
}

.coupons-section h4, .notices-section h4 {
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 8px;
}

.coupon-list, .notice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coupon-card {
  background: linear-gradient(135deg, #fff5f5, #fff0f3);
  border: 1.5px dashed #ff5e7e;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.coupon-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coupon-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.coupon-badge {
  background: #ff5e7e;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
}

.coupon-desc {
  font-size: 0.76rem;
  color: #64748b;
}

.coupon-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 94, 126, 0.25);
}

.coupon-code {
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e04867;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #fecdd3;
}

.btn-copy-coupon, .btn-use-coupon {
  background: #ff5e7e;
  color: #ffffff;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy-coupon:hover, .btn-use-coupon:hover {
  background: #e04867;
}

.btn-use-coupon:disabled {
  cursor: default;
  opacity: 0.65;
}

.coupon-card-used {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Notices / Announcements Section */
.notice-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #4A90E2;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notice-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
}

.notice-date {
  font-size: 0.7rem;
  color: #94a3b8;
}

.notice-body {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
}

/* Store Info Section */
.info-section {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
}

.info-section:empty {
  display: none;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
}

.info-row a {
  color: var(--secondary-color);
  text-decoration: none;
}

.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Photos Gallery */
.photos-section {
  margin-top: 16px;
}

.photos-section h4 {
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 8px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f5f9;
}

/* Menu Section */
.menu-section {
  margin-top: 16px;
}

.menu-section h4 {
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 8px;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.menu-item-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.menu-item-img-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.menu-item-body {
  flex: 1;
  min-width: 0;
}

.menu-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  display: block;
}

.menu-item-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sold-out-badge {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  margin-top: 3px;
}

.menu-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-color);
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-primary {
  width: 100%;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2500;
  background: #1e293b;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

/* =========================================================
   Favorites Feature
   ========================================================= */

/* Heart button in truck modal */
.modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.modal-title-row .modal-title {
  flex: 1;
}

.btn-heart {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.btn-heart:hover {
  transform: scale(1.2);
}

.btn-heart.favorited {
  animation: heartPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Favorites Modal */
.favorites-modal {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  border-radius: 24px;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.modal-overlay.open .favorites-modal {
  transform: scale(1);
}

.favorites-header {
  background: linear-gradient(135deg, #ff5e7e, #ff9f43);
  padding: 24px 20px 20px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 24px 24px 0 0;
  flex-shrink: 0;
}

.favorites-header-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.favorites-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.favorites-header p {
  font-size: 0.78rem;
  opacity: 0.88;
  margin: 3px 0 0;
}

.favorites-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

/* Favorite truck card */
.fav-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.fav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  border-color: #fda4af;
}

.fav-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.fav-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fav-card-status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #fff;
}

.fav-card-body {
  flex: 1;
  min-width: 0;
}

.fav-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-card-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.fav-card-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
}

.fav-card-meta .dist {
  color: var(--primary-color);
  font-weight: 600;
}

.fav-remove-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #fda4af;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.fav-remove-btn:hover {
  color: #ff5e7e;
  transform: scale(1.15);
}

/* Empty state */
.favorites-empty {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
}

.favorites-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.5;
}

.favorites-empty p {
  font-size: 0.88rem;
  font-weight: 600;
}

.favorites-empty small {
  font-size: 0.76rem;
  margin-top: 6px;
  display: block;
  opacity: 0.7;
}

/* Truck card heart indicator */
.truck-card-fav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5e7e;
  flex-shrink: 0;
  align-self: center;
}

/* =========================================================
   Reviews Section
   ========================================================= */

.reviews-section {
  margin-top: 24px;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.reviews-section h4 {
  font-size: 1.05rem;
  color: #1e293b;
  margin-bottom: 12px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.review-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.review-rating {
  color: #fbbf24;
  font-size: 0.9rem;
}

.review-date {
  font-size: 0.7rem;
  color: #94a3b8;
}

.review-comment {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.4;
}

.review-form-container {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 12px;
  padding: 16px;
}

.review-form-container h5 {
  font-size: 0.9rem;
  color: #c2410c;
  margin-bottom: 8px;
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rating-input {
  display: flex;
  gap: 4px;
  font-size: 1.5rem;
  color: #cbd5e1;
  cursor: pointer;
}

.rating-input .star-rating {
  transition: color 0.2s;
}

.rating-input .star-rating.active {
  color: #fbbf24;
}

#review-comment {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
}

#review-comment:focus {
  border-color: var(--primary-color);
}


/* =========================================================
   Redesigned Reviews Section
   ========================================================= */

.reviews-section {
  margin-top: 24px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  font-family: 'Inter', sans-serif;
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.reviews-header h4 {
  font-size: 1.15rem;
  color: #1e293b;
  font-weight: 700;
}

.reviews-header-icon {
  font-size: 0.8rem;
  color: #64748b;
}

.reviews-summary-container {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.reviews-summary-left .avg-score {
  font-size: 3rem;
  font-weight: 400;
  color: #334155;
  line-height: 1;
}

.reviews-summary-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.avg-stars {
  font-size: 1.2rem;
  color: #f59e0b;
}

.total-count {
  font-size: 0.75rem;
  color: #64748b;
}

.reviews-distribution {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.dist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #475569;
}

.dist-star {
  width: 24px;
  font-weight: 600;
}

.dist-bar-bg {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.dist-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #f59e0b;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dist-pct {
  width: 30px;
  text-align: right;
  color: #64748b;
}

.reviews-action {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 20px;
}

.btn-outline-primary {
  width: 100%;
  padding: 12px;
  border: 1px solid #3b82f6;
  color: #3b82f6;
  background: transparent;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-outline-primary:hover {
  background: #eff6ff;
}

.review-form-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.review-form-container.hidden {
  display: none;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-cancel {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
}

#review-title {
  width: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-card {
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  border: none;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.review-rating-small {
  font-size: 0.9rem;
  color: #f59e0b;
}

.review-stars-small {
  color: #f59e0b;
  font-size: 0.8rem;
}

.review-author {
  font-size: 0.75rem;
  color: #64748b;
}

.review-author-tag {
  font-size: 0.7rem;
  color: #10b981;
  font-weight: 700;
}

.review-options {
  margin-left: auto;
  color: #cbd5e1;
  cursor: pointer;
}

.review-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.review-date {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.review-comment {
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 10px;
}

.review-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-helpful {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-helpful:hover {
  background: #f1f5f9;
}

.btn-helpful.active {
  color: #3b82f6;
  border-color: #3b82f6;
  background: #eff6ff;
}

.btn-see-all {
  width: 100%;
  padding: 14px;
  margin-top: 10px;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #3b82f6;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-see-all.hidden {
  display: none;
}

