/* ============== HERO ============== */
.hero {
  display: block;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-content .hero-map-wrap {
  margin-left: auto;
  margin-right: auto;
}

.hero-content .eyebrow,
.eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E11D2E;
  margin: 0 0 1.25rem;
}

.hero-content h1,
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: #0A0A0A;
  margin: 0;
}

.hero-content h1 span,
.hero h1 span {
  color: #E11D2E;
}

.hero-copy {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgba(10, 10, 10, 0.6);
}

.hero-map-wrap {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.hero-map-wrap iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: #E11D2E;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 120ms ease, transform 120ms ease;
}

.map-button:hover {
  background: #B81525;
}

.map-button:active {
  transform: translateY(1px);
}

.hero-image-wrap {
  width: 100%;
}

.hero-shop-image {
  width: 100%;
  max-height: 420px;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.25);
}

/* ============== ADVANCED INVENTORY ============== */
.advanced-inventory-section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 900px) {
  .advanced-inventory-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ============== SHARED MODAL ============== */
/* Used by the auth modal (and matched by the inline newsletter modal in
   index.html). When a modal has `.open`, the backdrop fades in and the panel
   slides + scales up. `body.modal-open` locks page scroll while a modal is
   visible. */
.backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  transform: translateY(-12px) scale(0.96);
  opacity: 0;
  transition:
    transform 260ms cubic-bezier(.2, .7, .2, 1),
    opacity 220ms ease;
}

.backdrop.open .panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/* ============== AUTH MODAL ============== */
.auth-tab {
  position: relative;
  padding: 0.75rem 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(10, 10, 10, 0.55);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 160ms ease;
}

.auth-tab:hover {
  color: #0A0A0A;
}

.auth-tab.active {
  color: #E11D2E;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #E11D2E;
  border-radius: 2px;
}

.auth-input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-input:focus {
  border-color: #E11D2E;
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.2);
}

.auth-input[aria-invalid="true"] {
  border-color: #E11D2E;
}

.auth-error {
  margin-top: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #B81525;
  background: rgba(225, 29, 46, 0.08);
  border: 1px solid rgba(225, 29, 46, 0.25);
  border-radius: 0.5rem;
}

/* ============== PHASE 2: AUTH-PENDING (no flash) ============== */
/* While the initial getSession() is in flight we don't yet know if the user
   is signed in. Default to the signed-OUT state: Sign In stays visible from
   first paint (never an empty header), and only the signed-in elements are
   held back with visibility:hidden (space reserved, no layout shift) until
   the session is confirmed. Worst case a signed-in user sees "Sign In" for
   a beat before it swaps to Sign Out — better than no button at all. */
/* Fixed-width slot around the header auth links. Only one link is shown at
   a time; the slot reserves the width of the longer label ("Sign Out") so
   swapping Sign In ⇄ Sign Out — or the initial auth resolution — never
   moves the phone number / Search button around it. */
.nav-auth-slot {
  min-width: 4.25rem;
  text-align: center;
}

body.auth-pending #navAccount,
body.auth-pending #navSignOut,
body.auth-pending #navOwnerDash,
body.auth-pending #navUserPill,
body.auth-pending #mobileNavAccount,
body.auth-pending #mobileNavSignOut,
body.auth-pending #mobileNavOwnerDash {
  visibility: hidden;
}

/* ============== PHASE 2: OAUTH SECTION ============== */
.oauth-section {
  padding: 1.25rem 2rem 0.25rem;
}

.google-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 48px;
  padding: 0.6875rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: #0A0A0A;
  background: #FFFFFF;
  border: 1px solid rgba(10, 10, 10, 0.18);
  border-radius: 0.625rem;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.google-auth-button:hover {
  border-color: rgba(10, 10, 10, 0.32);
  box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.google-auth-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.google-auth-button:focus-visible {
  outline: none;
  border-color: #E11D2E;
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.2);
}

.google-auth-button[disabled],
.google-auth-button.is-loading {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.google-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0;
  color: rgba(10, 10, 10, 0.4);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(10, 10, 10, 0.12);
}

.auth-divider span {
  white-space: nowrap;
}

/* ============== PHASE 2: REASON BANNER (requireAuth) ============== */
.auth-reason {
  margin: 0 2rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0A0A0A;
  background: rgba(225, 29, 46, 0.08);
  border: 1px solid rgba(225, 29, 46, 0.22);
  border-left-width: 3px;
  border-radius: 0.5rem;
}

/* ============== PHASE 2: LOADING STATE ============== */
/* In-button spinner wrapper. MUST be its own class — `body.auth-loading`
   is a separate global state hook set by setAuthLoading(); if this rule
   used the bare `.auth-loading` selector it would also match <body> and
   turn the whole page into an inline-flex row (sections → columns). */
.auth-btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-loading-label {
  font-weight: inherit;
}

.auth-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: auth-spin 720ms linear infinite;
  flex: 0 0 14px;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

button.is-loading,
[data-auth-google].is-loading,
[data-auth="signout"].is-loading,
button[disabled],
.is-loading {
  cursor: not-allowed;
  pointer-events: none;
}

button.is-loading {
  opacity: 0.85;
}

/* ============== PHASE 2: USER PILL (navbar) ============== */
.user-pill {
  display: none;
  align-items: center;
  gap: 0.4rem;
  max-width: 12rem;
  padding: 0.3125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  flex: 0 0 6px;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

@media (min-width: 768px) {
  .user-pill.md\:inline-flex {
    display: inline-flex;
  }
}

/* ============== PHASE 2: TOAST ============== */
.auth-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  max-width: 22rem;
  padding: 0.6875rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #0A0A0A;
  border-radius: 0.625rem;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(120%);
  transition:
    opacity 200ms ease,
    transform 240ms cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}

.auth-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.auth-toast[data-variant="error"] {
  background: #B81525;
  box-shadow: 0 12px 32px -12px rgba(184, 21, 37, 0.55);
}

@media (max-width: 480px) {
  .auth-toast {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}
