/* ================================================
   LOGIN / SIGNUP MODAL
   ================================================ */

.login-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.login-overlay.open {
  display: flex;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── MODAL BOX ── */
.login-modal {
  position: relative;
  width: 800px;
  height: 500px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.3);
  animation: slideUp 0.55s cubic-bezier(0.22,1,0.36,1);
}

/* RESPONSIVE LOGIN MODAL */
@media (max-width: 1024px) {
  .login-modal {
    width: 90%;
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .login-modal {
    width: 95%;
    max-width: 600px;
    height: auto;
  }
}

@media (max-width: 480px) {
  .login-modal {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
  }
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── CLOSE BUTTON ── */
.login-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.9rem;
  color: #aaa;
  cursor: pointer;
  z-index: 30;
  line-height: 1;
  padding: 0;
  transition: color 0.2s, transform 0.2s;
}
.login-close:hover {
  color: #111827;
  transform: rotate(90deg);
}

/* ================================================
   FORM PANELS
   ================================================ */

.login-panel,
.signup-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 44px;
  background: #fff;
  z-index: 5;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .login-panel,
  .signup-panel {
    width: 100%;
    padding: 40px 30px;
  }
}

@media (max-width: 480px) {
  .login-panel,
  .signup-panel {
    padding: 30px 20px;
  }
}

.login-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
  transition: opacity 0.4s ease,
              transform 0.65s cubic-bezier(0.76,0,0.24,1);
}

.signup-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  transition: opacity 0.4s ease,
              transform 0.65s cubic-bezier(0.76,0,0.24,1);
}

.login-modal.switched .login-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}
.login-modal.switched .signup-panel {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

/* ── HEADINGS ── */
.login-panel h1,
.signup-panel h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  font-family: 'Playfair Display', serif;
}

@media (max-width: 768px) {
  .login-panel h1,
  .signup-panel h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .login-panel h1,
  .signup-panel h1 {
    font-size: 1.25rem;
  }
}
.login-subtitle {
  color: #9ca3af;
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* ── FIELDS ── */
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 5px;
}
.login-field input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 0.9rem;
  color: #111827;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.login-field input:focus {
  border-color: #111827;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.08);
}
.login-field input::placeholder { color: #d1d5db; }

/* ── FORGOT ── */
.login-forgot {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: #9ca3af;
  text-decoration: none;
  margin-top: -4px;
  margin-bottom: 18px;
}
.login-forgot:hover { color: #111827; }

/* ── BUTTON ── */
.login-btn {
  width: 100%;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: background 0.2s, transform 0.15s;
}
.login-btn:hover  { background: #1f2937; }
.login-btn:active { transform: scale(0.97); }

/* ── DIVIDER ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #d1d5db;
  font-size: 0.78rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #f3f4f6;
}

/* ── SWITCH LINK ── */
.login-switch {
  text-align: center;
  font-size: 0.84rem;
  color: #9ca3af;
  margin: 0;
}
.login-switch span {
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.login-switch span:hover { opacity: 0.7; }

/* ================================================
   IMAGE PANEL — ALWAYS fixed on RIGHT
   ================================================ */

.login-slider {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  overflow: hidden;
  z-index: 10;
}

.slider-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.slider-bg--login {
  opacity: 1;
  transition: opacity 0.5s ease;
}
.slider-bg--signup {
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: translateX(-20px);
}
.login-modal.switched .slider-bg--login  { opacity: 0; }
.login-modal.switched .slider-bg--signup { opacity: 1; }

.slider-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent;
  z-index: 1;
}

.login-slider-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 44px;
  box-sizing: border-box;
}

.login-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.3);
}

.login-slider h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

.login-slider p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 34px;
}

.login-slider-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,0.7);
  color: #fff;
  padding: 11px 34px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
}
.login-slider-btn:hover {
  background: rgba(255,255,255,0.28);
  border-color: #fff;
}

/* ── TOAST ── */
.login-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: #fff;
  padding: 11px 26px;
  border-radius: 50px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999999;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.1);
}
.login-toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.login-toast.success { border-color: #4ade80; color: #4ade80; }
.login-toast.error   { border-color: #f87171; color: #f87171; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .login-modal { width: 95vw; height: auto; min-height: 520px; }
  .login-panel, .signup-panel {
    position: relative;
    width: 100%;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: all !important;
  }
  .login-modal.switched .login-panel  { display: none; }
  .login-modal.switched .signup-panel { display: flex; }
  .login-slider { display: none; }
}

/* ================================================
   PROFILE SETUP
   ================================================ */

/* Left panel — scrollable so content fits in 500px */
#profileModal .login-panel {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: 30px;
  padding-bottom: 20px;
}

/* Photo preview card */
.profile-preview {
  width: 100%;
  height: 150px;
  border: 1.5px dashed #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-top: 6px;
  margin-bottom: 14px;
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.profile-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #9ca3af;
}
.profile-preview-empty i { font-size: 2rem; }

/* Right panel — address/details/password tabs */
.address-panel {
  width: 100%;
  height: 100%;
  padding: 28px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #f9fafb;
  border-left: 1px solid #f3f4f6;
  overflow-y: auto;
}

/* 3-tab toggle */
.panel-toggle {
  display: flex;
  gap: 5px;
  margin-bottom: 16px;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 10px;
  flex-shrink: 0;
}

.toggle-btn {
  flex: 1;
  padding: 7px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.toggle-btn.active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.toggle-btn:hover:not(.active) { color: #374151; }

/* Tab content */
.tab-content { animation: fadeIn 0.2s ease; }
.tab-content .login-field       { margin-bottom: 10px; }
.tab-content .login-field input  { background: #fff; padding: 6px 10px; }
.tab-content .login-btn          { padding: 10px; margin-top: 6px; }

/* Two col row */
.addr-row { display: flex; gap: 10px; }
.addr-row .login-field { flex: 1; }