/* ============================================================
   RESINFY — Auth Modal & Toast — Luxury Edition
   ============================================================ */

/* ── Toast ──────────────────────────────────────────────────── */
.resin-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--brown, #2c1f0f);
  color: var(--accent-2, #c9a96e);
  border: 1px solid rgba(160,120,64,0.3);
  padding: 11px 28px;
  border-radius: 2px;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  font-weight: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 99999;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(44,31,15,0.25);
}
.resin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Nav Auth Button ────────────────────────────────────────── */
.nav-auth-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(244,237,224,0.55);
  text-decoration: none;
  padding: 7px 16px;
  border: 1px solid rgba(201,169,110,0.25);
  border-radius: 2px;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}
.nav-auth-btn:hover,
.nav-auth-btn.nav-logged-in { color: var(--accent-2, #c9a96e); border-color: rgba(201,169,110,0.6); }

/* ── Auth Overlay ───────────────────────────────────────────── */
.auth-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(44,31,15,0.55);
  backdrop-filter: blur(5px);
  z-index: 9800;
}
.auth-overlay.open { display: block; }

/* ── Auth Modal ─────────────────────────────────────────────── */
.auth-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 93vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #faf6ef;
  border: 1px solid rgba(160,120,64,0.18);
  border-radius: 4px;
  padding: 40px 36px 36px;
  z-index: 9900;
  box-shadow: 0 24px 80px rgba(44,31,15,0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(160,120,64,0.25) transparent;
}
.auth-modal.open { display: block; }

/* ── Close ──────────────────────────────────────────────────── */
.auth-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none;
  color: #7a6650; font-size: 1rem;
  cursor: pointer; transition: color 0.2s; line-height: 1; padding: 4px 8px;
}
.auth-close:hover { color: #a07840; }

.auth-section { display: none; }

/* ── Header ─────────────────────────────────────────────────── */
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-logo-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: #2c1f0f;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 600; color: #c9a96e;
  margin: 0 auto 14px;
}
.auth-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.55rem; font-weight: 500; color: #1e150a; margin: 0 0 5px; }
.auth-subtitle { font-family: 'Jost', sans-serif; font-size: 0.8rem; font-style: italic; color: #7a6650; margin: 0; font-weight: 300; }

.profile-auth-header .auth-avatar-circle {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(160,120,64,0.08); border: 1px solid rgba(160,120,64,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 14px;
}

/* ── Google btn ─────────────────────────────────────────────── */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  background: #f4ede0; border: 1px solid rgba(44,31,15,0.12); border-radius: 2px;
  color: #1e150a; font-family: 'Jost', sans-serif; font-size: 0.82rem; font-weight: 400;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.google-btn:hover { background: #ede4d3; border-color: rgba(44,31,15,0.22); }

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: #7a6650; font-size: 0.72rem; letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(44,31,15,0.1); }

/* ── Fields ─────────────────────────────────────────────────── */
.auth-field-group { margin-bottom: 14px; }
.auth-field-group label {
  display: block; font-family: 'Jost', sans-serif; font-size: 0.65rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: #7a6650;
  margin-bottom: 5px; font-weight: 400;
}
.auth-field-group input, .auth-field-group textarea {
  width: 100%; padding: 10px 13px;
  background: #f4ede0; border: 1px solid rgba(44,31,15,0.12); border-radius: 2px;
  color: #1e150a; font-family: 'Jost', sans-serif; font-size: 0.88rem; font-weight: 300;
  transition: border-color 0.2s; box-sizing: border-box; resize: none;
}
.auth-field-group input:focus, .auth-field-group textarea:focus { outline: none; border-color: #a07840; background: #fff; }
.auth-field-group input::placeholder, .auth-field-group textarea::placeholder { color: #b5a08a; }

/* ── Errors ─────────────────────────────────────────────────── */
.auth-error { font-family: 'Jost', sans-serif; font-size: 0.78rem; color: #9b3a3a; margin: -6px 0 12px; }
.auth-error.hidden { display: none; }
.auth-success {
  font-family: 'Jost', sans-serif; font-size: 0.8rem; color: #4a7c59;
  background: rgba(74,124,89,0.07); border: 1px solid rgba(74,124,89,0.18);
  border-radius: 2px; padding: 9px 13px; margin-bottom: 12px; text-align: center;
}
.auth-success.hidden { display: none; }

.auth-submit-btn { width: 100%; margin-top: 4px; }

/* ── Switch link ─────────────────────────────────────────────── */
.auth-switch { text-align: center; font-family: 'Jost', sans-serif; font-size: 0.78rem; color: #7a6650; margin-top: 16px; font-weight: 300; }
.auth-switch button { background: none; border: none; color: #a07840; cursor: pointer; font-size: inherit; font-family: inherit; text-decoration: underline; padding: 0; }
.auth-switch button:hover { opacity: 0.7; }

/* ── Forgot password ─────────────────────────────────────────── */
.password-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.password-label-row label { margin-bottom: 0; }
.forgot-link { background: none; border: none; color: #a07840; font-family: 'Jost', sans-serif; font-size: 0.7rem; cursor: pointer; padding: 0; text-decoration: underline; transition: opacity 0.2s; font-weight: 300; }
.forgot-link:hover { opacity: 0.7; }

/* ── Logout ──────────────────────────────────────────────────── */
.auth-logout-btn {
  width: 100%; margin-top: 16px; padding: 10px;
  background: transparent; border: 1px solid rgba(155,58,58,0.2); border-radius: 2px;
  color: #9b3a3a; font-family: 'Jost', sans-serif; font-size: 0.78rem;
  cursor: pointer; transition: background 0.2s, border-color 0.2s; letter-spacing: 0.06em;
}
.auth-logout-btn:hover { background: rgba(155,58,58,0.06); border-color: rgba(155,58,58,0.35); }

/* ── Profile orders ──────────────────────────────────────────── */
.profile-orders-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(44,31,15,0.08); }
.profile-orders-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 500; color: #1e150a; margin: 0 0 12px; }
.profile-order-card { background: #f4ede0; border: 1px solid rgba(44,31,15,0.08); border-radius: 4px; padding: 12px 14px; margin-bottom: 8px; }
.profile-order-card.status-paid      { border-color: rgba(74,124,89,0.2); }
.profile-order-card.status-shipped   { border-color: rgba(74,111,165,0.2); }
.profile-order-card.status-delivered { border-color: rgba(160,120,64,0.25); }
.profile-order-card.status-cancelled { opacity: 0.55; }
.profile-order-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.profile-order-items { font-size: 0.76rem; color: #7a6650; margin-bottom: 7px; font-style: italic; }
.profile-order-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; }
.profile-tracking { font-size: 0.72rem; color: #a07840; margin-top: 5px; }

/* ── Badge colours ───────────────────────────────────────────── */
.aorder-id { font-family: monospace; font-size: 0.78rem; color: #a07840; }
.aorder-badge { font-size: 0.68rem; padding: 2px 8px; border-radius: 2px; }
.badge-pending   { background: rgba(176,128,64,0.1); color: #8b6030; border: 1px solid rgba(176,128,64,0.2); }
.badge-paid      { background: rgba(74,124,89,0.1);  color: #3a6b47; border: 1px solid rgba(74,124,89,0.2); }
.badge-cancelled { background: rgba(155,58,58,0.08); color: #7a3030; border: 1px solid rgba(155,58,58,0.2); }
.badge-shipped   { background: rgba(74,111,165,0.1); color: #3a5a8a; border: 1px solid rgba(74,111,165,0.2); }
.badge-delivered { background: rgba(160,120,64,0.1); color: #a07840; border: 1px solid rgba(160,120,64,0.2); }
.aorder-badge.badge-shipped   { background: rgba(74,111,165,0.1); color: #3a5a8a; }
.aorder-badge.badge-delivered { background: rgba(160,120,64,0.1); color: #a07840; }
.btn-mark-shipped   { background: rgba(74,111,165,0.08) !important; color: #3a5a8a !important; border-color: rgba(74,111,165,0.2) !important; }
.btn-mark-delivered { background: rgba(160,120,64,0.08) !important; color: #a07840 !important; border-color: rgba(160,120,64,0.2) !important; }

/* ── Product card link overlay ───────────────────────────────── */
.product-card { position: relative; }
.product-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product-card .btn-add-cart, .product-card .product-wishlist, .product-card .product-badge { position: relative; z-index: 2; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-modal { padding: 30px 20px 26px; }
  .nav-auth-btn { display: none; }
}
@media (min-width: 769px) { #mobileAuthBtn { display: none; } }
