/* Variáveis próprias — funciona mesmo sem product-page.css (ex.: index.html) */
:root {
  --flores-primary: #922041;
  --flores-primary-soft: #fdf2f5;
  --flores-success: #16a34a;
  --flores-white: #ffffff;
  --flores-foreground: #1c1917;
  --flores-muted: #78716c;
  --flores-border: #e7e5e4;
  --flores-background: #f5f5f4;
}

/* Location bar + modal */
.product-header-inner,
.checkout-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.header-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(52vw, 200px);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.header-location:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
}

.header-location svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.header-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-location.is-loading span::after {
  content: "";
  display: inline-block;
  width: 4px;
  animation: loc-dots 1.2s steps(3, end) infinite;
}

@keyframes loc-dots {
  0% { content: ""; }
  33% { content: "."; }
  66% { content: ".."; }
  100% { content: "..."; }
}

.flores-location-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 60;
}

.flores-location-bar .header-location {
  color: var(--foreground);
  border-color: var(--border);
  background: var(--background);
  max-width: 100%;
  font-size: 13px;
}

.flores-location-bar .header-location svg {
  color: var(--primary);
}

body.flores-loc-open { overflow: hidden; }

/* Modal de confirmação (entrada no site) */
.flores-location-confirm {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.flores-location-confirm[hidden] { display: none !important; }

.flores-confirm-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: min(400px, 100%);
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  opacity: 1;
  position: relative;
  z-index: 1;
  border: 1px solid #e7e5e4;
}

.flores-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fdf2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.flores-confirm-icon svg {
  width: 28px;
  height: 28px;
  color: #922041;
}

.flores-confirm-dialog h2 {
  font-size: 20px;
  font-weight: 800;
  color: #922041;
  margin-bottom: 14px;
  line-height: 1.3;
}

.flores-confirm-text {
  font-size: 14px;
  color: #78716c;
  line-height: 1.55;
  margin-bottom: 22px;
}

.flores-confirm-text strong {
  color: #1c1917;
  font-weight: 700;
}

.flores-confirm-yes {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  background: #16a34a;
  color: #ffffff;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
  transition: filter 0.15s ease;
}

.flores-confirm-yes:hover { filter: brightness(1.05); }

.flores-confirm-yes:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.flores-confirm-change {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  background: none;
  color: #78716c;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px;
}

.flores-confirm-change:hover { color: #1c1917; }

.flores-confirm-change svg { opacity: 0.7; }

/* Modal trocar localização */
.flores-location-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  pointer-events: auto;
}

.flores-location-modal[hidden] { display: none !important; }

.flores-location-dialog {
  background: #ffffff;
  border-radius: 20px 20px 16px 16px;
  width: min(420px, 100%);
  padding: 24px 20px 20px;
  position: relative;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e7e5e4;
  opacity: 1;
}

.flores-location-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f5f5f4;
  cursor: pointer;
  font-size: 16px;
  color: #1c1917;
}

.flores-location-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fdf2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
}

.flores-location-dialog h2 {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #922041;
  margin-bottom: 6px;
}

.flores-location-sub {
  text-align: center;
  font-size: 13px;
  color: #78716c;
  margin-bottom: 18px;
}

.flores-loc-field { margin-bottom: 12px; }

.flores-loc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1c1917;
}

.flores-loc-field select {
  width: 100%;
  border: 1.5px solid #e7e5e4;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 14px;
  background: #ffffff;
  color: #1c1917;
}

.flores-loc-save {
  width: 100%;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  padding: 14px;
  background: #16a34a;
  color: #ffffff;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.flores-loc-save:disabled { opacity: 0.45; cursor: not-allowed; }

.flores-loc-detect {
  width: 100%;
  margin-top: 10px;
  border: none;
  background: none;
  color: #922041;
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}

.flores-loc-detect:disabled { opacity: 0.5; cursor: wait; }
