.bss-popup-open {
  overflow: hidden;
}

.bss-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  z-index: 9998;
}

.bss-popup-shell.bss-popup-active {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  display: block !important;
  width: min(92vw, 680px);
  transform: translate(-50%, -50%);
}

.bss-popup-card {
  position: relative;
  padding: 2rem;
  border-radius: 20px;
  background: #fffaf4;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.bss-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: #2f241f;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.store-popup-grid h3 {
  margin: 0 0 1.25rem;
  text-align: center;
}

.store-buttons {
  display: grid;
  gap: 0.75rem;
}

.bss-store-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bss-store-dropdown .current-store-label {
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.bss-store-dropdown .current-store-label .bss-location-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.bss-store-dropdown .current-store-label .menu-city {
  display: block;
}

.bss-store-dropdown .store-dropdown-list {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  min-width: 220px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid #e6ddd2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.bss-store-dropdown:hover .store-dropdown-list,
.bss-store-dropdown:focus-within .store-dropdown-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bss-store-dropdown .store-dropdown-list a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
}

.bss-store-dropdown .store-dropdown-list a:hover,
.bss-store-dropdown .store-dropdown-list a:focus {
  background: #f7f1e8;
  outline: none;
}

@media (max-width: 640px) {
  .bss-popup-card {
    padding: 1.5rem 1.25rem;
  }
}

/*
 * Store switcher header dropdown overrides
 * Added on 2026-04-30 to improve alignment, spacing, and responsiveness.
 * Purpose:
 * - tighten spacing between the location icon and the city label
 * - center the dropdown under the visible trigger instead of the wrapper edge
 * - add a clean visual gap between trigger and dropdown panel
 * - add a centered pointer that targets the Paris trigger
 * - keep the popup responsive on tablet and mobile
 */
.bss-store-dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.bss-store-dropdown .current-store-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.bss-store-dropdown .current-store-label .bss-location-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin: 0;
  flex: 0 0 auto;
}

.bss-store-dropdown .current-store-label .menu-city {
  display: block;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}

.bss-store-dropdown .store-dropdown-list {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 200;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 32px));
  margin: 0;
  padding: 10px;
  list-style: none;
  border: 1px solid #e6ddd2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.14);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.bss-store-dropdown .store-dropdown-list::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-top: 1px solid #e6ddd2;
  border-left: 1px solid #e6ddd2;
  transform: translateX(-50%) rotate(45deg);
}

.bss-store-dropdown:hover .store-dropdown-list,
.bss-store-dropdown:focus-within .store-dropdown-list {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.bss-store-dropdown .store-dropdown-list a {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  white-space: normal;
}

.bss-store-dropdown .store-dropdown-list a:hover,
.bss-store-dropdown .store-dropdown-list a:focus {
  background: #f7f1e8;
  outline: none;
}

@media (max-width: 1024px) {
  .bss-store-dropdown .store-dropdown-list {
    min-width: 200px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 640px) {
  .bss-store-dropdown .current-store-label {
    gap: 3px;
  }

  .bss-store-dropdown .current-store-label .bss-location-icon {
    width: 24px;
    height: 24px;
  }

  .bss-store-dropdown .store-dropdown-list {
    top: calc(100% + 12px);
    padding: 8px;
    border-radius: 14px;
  }

  .bss-store-dropdown .store-dropdown-list a {
    padding: 10px 14px;
  }
}

/*
 * Store switcher dropdown alignment refinements
 * Added on 2026-04-30 second pass.
 * Purpose:
 * - keep only one pointer arrow
 * - remove the center pointer introduced by the first override
 * - shift the popup left so it aligns better with the location trigger
 * - keep the popup fully visible on tablet and mobile
 */
.bss-store-dropdown .store-dropdown-list::before {
  content: none !important;
  display: none !important;
}

.bss-store-dropdown .store-dropdown-list {
  left: auto;
  right: -16px;
  max-width: min(280px, calc(100vw - 20px));
  transform: translateY(6px);
}

.bss-store-dropdown:hover .store-dropdown-list,
.bss-store-dropdown:focus-within .store-dropdown-list {
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .bss-store-dropdown .store-dropdown-list {
    right: -16px;
    max-width: calc(100vw - 16px);
  }
}

@media (max-width: 640px) {
  .bss-store-dropdown .store-dropdown-list {
    right: -16px;
    max-width: calc(100vw - 12px);
  }
}

/*
 * Store switcher hover-gap refinement
 * Added on 2026-04-30 third pass.
 * Purpose:
 * - reduce the vertical gap between the trigger and the dropdown
 * - make the popup easier to reach while hovering
 */
.bss-store-dropdown .store-dropdown-list {
  top: calc(100% + 4px);
}

@media (max-width: 640px) {
  .bss-store-dropdown .store-dropdown-list {
    top: calc(100% + 4px);
  }
}

/*
 * Store switcher trigger spacing refinement
 * Added on 2026-04-30 fourth pass.
 * Purpose:
 * - reduce the gap between the location icon and the city label
 */
.bss-store-dropdown .current-store-label {
  gap: 1px;
  position: relative;
  padding-bottom: 14px;
  min-height: 42px;
  overflow: visible;
}

.bss-store-dropdown .current-store-label .dashicons-location {
  margin-bottom: 5px !important;
}

.bss-store-dropdown .current-store-label .menu-city {
  position: absolute;
  bottom: -2px;
  left: 50%;
  display: block;
  width: max-content;
  max-width: min(140px, calc(100vw - 24px));
  margin-top: 0;
  transform: translateX(-50%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}

.bss-store-dropdown .current-store-label .bss-location-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 24px;
  min-width: 24px;
  min-height: 24px;
  overflow: visible;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .bss-store-dropdown,
  .bss-store-dropdown .current-store-label {
    display: inline-flex !important;
    overflow: visible !important;
  }

  .bss-store-dropdown .current-store-label {
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 14px;
  }

  .bss-store-dropdown .current-store-label .bss-location-icon {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 24px !important;
    height: 24px !important;
    max-width: none !important;
    flex: 0 0 24px !important;
  }
}

@media (max-width: 640px) {
  .bss-store-dropdown .current-store-label {
    min-height: 40px;
    padding-bottom: 13px;
  }

  .bss-store-dropdown .current-store-label .menu-city {
    max-width: min(120px, calc(100vw - 20px));
  }
}
