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

:root {
  --primary: #f46a5d;
  --primary-hover: #f67e73;
  --secondary: #1F1F1F;
  --bg: #FAF9F6;
  --bg-card: #FFFFFF;
  --accent: #A6FF4D;
  --success: #22C55E;
  --error: #EF4444;
  --warning: #F59E0B;
  --border: #E2E8F0;
  --text: #1F1F1F;
  --text-muted: #6B7280;
  --shadow: 0 4px 12px rgba(31,31,31,0.05);
  --shadow-lg: 0 8px 24px rgba(31,31,31,0.08);
  --radius: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 60px;
  background: rgba(250, 249, 246, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.global-search {
  flex: 1;
  max-width: 480px;
  margin: 0 24px;
  position: relative;
}

.global-search-input {
  width: 100%;
  padding: 8px 32px 8px 36px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

.global-search-input::placeholder { color: var(--text-muted); }

.global-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(244, 106, 93, 0.1);
}

.global-search-input.active-search {
  border-color: var(--primary);
  background-color: rgba(244, 106, 93, 0.03);
}

.global-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.global-search-clear:hover {
  background: var(--primary);
  color: #fff;
}

.global-search-clear.hidden { display: none; }

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.last-update {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.update-flash {
  animation: flash-coral 1s ease;
}

@keyframes flash-coral {
  0% { color: var(--primary); font-weight: 500; }
  100% { color: var(--text-muted); font-weight: 400; }
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(166, 255, 77, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: #3d7a00;
  letter-spacing: 0.02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ─── FILTERS ─── */
.filters {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  padding: 7px 18px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.filter-logo {
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-logo img {
  height: 16px;
  width: auto;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.filter-logo:hover img {
  opacity: 0.8;
}

.filter-logo.active {
  background: var(--bg-card);
  border-color: var(--primary);
}

.filter-logo.active img {
  opacity: 1;
}

.mobile-brand-select { display: none; }

.filters-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.radius-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radius-control label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.radius-control select {
  padding: 7px 28px 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}

.radius-control select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.1);
}

.store-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* ─── MAP ─── */
#map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.leaflet-control-zoom { display: none !important; }
.leaflet-marker-icon { overflow: visible !important; background: none !important; border: none !important; }
.leaflet-control-attribution { display: none; }

/* ─── MARKERS ─── */
.store-marker {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.store-marker:hover {
  transform: scale(1.15) translateY(-3px);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.3));
}

.store-marker foreignObject img {
  display: block;
  width: 35px;
  height: 35px;
  object-fit: contain;
}

.user-marker-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
}

.user-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 2;
}

.user-marker-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(244, 106, 93, 0.25);
  animation: user-pulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes user-pulse {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ─── PANEL ─── */
.panel-overlay {
  display: none;
}

.panel {
  position: fixed;
  top: 60px;
  right: -440px;
  width: 440px;
  bottom: 0;
  z-index: 998;
  background: var(--bg);
  border-left: 1px solid var(--border);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.panel.open { right: 0; z-index: 1001; }

.panel-header {
  position: sticky;
  top: 0;
  padding: 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 2;
}

.panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.panel-close:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 92, 92, 0.05);
}

.panel-store-name {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 6px;
  padding-right: 40px;
}

.panel-store-address {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.panel-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.panel-stat-logo {
  height: 20px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}

.panel-stat-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.panel-stat-products {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.panel-stat-products span {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  color: var(--text);
}

.panel-directions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 100px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

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

.panel-directions svg {
  width: 14px;
  height: 14px;
}

.panel-section-title {
  padding: 16px 24px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ─── PANEL FILTERS ─── */
.panel-filters {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-search {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.panel-search::placeholder { color: var(--text-muted); }

.panel-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 92, 92, 0.08);
}

.panel-filter-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-filter-select {
  flex: 1;
  padding: 8px 28px 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.2s;
}

.panel-filter-select:focus {
  border-color: var(--primary);
}

.panel-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-price-input {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  outline: none;
  width: 0;
  transition: border-color 0.2s;
}

.panel-price-input::placeholder { color: var(--text-muted); }

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

.panel-price-separator {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.panel-filter-count {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 24px 8px;
}

.panel-filter-count span {
  font-weight: 600;
  color: var(--text);
}

.panel-load-more {
  padding: 16px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── PANEL LOADING SKELETON ─── */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.skeleton-card {
  display: flex;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}

.skeleton-img {
  width: 64px;
  height: 80px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--border) 25%, #f0eeeb 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--border) 25%, #f0eeeb 50%, var(--border) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-line:nth-child(1) { width: 70%; }
.skeleton-line:nth-child(2) { width: 40%; height: 16px; }
.skeleton-line:nth-child(3) { width: 55%; }

/* ─── PRODUCT CARDS ─── */
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  display: flex;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
  cursor: default;
  animation: card-in 0.3s ease both;
}

.product-card:hover {
  background: rgba(255, 92, 92, 0.02);
}

.product-img {
  width: 64px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--border);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

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

.product-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.low-stock-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.product-price {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.color-tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.size-tag {
  padding: 3px 8px;
  background: rgba(166, 255, 77, 0.15);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #3d7a00;
}

/* ─── MAP CONTROLS ─── */
.map-controls {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-controls.panel-open {
  right: 472px;
}

.zoom-group {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.zoom-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  color: var(--primary);
  background: rgba(244, 106, 93, 0.05);
}

.zoom-btn svg {
  width: 14px;
  height: 14px;
}

.zoom-divider {
  height: 1px;
  background: var(--border);
  margin: 0 6px;
}

.map-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.map-ctrl-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 6px 20px rgba(255, 92, 92, 0.15);
  transform: scale(1.05);
}

.map-ctrl-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── TRIP PLANNER ─── */
.trip-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.trip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(244, 106, 93, 0.05);
}

.trip-btn svg { width: 16px; height: 16px; }

.trip-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.trip-panel {
  position: fixed;
  top: 60px;
  right: -440px;
  width: 440px;
  bottom: 0;
  z-index: 998;
  background: var(--bg);
  border-left: 1px solid var(--border);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.trip-panel.open { right: 0; z-index: 1001; }

.trip-panel::-webkit-scrollbar { width: 5px; }
.trip-panel::-webkit-scrollbar-track { background: transparent; }
.trip-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.trip-actions {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trip-route-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.trip-route-btn:hover { background: var(--primary-hover); }
.trip-route-btn svg { width: 14px; height: 14px; }

.trip-secondary-actions { display: flex; gap: 8px; }

.trip-clear-btn {
  flex: 1;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.trip-clear-btn:hover { border-color: var(--text-muted); color: var(--text); }
.trip-clear-btn.trip-clear-all:hover { border-color: var(--error); color: var(--error); }

.trip-store-group { border-bottom: 2px solid var(--border); }
.trip-store-group.all-visited { opacity: 0.5; }

.trip-store-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(244, 106, 93, 0.03);
  border-bottom: 1px solid var(--border);
}

.trip-store-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trip-store-logo {
  height: 16px;
  width: auto;
  object-fit: contain;
  opacity: 0.7;
}

.trip-store-info { min-width: 0; }

.trip-store-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-store-address {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease, opacity 0.2s ease;
}

.trip-item:hover { background: rgba(244, 106, 93, 0.02); }
.trip-item.visited { opacity: 0.45; }
.trip-item.visited .trip-item-name { text-decoration: line-through; }
.trip-item.out-of-stock .trip-item-img { opacity: 0.4; }

.trip-check {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.trip-check:hover { transform: scale(1.15); }
.trip-check svg { width: 24px; height: 24px; }

.trip-item-img {
  width: 44px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--border);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

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

.trip-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-item-price {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-top: 2px;
}

.trip-item-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.trip-item-oos {
  font-size: 11px;
  font-weight: 600;
  color: var(--error);
  margin-top: 2px;
}

.trip-remove {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.trip-remove:hover { background: rgba(239, 68, 68, 0.08); color: var(--error); }
.trip-remove svg { width: 14px; height: 14px; }

.add-to-trip-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  transition: all 0.15s ease;
}

.add-to-trip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(244, 106, 93, 0.05);
}

.add-to-trip-btn.in-trip {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(244, 106, 93, 0.08);
}

.add-to-trip-btn svg { width: 14px; height: 14px; }

.trip-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}

.trip-empty svg {
  width: 48px;
  height: 48px;
  stroke: var(--border);
  margin-bottom: 16px;
}

.trip-empty p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.trip-empty span { font-size: 13px; }

/* ─── TOAST NOTIFICATIONS ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--secondary);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-message { white-space: nowrap; }

.toast-action {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.toast-action:hover { background: rgba(255,255,255,0.25); }

.toast-dismiss {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.toast-dismiss:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ─── LOADING ─── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-logo { margin-bottom: 20px; }

.loading-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 20px;
}

.loading-bar {
  width: 140px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  border-radius: 2px;
  animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ─── POSTCODE PROMPT ─── */
.postcode-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.postcode-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.postcode-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 240px;
  margin-bottom: 20px;
  text-align: center;
}

.postcode-form {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.postcode-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(244, 106, 93, 0.08);
}

.postcode-input-wrapper { flex: 1; }

.postcode-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  outline: none;
}

.postcode-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.postcode-input:disabled { opacity: 0.5; }

.postcode-submit {
  width: 42px;
  height: 42px;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 2px;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.postcode-submit:hover { background: var(--primary-hover); }
.postcode-submit:active { transform: scale(0.95); }
.postcode-submit svg { width: 18px; height: 18px; }

.postcode-error {
  font-size: 12px;
  color: var(--error);
  font-weight: 500;
  min-height: 16px;
  margin-top: 10px;
}

/* ─── SCROLLBAR ─── */
.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── TABLET ─── */
@media (max-width: 768px) {
  .panel { width: 380px; right: -380px; }
  .trip-panel { width: 380px; right: -380px; }
  .map-controls.panel-open { right: 412px; }
  .product-img { width: 56px; height: 70px; }
}

/* ─── MOBILE ─── */
@media (max-width: 640px) {
  header {
    padding: 0 16px;
    height: 54px;
  }

  .logo { font-size: 22px; }
  .header-right { gap: 10px; }
  .last-update { display: none; }
  .global-search { max-width: none; margin: 0 10px; }
  .global-search-input { font-size: 12px; padding: 7px 30px 7px 32px; }
  .live-badge { font-size: 11px; padding: 4px 10px; }
  .live-badge span { display: none; }

  .filters {
    top: 54px;
    padding: 8px 12px;
    gap: 8px;
  }

  .filter-btn { display: none; }

  .mobile-brand-select { display: flex; }

  .mobile-brand-select select,
  .radius-control select {
    font-size: 13px;
    padding: 9px 28px 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    outline: none;
  }

  .filters-right { margin-left: auto; gap: 8px; }
  .radius-control label { display: none; }
  .store-count { font-size: 11px; }

  .panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .panel-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Panel — bottom sheet */
  .panel {
    top: auto;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 75vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .panel.open { right: 0; bottom: 0; }

  .panel-header { padding: 20px 16px; }

  .panel-header::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 14px;
  }

  .panel-store-name { font-size: 18px; }
  .panel-stats { padding: 12px 16px; gap: 10px; }
  .panel-filters { padding: 10px 16px; gap: 8px; }
  .panel-filter-count { padding: 6px 16px 6px; }
  .panel-section-title { padding: 12px 16px 6px; }
  .product-card { padding: 12px 16px; }
  .product-img { width: 52px; height: 66px; border-radius: 10px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 16px; }

  .map-controls {
    bottom: 24px;
    right: 16px;
  }

  .map-controls.panel-open {
    right: 16px;
  }

  /* Trip panel — bottom sheet on mobile */
  .trip-panel {
    top: auto;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    height: 75vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .trip-panel.open { right: 0; bottom: 0; }
  .trip-panel .panel-header { padding: 20px 16px; }
  .trip-panel .panel-header::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 14px;
  }
  .trip-actions { padding: 12px 16px; }
  .trip-store-header { padding: 12px 16px; }
  .trip-item { padding: 10px 16px; }
  .trip-item-img { width: 38px; height: 48px; }

  .postcode-form { max-width: 280px; }
}

@media (max-width: 380px) {
  .logo { font-size: 20px; }
  .panel { height: 80vh; }
}
