/* Address modal — Knuspr style (2-step) */
.addr-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.addr-overlay.open { display: flex; }

.addr-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,.2);
  animation: addr-pop .2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes addr-pop {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.addr-modal__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color .15s;
}
.addr-modal__close:hover { border-color: #999; }

.addr-modal__body {
  padding: 2rem 1.5rem 1.25rem;
  text-align: center;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.addr-modal__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1d1b;
  margin-bottom: .5rem;
  line-height: 1.25;
}

.addr-modal__desc {
  font-size: .9rem;
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── STEP 1: Area cards ── */
.addr-areas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.addr-area {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; padding: .75rem;
  border: 3px solid transparent;
  border-radius: 12px;
  cursor: pointer; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
  width: 130px;
  background: none;
  font: inherit;
  color: #1a1d1b;
}
.addr-area:hover { border-color: #ddd; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.addr-area.active { border-color: #ff6b00; box-shadow: 0 0 0 2px rgba(255,107,0,.15); }

.addr-area__img {
  width: 100px; height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
}

.addr-area__name {
  font-size: .85rem;
  font-weight: 700;
  color: inherit;
}
.addr-area.active .addr-area__name { color: #ff6b00; }

.addr-enter-link {
  font-size: .85rem;
  color: #666;
  margin-bottom: 1.5rem;
}
.addr-enter-link a {
  color: #1a1d1b;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.addr-go-btn {
  display: inline-block;
  padding: .85rem 2.5rem;
  background: #ff6b00;
  color: #fff;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: .5rem;
}
.addr-go-btn:hover { background: #e65c00; }

/* ── STEP 2: Address input ── */
.addr-step2 { display: none; }
.addr-step2.visible { display: block; }

.addr-modal__login {
  font-size: .85rem;
  color: #666;
  margin-bottom: 1.25rem;
}
.addr-modal__login a {
  color: #1a1d1b;
  font-weight: 700;
  text-decoration: underline;
}

.addr-modal__label {
  display: block;
  text-align: left;
  font-size: .8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: .4rem;
}

.addr-modal__row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.addr-modal__input {
  flex: 1;
  padding: .7rem .85rem .7rem 2.5rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font: inherit;
  font-size: .9rem;
  color: #333;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") .75rem center no-repeat;
  transition: border-color .15s, box-shadow .15s;
}
.addr-modal__input:focus {
  outline: none;
  border-color: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,.12);
}
.addr-modal__input::placeholder { color: #aaa; }

.addr-modal__save {
  padding: .7rem 1.75rem;
  background: #ff6b00;
  color: #fff;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.addr-modal__save:hover { background: #e65c00; }

.addr-modal__tip {
  text-align: left;
  font-size: .8rem;
  color: #888;
  margin-bottom: 1rem;
  padding: 0 .25rem;
}
.addr-modal__tip strong { color: #555; }
.addr-modal__tip a {
  color: #1a1d1b;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.addr-back-link {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; color: #888; cursor: pointer;
  background: none; border: none; font: inherit;
  margin-bottom: .5rem;
  transition: color .15s;
}
.addr-back-link:hover { color: #ff6b00; }

/* ── Portes / zona (Knuspr-style) ── */
.addr-delivery-info {
  margin: 0 0 0;
  padding: 0.9rem 1rem;
  text-align: left;
  background: #f6fbf7;
  border-top: 1px solid #d8eadc;
  border-bottom: 1px solid #e8e8e8;
}
.addr-delivery-info[hidden] {
  display: none !important;
}
.addr-delivery-info__title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #0a8f3c;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}
.addr-delivery-info__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1.25rem;
  margin-bottom: 0.4rem;
}
.addr-delivery-info__price {
  font-size: 0.875rem;
  color: #333;
}
.addr-delivery-info__price strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
}
.addr-delivery-info__free {
  font-size: 0.8125rem;
  color: #555;
}
.addr-delivery-info__meta {
  font-size: 0.78rem;
  color: #666;
  margin: 0;
  line-height: 1.45;
}
.addr-delivery-info__pill {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: #e6f4ec;
  color: #1b6d3d;
  font-weight: 700;
  font-size: 0.72rem;
}

/* ── MAP ── */
.addr-modal__map-wrap {
  flex-shrink: 0;
  background: #ececec;
  border-top: 1px solid #e0e0e0;
}
.addr-modal__map-label {
  margin: 0;
  padding: 0.4rem 1rem 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  background: #f5f5f5;
}
.addr-modal__map {
  width: 100%;
  height: min(300px, 38vh);
  min-height: 220px;
  background: #e8e8e8;
}

.addr-modal__map .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: 0;
  font-family: inherit;
}

/* Marcador laranja (tipo Knuspr) */
.addr-leaflet-divicon {
  background: transparent !important;
  border: none !important;
}
.addr-leaflet-pin {
  width: 36px;
  height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}
.addr-leaflet-pin__inner {
  width: 26px;
  height: 26px;
  background: #ff6b00;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin-bottom: 10px;
  box-sizing: border-box;
}
