/* Velmoras — Account page */

/* Guest state */
.acct-guest {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 24px;
}
.acct-guest-card {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
}
.acct-guest-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px; font-weight: 600;
  color: #111; margin: 0 0 8px; letter-spacing: -0.5px;
}
.acct-guest-card h1 em { color: var(--green, #1e5b3a); font-weight: 700; font-style: italic; }
.acct-guest-card p { color: #757575; font-size: 15px; margin: 0 0 24px; }
.acct-guest-cta { display: inline-flex; gap: 10px; }

/* Signed-in layout */
.acct-wrap {
  max-width: 1180px;
  margin: 24px auto 60px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: flex-start;
}
.acct-sidebar {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 14px;
  padding: 20px;
  position: sticky;
  top: 100px;
}
.acct-user-card {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.acct-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green, #1e5b3a);
  color: #fff; display: grid; place-items: center;
  font-weight: 600; font-size: 18px;
  flex-shrink: 0;
}
.acct-name { font-size: 14px; font-weight: 600; color: #111; }
.acct-email { font-size: 12px; color: #757575; }

.acct-nav { display: flex; flex-direction: column; gap: 4px; }
.acct-nav-btn {
  width: 100%; text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: none; border-radius: 8px;
  font-size: 14px; color: #111;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.acct-nav-btn:hover { background: #f5f5f5; }
.acct-nav-btn.active { background: var(--green, #1e5b3a); color: #fff; font-weight: 500; }
.acct-nav-btn.acct-signout { color: #a1273a; margin-top: 6px; }
.acct-nav-btn.acct-signout:hover { background: #fdecec; }

.acct-main { min-width: 0; }
.acct-panel { display: none; }
.acct-panel.active { display: block; }
.acct-panel h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 600;
  color: #111; margin: 0 0 18px; letter-spacing: -0.4px;
}

/* Orders list */
.acct-order {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.acct-order-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 12px;
}
.acct-order-num { font-family: monospace; font-size: 14px; font-weight: 600; color: #111; letter-spacing: 0.3px; }
.acct-order-meta { font-size: 12.5px; color: #757575; margin-top: 4px; letter-spacing: 0.4px; }
.acct-order-total { font-size: 17px; font-weight: 700; color: #111; }
.acct-order-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct-btn-line {
  padding: 8px 16px;
  border: 1px solid #111;
  border-radius: 100px;
  font-size: 12.5px; font-weight: 500;
  color: #111; text-decoration: none;
  transition: background 0.15s;
}
.acct-btn-line:hover { background: #111; color: #fff; }
.acct-order-badge {
  padding: 4px 12px; border-radius: 100px;
  background: #e8f4ec; color: #1e5b3a;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.4px;
}
.acct-empty {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
}
.acct-empty p { color: #757575; margin: 0 0 14px; }

/* Profile */
.acct-profile-card {
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 14px;
  padding: 22px 24px;
}
.acct-row {
  display: grid; grid-template-columns: 140px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: baseline;
  gap: 16px;
}
.acct-row:last-child { border-bottom: none; }
.acct-row label {
  font-size: 12px; color: #757575;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 0;
}
.acct-row span { color: #111; font-size: 15px; font-weight: 500; }

.muted { color: #757575; }
.btn-outline {
  padding: 10px 22px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn-outline:hover { background: #111; color: #fff; }

@media (max-width: 900px) {
  .acct-wrap { grid-template-columns: 1fr; padding: 0 16px; }
  .acct-sidebar { position: static; }
  .acct-nav { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .acct-nav-btn { flex-shrink: 0; white-space: nowrap; }
}

/* Reviewable-item rows in My Reviews panel */
.rev-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.rev-row-thumb {
  width: 68px; height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}
.rev-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rev-row-noimg {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: #757575;
}
.rev-row-meta { min-width: 0; }
.rev-row-name {
  font-size: 14px; font-weight: 600; color: #111;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rev-row-sub {
  font-size: 12px; color: #757575; margin-top: 4px;
}
.rev-row-btn {
  white-space: nowrap;
  padding: 9px 18px !important;
  font-size: 12px !important;
}
@media (max-width: 640px) {
  .rev-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
  }
  .rev-row-thumb { width: 56px; height: 56px; }
  .rev-row-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
}

/* ====================================================
   ACCOUNT — mobile tab bar (fixes broken sidebar on ≤900px)
   ==================================================== */
@media (max-width: 900px) {
  .acct-wrap {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0 !important;
  }
  .acct-sidebar {
    position: static !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0;
  }
  /* User card sits on cream, compact */
  .acct-user-card {
    padding: 14px 16px !important;
    background: #fff;
    border-bottom: 1px solid var(--line, #e8e0d5);
    margin-bottom: 0 !important;
  }
  .acct-avatar { width: 40px !important; height: 40px !important; font-size: 16px !important; }
  .acct-name { font-size: 14px !important; }
  .acct-email { font-size: 12px !important; }

  /* Horizontal scrollable pill tabs — clearly visible */
  .acct-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    background: #fff;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line, #e8e0d5);
  }
  .acct-nav::-webkit-scrollbar { display: none; }
  .acct-nav-btn {
    flex-shrink: 0 !important;
    padding: 9px 18px !important;
    border-radius: 100px !important;
    background: var(--cream, #f7f0e6) !important;
    border: 1px solid var(--line, #e8e0d5) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #111 !important;
    white-space: nowrap;
  }
  .acct-nav-btn.active {
    background: var(--green, #1e5b3a) !important;
    color: #fff !important;
    border-color: var(--green, #1e5b3a) !important;
  }
  .acct-nav-btn.acct-signout {
    background: #fff !important;
    border: 1px solid #f5c6cb !important;
    color: #a1273a !important;
    margin-top: 0 !important;
    margin-left: auto !important;   /* push to right end */
  }
  .acct-nav-btn.acct-signout:hover {
    background: #fdecec !important;
  }

  /* Main content area on cream page bg */
  .acct-main { padding: 16px !important; }
  .acct-panel h2 { font-size: 22px !important; margin-bottom: 14px !important; }
}

/* ====================================================
   ACCOUNT MOBILE (v3) — proper equal tabs + sign out button
   Fixes: active pill stretching, unreadable tabs, hidden options
   ==================================================== */
@media (max-width: 900px) {
  .acct-wrap { padding: 0 !important; gap: 0 !important; }
  .acct-sidebar {
    background: #fff !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--line, #e8e0d5) !important;
  }

  /* User card row: avatar + name + sign-out icon button */
  .acct-user-card {
    display: grid !important;
    grid-template-columns: 40px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    background: #fff !important;
    border-bottom: 1px solid #f0eee9 !important;
    margin-bottom: 0 !important;
  }
  .acct-avatar { width: 40px !important; height: 40px !important; font-size: 16px !important; }
  .acct-user-card > div:nth-child(2) { min-width: 0; }
  .acct-name { font-size: 14px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acct-email { font-size: 12px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Convert nav into: 3 equal underline-style tabs, sign out floats above as icon */
  .acct-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;    /* equal 3 tabs */
    gap: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    border-bottom: none !important;
  }
  .acct-nav-btn {
    flex-shrink: 0 !important;
    padding: 14px 6px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--ink-dim, #757575) !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    margin: 0 !important;
  }
  .acct-nav-btn:hover { color: #111 !important; }
  .acct-nav-btn.active {
    color: var(--green, #1e5b3a) !important;
    border-bottom-color: var(--green, #1e5b3a) !important;
    font-weight: 600 !important;
    background: transparent !important;
  }

  /* Sign out — moved to top-right icon button on the user card */
  .acct-nav-btn.acct-signout {
    display: none !important;    /* hide from tab bar */
  }
  .acct-mobile-signout {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line, #e8e0d5);
    color: #a1273a;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }
  .acct-mobile-signout:hover { background: #fdecec; border-color: #f5c6cb; }
  .acct-mobile-signout svg { width: 18px; height: 18px; }

  /* Main content */
  .acct-main { padding: 20px 16px 40px !important; }
  .acct-panel h2 { font-size: 22px !important; margin-bottom: 14px !important; }
}
@media (min-width: 901px) {
  .acct-mobile-signout { display: none; }
}

/* ============ Editable profile form (v5) ============ */
#profileForm .acct-row { align-items: center; }
#profileForm .acct-row input,
#profileForm .acct-row select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--line, #e8e0d5);
  border-radius: 8px;
  background: #fff;
  color: var(--ink, #111);
  min-width: 0;
  box-sizing: border-box;
}
#profileForm .acct-row input:focus,
#profileForm .acct-row select:focus {
  outline: none;
  border-color: var(--green, #1e5b3a);
  box-shadow: 0 0 0 3px rgba(30,91,58,.08);
}
#profileForm h3 { color: var(--ink, #111); }
@media (max-width: 640px) {
  #profileForm .acct-row { grid-template-columns: 1fr !important; }
  #profileForm .acct-row label { margin-bottom: 4px; }
}

/* Save-address checkbox card in checkout */
.save-addr-opt input[type="checkbox"] { accent-color: var(--green, #1e5b3a); width: 16px; height: 16px; cursor: pointer; }
