:root {
  --verdone: #143d34;
  --beige: #9f968d;
  --border: #d9d6d1;
  --bg-soft: #f4f3f1;
  --text: #000000;
  --serif: "practical-serif", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--serif);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.logo img {
  height: 46px;
  width: auto;
  display: block;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--beige);
  flex: 1 1 auto;
  justify-content: center;
}

.header-pin {
  width: auto;
  height: 38px;
  flex: 0 0 auto;
}

.header-title h1 {
  margin: 0;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.3px;
}

.btn-back {
  background: var(--verdone);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 26px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.btn-back:hover {
  background: #0e2d27;
}

/* ---------- Layout ---------- */
.locator {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar {
  width: 480px;
  flex: 0 0 480px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: #fff;
}

.map {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- Search ---------- */
.search-box {
  position: relative;
  margin-bottom: 22px;
}

.search-box input {
  width: 100%;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text);
  padding: 14px 52px 14px 16px;
  border: none;
  box-shadow: 0 0 0 1px var(--border);
  outline: none;
}

.search-box input:focus {
  box-shadow: 0 0 0 1px var(--verdone);
}

#geolocate-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#geolocate-btn img {
  width: 22px;
  height: 22px;
}

#geolocate-btn .clear-icon {
  display: none;
  width: 20px;
  height: 20px;
  color: var(--verdone);
}

#geolocate-btn.clearing .geo-icon {
  display: none;
}

#geolocate-btn.clearing .clear-icon {
  display: block;
}

/* ---------- Promo ---------- */
.promo-box {
  border: 1px solid var(--border);
  padding: 18px;
  margin-bottom: 24px;
}

.promo-title {
  margin: 0 0 14px;
  font-size: 16px;
}

.promo-img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
}

.promo-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

.promo-filter input {
  width: 16px;
  height: 16px;
  accent-color: var(--verdone);
}

/* ---------- Store list ---------- */
.store-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--beige) var(--bg-soft);
}

/* WebKit (Chrome, Safari, Edge) */
.store-list::-webkit-scrollbar {
  width: 8px;
}

.store-list::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

.store-list::-webkit-scrollbar-thumb {
  background: var(--verdone);
  border-radius: 0;
}

.store-list::-webkit-scrollbar-thumb:hover {
  background: #9b9b9b;
}

.store-card {
  background: #f3f1f0;
  padding: 18px;
  margin-bottom: 14px;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}

.store-card.is-active {
  background: white;
  border: 1px solid var(--verdone);
}

.store-name {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.store-info {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.store-info .pin {
  width: auto;
  height: 25px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.store-info a {
  color: var(--text);
  text-decoration: none;
}
.store-info a:hover {
  text-decoration: underline;
}

.store-directions {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--verdone);
  text-decoration: underline;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--text);
}

.store-directions:hover {
  text-decoration: underline;
}

.store-empty {
  padding: 24px 0;
  color: var(--beige);
  font-size: 15px;
}

/* ---------- Info window (override Google) ---------- */
.gm-style .gm-style-iw-c {
  border-radius: 10px;
  border: 2px solid var(--verdone);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 16px 10px !important;
}
/* nasconde header e pulsante di chiusura */
.gm-style .gm-style-iw-chr,
.gm-style button.gm-ui-hover-effect {
  display: none !important;
}
.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
}
/* punta/triangolo personalizzata con bordo verdone */
.gm-style .gm-style-iw-tc::before {
  background: var(--verdone);
  -webkit-clip-path: polygon(0 0, 50% 100%, 100% 0);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  content: "";
  height: 13px;
  left: 0;
  position: absolute;
  top: -1px;
  width: 25px;
}
.gm-style .gm-style-iw-tc::after {
  background: #fff;
  -webkit-clip-path: polygon(0 0, 50% 100%, 100% 0);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  content: "";
  height: 11px;
  left: 1.5px;
  position: absolute;
  top: -2px;
  width: 22px;
}

.gm-iw-body {
  font-family: var(--serif);
  text-align: center;
  padding: 6px 12px;
}
.gm-iw-title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
}
.image-size{
  width: auto;
  height: 30px;
}
.gm-iw-divider {
  display: block;
  width: 70%;
  height: 1px;
  margin: 12px auto;
  background: var(--border);
}
.gm-iw-addr {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.store-details {
    color: black;
}

/* ---------- Autocomplete dropdown (Google .pac-*) ---------- */
.pac-container {
  font-family: var(--serif);
  border: 1px solid var(--verdone);
  border-top: none;
  border-radius: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  margin-top: -1px;
  background: #fff;
  width: 422px !important;
  left: 21px !important;
}

.pac-item {
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  border-top: 1px solid var(--border);
}

.pac-item:first-child {
  border-top: none;
}

.pac-item:hover,
.pac-item-selected {
  background: #f3f1f0;
}

.pac-item-query {
  font-size: 14px;
  color: var(--text);
}

.pac-matched {
  font-weight: 700;
  color: var(--verdone);
}

/* icona pin personalizzata al posto dello sprite di default */
.pac-icon,
.hdpi .pac-icon {
  width: 16px;
  height: 20px;
  margin-top: 4px;
  margin-right: 10px;
  background: url("/assets/media_doimo/pin-beige.png") no-repeat center / contain;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .locator {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex: 0 0 auto;
    max-height: 50vh;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .map {
    min-height: 50vh;
  }
  .header-title h1 {
    font-size: 22px;
  }
  .site-header {
    flex-wrap: wrap;
  }
}
