@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600&display=swap");

:root {
  --jj-header-h: 72px;
}

* {
  box-sizing: border-box;
}

body.account-page {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: #f7f5f2;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* Same chrome as bag / liked — do not override size, padding, or tap targets */
.account-page .jj-site-header {
  background: #ffffff;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.account-page .jj-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: -1.5px;
}

.account-page #jj-bag-btn,
.account-page #jj-wishlist-btn,
.account-page #jj-profile-link {
  position: relative;
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: block;
}

/* Hero Banner — WOMEN explore image (vertical full-body).
   Wide crop keeps head + torso; left-weighted veil for welcome text. */
.profile-hero {
  position: relative;
  height: clamp(220px, 32vw, 300px);
  margin-top: calc(var(--jj-header-h) + env(safe-area-inset-top, 0px));
  background-color: #2a2a2a;
  background-image:
    linear-gradient(
      105deg,
      rgba(12, 12, 12, 0.72) 0%,
      rgba(12, 12, 12, 0.35) 38%,
      rgba(12, 12, 12, 0.2) 100%
    ),
    url("/assets/images/optimized/women.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  /* Prefer face/upper body — mid-body crop reads as a crop error on this shot */
  background-position: 50% 18%;
  display: flex;
  align-items: flex-end;
  padding: 40px 60px;
  color: #fff;
}

.hero-content {
  max-width: 36rem;
}

.hero-content h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  margin-bottom: 6px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  font-size: 15px;
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

body.is-logged-out .profile-hero .hero-content h1 {
  font-size: clamp(32px, 5vw, 42px);
}

/* Main Content */
.profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 40px 100px;
}

/* Featured Collection Banner — MEN explore image (lifestyle, model right). */
.featured-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.featured-image {
  min-height: 280px;
  height: 100%;
  background-color: #1c1c1c;
  background-image: url("/assets/images/optimized/men.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  /* Match explore focus: favor the model (right of frame), keep face in view */
  background-position: 72% 28%;
}

.featured-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
}

.featured-content h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
}

.featured-content p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}

.featured-content a {
  display: inline-block;
  width: fit-content;
  padding: 12px 28px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.featured-content a:hover {
  background: #333;
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 50px;
}

.quick-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  text-decoration: none;
  color: #111;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.quick-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #111;
}

.quick-card .icon svg {
  width: 22px;
  height: 22px;
}

.quick-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.quick-card p {
  font-size: 12px;
  color: #888;
}

/* Profile Form Section */
.profile-section {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.section-header__titles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.account-back {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  cursor: pointer;
}

.account-back:hover {
  color: #111;
}

.section-header h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}

.logout-btn {
  padding: 9px 18px;
  border: 1px solid #ddd;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #111;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.logout-btn:hover {
  border-color: #111;
  background: #fafaf9;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  height: 48px;
  border: 1px solid #e5e0d9;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  background: #fafaf9;
  color: #111;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group textarea {
  height: auto;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #111;
  background: #fff;
}

.form-group input:disabled,
.form-group input[readonly] {
  opacity: 0.75;
  cursor: default;
}

.save-btn {
  margin-top: 32px;
  height: 50px;
  padding: 0 40px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}

.save-btn:hover {
  background: #333;
}

.save-btn:disabled,
.btn-social:disabled {
  opacity: 0.65;
  cursor: wait;
}

.profile-success {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef7ef;
  color: #1f5b2f;
  font-size: 13px;
}

.login-intro,
.account-intro {
  margin: 0 0 24px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.login-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8ecea;
  color: #8a3a2a;
  font-size: 13px;
}

.auth-mode-toggle-wrap {
  margin-top: 16px;
  font-size: 13px;
}

.auth-mode-toggle-wrap a {
  color: #666;
}

.auth-mode-toggle-wrap a:hover {
  color: #111;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  color: #aaa;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}

.login-social-buttons {
  display: grid;
  gap: 10px;
}

.btn-social {
  height: 48px;
  border: 1px solid #e5e0d9;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #111;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-social:hover {
  border-color: #111;
  background: #fafaf9;
}

.btn-social--apple {
  background: #111;
  border-color: #111;
  color: #fff;
}

.btn-social--apple:hover {
  background: #333;
}

.info-card {
  padding: 24px;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 16px;
  background: #fafaf9;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card p {
  margin: 0 0 6px;
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.info-card__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
}

.info-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.info-card__footer p {
  margin: 0;
  color: #666;
}

.status-pill {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1f5b2f;
  background: #eef7ef;
  padding: 6px 10px;
  border-radius: 999px;
}

.address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
}

.address-actions button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: #111;
  cursor: pointer;
}

.address-actions button.delete {
  color: #8a3a2a;
}

.address-actions button:hover {
  text-decoration: underline;
}

.address-actions__sep {
  color: #ccc;
}

.address-form {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.address-lookup {
  position: relative;
}

.address-lookup__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
}

.address-lookup__results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 4px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  max-height: 260px;
  overflow: auto;
}

.address-lookup__results[hidden] {
  display: none;
}

.address-lookup__option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  color: #222;
  cursor: pointer;
  line-height: 1.35;
}

.address-lookup__option:hover,
.address-lookup__option:focus {
  background: #f5f2ec;
  outline: none;
}

.address-lookup__option-main {
  display: block;
  font-weight: 500;
}

.address-lookup__option-meta {
  display: block;
  margin-top: 2px;
  color: #888;
  font-size: 12px;
}

.address-lookup__empty,
.address-lookup__status {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  color: #888;
}

.address-form__default label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
}

.address-form__default input {
  width: auto;
  height: auto;
}

.address-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.address-form__actions .save-btn {
  margin-top: 0;
  width: auto;
  min-width: 160px;
}

.address-form__actions .logout-btn {
  margin: 0;
}

.settings-block h3,
.info-card h3 {
  margin: 0 0 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #eee;
}

.toggle-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.toggle-row strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.toggle-row p {
  margin: 0;
  font-size: 13px;
  color: #888;
}

.orders-empty {
  text-align: center;
  padding: 24px 12px 8px;
}

.orders-empty__title {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 500;
}

.orders-empty__copy {
  margin: 0 0 24px;
  font-size: 14px;
  color: #666;
}

.orders-empty__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 0;
}

@media (max-width: 900px) {
  .featured-banner {
    grid-template-columns: 1fr;
  }

  .featured-image {
    min-height: 220px;
    height: 220px;
    /* Wider mobile crop: keep the model more centered */
    background-position: 60% 30%;
  }

  .quick-links {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    padding: 30px 24px;
    height: 220px;
    /* Slightly lower on mobile so the silhouette still reads */
    background-position: 48% 22%;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .profile-container {
    padding: 30px 20px 80px;
  }

  .profile-section {
    padding: 28px 20px;
  }

  .info-card__row,
  .info-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
}
