/* === Variables === */
:root {
  --shopee-orange: #EE4D2D;
  --shopee-orange-hover: #D73211;
  --shopee-orange-light: #FFF0ED;
  --text-primary: #222;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-white: #fff;
  --bg-gray: #f5f5f5;
  --border: #e8e8e8;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 8px;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-gray);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* === Header === */
.header {
  background: var(--shopee-orange);
  color: white;
  padding: 16px 0;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 2px;
}

/* === Main === */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Controls === */
.controls {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-bar {
  display: flex;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--shopee-orange);
}

.btn-locate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.btn-locate:hover {
  border-color: var(--shopee-orange);
  color: var(--shopee-orange);
}

.btn-locate.active {
  background: var(--shopee-orange);
  border-color: var(--shopee-orange);
  color: white;
}

.filters {
  display: flex;
  gap: 6px;
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-white);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--shopee-orange);
  color: var(--shopee-orange);
}

.filter-btn.active {
  background: var(--shopee-orange);
  border-color: var(--shopee-orange);
  color: white;
}

/* === Map === */
.map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--border);
}

/* === Store List === */
.store-list {
  padding: 12px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.store-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.store-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.store-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.store-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.store-distance {
  font-size: 12px;
  color: var(--shopee-orange);
  white-space: nowrap;
  font-weight: 500;
}

.store-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

.store-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.store-shopee-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shopee-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.shopee-link:hover {
  opacity: 0.8;
}

.shopee-link.primary {
  background: var(--shopee-orange);
  color: white;
}

.shopee-link.secondary {
  background: var(--shopee-orange-light);
  color: var(--shopee-orange);
}

.no-stores {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.no-stores p {
  font-size: 14px;
}

/* === InfoWindow === */
.info-window {
  max-width: 280px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.info-window h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.info-window p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  line-height: 1.4;
}

.info-window .info-links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* === Mobile === */
@media (max-width: 600px) {
  .map {
    height: 300px;
    border-radius: 0;
    margin: 0 -16px;
    width: calc(100% + 32px);
  }

  .header-inner {
    padding: 0 16px;
  }
}
