/* Correcciones de bolsa y navegación para navegadores móviles. */
.checkout-modal .pickup-choice[hidden],
.home-delivery-choice[hidden] {
  display: none !important;
}

.shop-head .search {
  min-width: min(100%, 330px);
  min-height: 50px;
  padding: 7px 14px;
  border: 1px solid #d8cbd1;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(65, 40, 51, .09);
}

.shop-head .search > span:first-child {
  color: #a51d58;
  font-size: 21px;
}

.shop-head .search input {
  min-width: 210px;
  color: #211b1e;
  font-size: 14px;
}

.shop-head .search input::placeholder {
  color: #756a70;
  opacity: 1;
}

@media (max-width: 700px) {
  .checkout-modal[open] {
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
    overscroll-behavior: contain;
  }

  .checkout-modal .checkout-heading {
    top: 0;
    padding-top: calc(16px + env(safe-area-inset-top));
    background: #fff8fb;
  }

  .checkout-modal .modal-close {
    position: fixed !important;
    top: calc(9px + env(safe-area-inset-top)) !important;
  }

  .checkout-modal form {
    min-height: calc(100dvh - 78px);
    align-content: start;
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .checkout-modal .checkout-submit {
    position: fixed !important;
    right: 14px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    left: 14px !important;
    z-index: 100000 !important;
    width: auto !important;
    min-height: 54px !important;
    margin: 0 !important;
    border: 2px solid #fff !important;
    box-shadow: 0 9px 28px rgba(18,80,51,.32) !important;
  }

  #delivery-map {
    position: relative !important;
    inset: auto !important;
    z-index: 0 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 190px !important;
    min-height: 190px !important;
    margin: 0 !important;
    overflow: hidden !important;
    contain: layout paint;
    isolation: isolate;
  }

  .home-delivery-choice {
    min-width: 0;
    overflow: hidden;
  }

  #delivery-map .leaflet-map-pane,
  #delivery-map .leaflet-pane {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
  }

  #delivery-map .leaflet-tile {
    width: 256px !important;
    height: 256px !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: initial !important;
  }

  .checkout-modal .privacy {
    margin-bottom: 4px !important;
  }

  .shop-head .search {
    width: 100%;
    min-width: 0;
    border-color: #cdbbc3;
    box-shadow: 0 8px 24px rgba(65, 40, 51, .12);
  }

  .mobile-dock {
    position: fixed !important;
    z-index: 60 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: grid !important;
    visibility: visible !important;
  }

  .mobile-dock [data-mobile-cart] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .cart,
  .product-cart-drawer {
    z-index: 70 !important;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .overlay,
  .product-cart-overlay {
    z-index: 69 !important;
  }

  .cart-items,
  .product-cart-items {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .cart-summary,
  .product-cart-summary {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    max-height: 44dvh;
    overflow-y: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    background: #fff;
  }

  #checkout-button,
  #product-checkout-button {
    min-height: 50px;
    display: inline-flex;
    flex: 0 0 auto;
  }
}

#delivery-map[data-loading="true"] {
  position: relative;
}

#delivery-map[data-loading="true"]::after {
  content: "Preparando mapa…";
  position: absolute;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7b6670;
  background: linear-gradient(110deg,#f7f1f4,#fff,#f7f1f4);
  background-size: 200% 100%;
  font-size: 11px;
  font-weight: 700;
  animation: map-loading 1.2s linear infinite;
}

@keyframes map-loading {
  to { background-position: -200% 0; }
}
