/* ====== AUTH MODALS ====== */
.auth-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58,34,34,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 1.5rem;
}
.auth-modal-overlay.open { opacity: 1; pointer-events: all; }

.auth-modal {
  background: var(--blush);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(92,15,30,0.25);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34,1.3,0.64,1);
}
.auth-modal-overlay.open .auth-modal {
  transform: translateY(0) scale(1);
}

.auth-modal-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #9a7070; background: var(--cream);
  transition: background 0.3s;
}
.auth-modal-close:hover { background: var(--dusty-rose); color: white; }
/* Expanded invisible hit area to ~44px — visual size unchanged. */
.auth-modal-close::after { content:''; position:absolute; inset:-6px; }
.auth-modal-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.auth-modal-brand {
  text-align: center; margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(139,26,46,0.1);
}

.auth-modal-title {
  font-family: var(--font-display); font-size: 1.8rem;
  font-weight: 400; text-align: center;
  color: var(--charcoal); margin-bottom: 0.4rem;
}
.auth-modal-subtitle {
  font-family: var(--font-display); font-style: italic;
  font-size: 0.95rem; text-align: center;
  color: #9a7070; margin-bottom: 1.75rem;
}

/* Form fields */
.auth-field { margin-bottom: 1.1rem; }
.auth-field label {
  display: block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--charcoal); margin-bottom: 0.4rem;
}
.auth-field input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid rgba(139,26,46,0.18);
  border-radius: 6px; font-size: 0.9rem;
  background: white; color: var(--charcoal);
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: var(--font-body);
}
.auth-field input:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(139,26,46,0.08);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--burgundy); padding: 4px;
}

.pw-strength { margin-top: 6px; }

.auth-checkbox {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.82rem; color: var(--charcoal);
  cursor: pointer; margin-bottom: 0.75rem; line-height: 1.5;
}
.auth-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  accent-color: var(--burgundy); margin-top: 2px;
}

.auth-submit-btn {
  width: 100%; padding: 15px;
  font-size: 0.75rem; letter-spacing: 0.25em;
  margin-top: 0.5rem; margin-bottom: 1rem;
}

.auth-error {
  background: rgba(224,68,68,0.08);
  border: 1px solid rgba(224,68,68,0.2);
  border-radius: 6px; padding: 10px 14px;
  font-size: 0.82rem; color: #c04040;
  margin-bottom: 1rem; display: none;
}
.auth-error:not(:empty) { display: block; }

.auth-switch-msg {
  text-align: center; font-size: 0.82rem;
  color: #9a7070; margin: 0;
}
.auth-switch-msg a { color: var(--burgundy); font-weight: 500; }
.auth-switch-msg a:hover { text-decoration: underline; }

/* ── 6-digit code inputs ── */
.code-inputs {
  display: flex; gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0 1rem;
}
.code-digit {
  width: 52px; height: 62px;
  text-align: center; font-size: 1.6rem;
  font-family: var(--font-display);
  font-weight: 500; color: var(--burgundy);
  border: 2px solid rgba(139,26,46,0.2);
  border-radius: 8px;
  background: white;
  transition: border-color 0.3s, box-shadow 0.3s;
  caret-color: var(--burgundy);
}
.code-digit:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(139,26,46,0.12);
}
.code-digit:not(:placeholder-shown) {
  background: rgba(139,26,46,0.04);
}

/* ── Account dropdown menu ── */
.account-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: white; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(139,26,46,0.15);
  min-width: 200px; z-index: 1001;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.account-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.account-menu a {
  display: block; padding: 11px 18px;
  font-size: 0.82rem; color: var(--charcoal);
  transition: background 0.2s;
}
.account-menu a:hover { background: var(--cream); color: var(--burgundy); }

/* ── Account tiles in My Account modal ── */
.account-tile {
  background: white; border: 1.5px solid rgba(139,26,46,0.15);
  border-radius: 12px; padding: 1.5rem 1rem;
  text-align: center; cursor: pointer;
  transition: all 0.3s; font-family: var(--font-body);
  color: var(--charcoal);
}
.account-tile:hover {
  border-color: var(--burgundy);
  background: rgba(139,26,46,0.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,26,46,0.1);
}

/* ── Wishlist badge on nav ── */
#wishlist-badge {
  position: absolute; top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--burgundy); color: white;
  border-radius: 50%; font-size: 0.6rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0); transition: all 0.3s ease;
}
#wishlist-badge.show { opacity: 1; transform: scale(1); }

/* ── Wishlist heart on cards — logged-in state ── */
.wishlist-btn.wishlisted svg { fill: var(--burgundy); stroke: var(--burgundy); }
.wishlist-btn.wishlisted { color: var(--burgundy); }

/* ── Form group style (re-used in modals) ── */
.auth-modal .form-group {
  display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0;
}
.auth-modal .form-group label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--charcoal);
}
.auth-modal .form-group input {
  padding: 11px 14px;
  border: 1.5px solid rgba(139,26,46,0.18);
  border-radius: 6px; font-size: 0.85rem;
  background: white; color: var(--charcoal);
  transition: border-color 0.3s;
  font-family: var(--font-body);
}
.auth-modal .form-group input:focus { border-color: var(--burgundy); }

/* ── Nav account button wrapper ── */
.nav-account-wrap {
  position: relative;
}

@media (max-width: 480px) {
  .auth-modal { padding: 2rem 1.5rem; }
  .code-digit { width: 44px; height: 54px; font-size: 1.4rem; }
}

/* ── Destructive confirmation (account deletion) ──────────────────────
   Reuses .auth-modal-overlay / .auth-modal so it matches the rest of the
   storefront; only the destructive-specific pieces are defined here. */
.danger-modal { max-width: 420px; }
.danger-label {
  display: block; font-size: 0.78rem; letter-spacing: 0.5px;
  color: #6a5050; margin: 0 0 0.4rem;
}
.danger-input {
  width: 100%; padding: 0.7rem 0.8rem; margin: 0 0 1.1rem;
  border: 1px solid var(--cream); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; background: #fff; color: #3A3A3A;
}
.danger-input:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 2px; }
.danger-actions { display: flex; gap: 0.6rem; justify-content: flex-end; flex-wrap: wrap; }
.danger-cancel, .danger-confirm {
  border-radius: 999px; padding: 0.7rem 1.3rem; font-family: inherit;
  font-size: 0.82rem; cursor: pointer; min-height: 44px; min-width: 116px;
}
.danger-cancel { background: transparent; border: 1px solid var(--dusty-rose); color: #6a5050; }
.danger-cancel:hover { background: rgba(212,165,160,0.15); }
.danger-confirm { background: #b3261e; border: 1px solid #b3261e; color: #fff; }
.danger-confirm:hover:not(:disabled) { background: #96201a; border-color: #96201a; }
.danger-confirm:disabled { opacity: 0.45; cursor: not-allowed; }
.danger-cancel:focus-visible, .danger-confirm:focus-visible {
  outline: 2px solid var(--burgundy); outline-offset: 2px;
}
@media (max-width: 480px) {
  .danger-actions { flex-direction: column-reverse; }
  .danger-cancel, .danger-confirm { width: 100%; }
}
