/* Dealer Hero (Clean 2-column layout) */
.dealer-hero {
  background: var(--ink);
  color: #ffffff;
  padding-top: var(--s7);
  padding-bottom: 120px;
  position: relative;
}

.dealer-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--s6);
}

.dealer-hero-tagline {
  max-width: 420px;
  width: 100%;
}

.dealer-hero-tagline img {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
}

.dealer-hero-battery {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.dealer-hero-battery picture {
  display: block;
  max-width: 100%;
}

.dealer-hero-battery img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%), linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-composite: intersect;
}

@media (max-width: 860px) {
  .dealer-hero {
    padding-bottom: 110px;
  }
  .dealer-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--s5);
    justify-items: center;
  }
  .dealer-hero-tagline {
    text-align: center;
  }
  .dealer-hero-battery {
    justify-content: center;
  }
  .dealer-hero-battery img {
    max-height: 160px;
  }
}

/* Search Panel (Card floating over hero) */
.search-panel {
  margin-top: -75px;
  position: relative;
  z-index: 10;
  margin-bottom: var(--s7);
}

.search-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.search-card h1 {
  font-size: clamp(22px, 3vw, 28px);
  margin: 0 0 var(--s5);
  color: var(--ink);
  font-weight: 700;
}

.search-card h1 .accent {
  color: var(--red);
}

.search-form {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: var(--s3);
  align-items: flex-end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.field input, .field select {
  height: 48px;
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.field input:focus, .field select:focus {
  border-color: var(--ink);
}

.field select:disabled {
  background: var(--paper-2);
  color: var(--muted);
  cursor: not-allowed;
}

.field-actions {
  display: flex;
  gap: var(--s2);
  align-items: flex-end;
}

.status {
  margin: var(--s3) 0 0;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}

.status.error {
  color: var(--red);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .search-form {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .field-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--s3);
  }
  .field-actions .btn {
    width: 100%;
  }
}

/* Results Section */
.results {
  margin-bottom: var(--s9);
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  padding-bottom: var(--s4);
  margin-bottom: var(--s6);
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.result-head .red {
  color: var(--red);
}

.result-head .count {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.result-head .count span {
  color: var(--red);
  font-weight: 700;
}

#list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
  align-items: stretch;
}

@media (max-width: 1024px) {
  #list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #list {
    grid-template-columns: 1fr;
  }
}

/* Store Card Component */
.store {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.store:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.store-img {
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder card image (Points 1 & 2): small logo on paper-2, aspect-ratio 3/1 */
.store-img.is-placeholder {
  aspect-ratio: 3 / 1;
  background: var(--ink-2);
  padding: 16px 24px;
}

.store-img.is-placeholder img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.store-main {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: var(--s3);
}

.store-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s2);
}

.store-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}

.dist {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: #fdf0ef;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dist:empty {
  display: none;
}

.types {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.types-label {
  font-size: 12px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.tag-water {
  background: #f1edfc;
  color: var(--spark);
  border-color: #d8caf8;
}

.tag-smf {
  background: #fdf0ef;
  color: var(--red);
  border-color: #f7c5c2;
}

.store-info {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.line {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.line svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--ink);
}

.addr {
  font-size: 14px;
  color: var(--muted);
}

/* Store Action Buttons (44px) - Point 4: tel button full width when no map button */
.store-actions {
  margin-top: auto;
  padding-top: var(--s3);
  display: flex;
  gap: var(--s2);
  width: 100%;
}

.tel-line {
  flex: 1 1 0;
  width: 100%;
}

.tel-line.hidden {
  display: none !important;
}

.tel {
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--r-sm);
  border: 1px solid #f7c5c2;
  background: #fdf0ef;
  color: var(--red);
  width: 100%;
  text-align: center;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tel:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.map-link {
  flex: 1 1 0;
  width: 100%;
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  text-align: center;
  padding: 0 8px;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.map-link.hidden {
  display: none !important;
}

.map-link:hover {
  background: var(--line);
  border-color: var(--ink);
}

.map-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.empty {
  text-align: center;
  padding: var(--s7) var(--s4);
  color: var(--muted);
  grid-column: 1 / -1;
  font-size: 16px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
}

.more-wrap {
  text-align: center;
  margin-top: var(--s7);
}

.more {
  margin: var(--s7) auto 0;
  display: block;
}
