/* ================================================================
   ACCOUNT DASHBOARD & WISHLIST – herboristerie-ambre
   ================================================================ */

/* ── Page layout ─────────────────────────────────────────────── */
.account-page {
  background: var(--beige-light);
  min-height: 100vh;
  padding: 48px 0 80px;
}
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

/* ════════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════════ */
.account-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Profile card */
.acct-profile-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.acct-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.acct-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
}
.acct-avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: var(--green-primary);
  border: 2px solid var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.acct-profile-name  { font-weight: 700; font-size: .95rem; color: var(--green-dark); }
.acct-profile-email { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.acct-profile-since { font-size: .74rem; color: var(--text-muted); margin-top: 4px; }

/* Navigation */
.acct-nav {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.acct-nav-item {
  display: grid;
  grid-template-columns: 20px 1fr 16px;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}
.acct-nav-item:last-child { border-bottom: none; }
.acct-nav-item:hover {
  background: var(--beige-light);
  color: var(--green-dark);
  padding-left: 22px;
}
.acct-nav-item.active {
  background: #eef5ed;
  color: var(--green-primary);
  font-weight: 600;
  border-left: 3px solid var(--green-primary);
  padding-left: 15px;
}
.acct-nav-item.active .acct-nav-icon svg { stroke: var(--green-primary); }
.acct-nav-item.active .acct-nav-arrow    { opacity: 1; color: var(--green-primary); }
.acct-nav-icon { display: flex; align-items: center; justify-content: center; }
.acct-nav-arrow { opacity: 0; transition: opacity .2s; flex-shrink: 0; }
.acct-nav-item:hover .acct-nav-arrow { opacity: .5; }
.acct-nav-logout {
  color: #c0392b;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}
.acct-nav-logout:hover { background: #fff5f5; color: #c0392b; }

/* Help card */
.acct-help-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.acct-help-text { font-size: .83rem; font-weight: 600; color: var(--green-dark); }
.acct-help-link { font-size: .78rem; color: var(--green-primary); font-weight: 500; transition: color .2s; }
.acct-help-link:hover { color: var(--green-dark); }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD CONTENT
   ════════════════════════════════════════════════════════════════ */
.account-main {
  min-width: 0;
}
.dash-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Welcome banner */
.dash-welcome {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #fff;
}
.dash-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin-bottom: 6px;
  color: #fff;
}
.dash-subtitle { font-size: .88rem; opacity: .85; line-height: 1.6; max-width: 420px; }
.dash-welcome-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  flex-shrink: 0;
}
.dash-welcome-badge svg { stroke: #ffd700; }
.dash-welcome-badge span { font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; }

/* Stats row */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  transition: var(--transition);
}
.dash-stat-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.dash-stat-icon {
  width: 40px;
  height: 40px;
  background: #eef5ed;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
}
.dash-stat-icon--amber { background: #fff8ec; color: #d4870a; }
.dash-stat-icon--rose  { background: #fff0f3; color: #e05575; }
.dash-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}
.dash-stat-label { font-size: .8rem; color: var(--text-muted); }

/* Sections */
.dash-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dash-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--green-dark);
}
.dash-see-all {
  font-size: .82rem;
  color: var(--green-primary);
  font-weight: 600;
  transition: color .2s;
}
.dash-see-all:hover { color: var(--green-dark); }

/* Orders table */
.dash-orders-table { display: flex; flex-direction: column; gap: 0; }
.dot-head {
  display: grid;
  grid-template-columns: 110px 1fr 70px 90px 100px 80px;
  gap: 12px;
  padding: 8px 12px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.dot-row {
  display: grid;
  grid-template-columns: 110px 1fr 70px 90px 100px 80px;
  gap: 12px;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  transition: background .2s;
}
.dot-row:last-child { border-bottom: none; }
.dot-row:hover { background: var(--beige-light); }
.dot-number { font-weight: 700; color: var(--green-dark); font-family: 'DM Sans', monospace; }
.dot-date   { color: var(--text-muted); font-size: .82rem; }
.dot-items  { color: var(--text-muted); font-size: .82rem; }
.dot-total  { font-weight: 600; color: var(--green-dark); }
.dot-view   { font-size: .8rem; color: var(--green-primary); font-weight: 600; white-space: nowrap; transition: color .2s; }
.dot-view:hover { color: var(--green-dark); }

/* Status badges */
.dash-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-delivered  { background: #eef5ed; color: var(--green-primary); }
.status-processing { background: #fff8ec; color: #d4870a; }
.status-pending    { background: #edf2ff; color: #4a6fd4; }
.status-cancelled  { background: #fff0f0; color: #c0392b; }

/* Quick actions grid */
.dash-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.dash-action-card {
  background: var(--beige-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.dash-action-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
  border-color: var(--green-light);
}
.dac-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dac-icon--green  { background: #eef5ed; color: var(--green-primary); }
.dac-icon--rose   { background: #fff0f3; color: #e05575; }
.dac-icon--blue   { background: #edf2ff; color: #4a6fd4; }
.dac-icon--amber  { background: #fff8ec; color: #d4870a; }
.dac-icon--teal   { background: #e8f6f5; color: #1a9e97; }
.dac-icon--purple { background: #f3eeff; color: #7c4ddb; }
.dac-title { font-size: .88rem; font-weight: 700; color: var(--green-dark); }
.dac-desc  { font-size: .76rem; color: var(--text-muted); line-height: 1.4; }

/* Account info row */
.dash-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: none;
  border: none;
  padding: 0;
}
.dash-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}
.dic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dic-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--green-dark); }
.dic-edit  { font-size: .78rem; color: var(--green-primary); font-weight: 600; transition: color .2s; }
.dic-edit:hover { color: var(--green-dark); }
.dic-field {
  display: flex;
  gap: 8px;
  font-size: .86rem;
  color: var(--text);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.dic-field:last-child { border-bottom: none; }
.dic-field span { color: var(--text-muted); font-weight: 500; min-width: 110px; }
.dic-address {
  font-style: normal;
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.dic-empty {
  font-size: .86rem;
  color: var(--text-muted);
}
.dic-empty a { color: var(--green-primary); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════
   WISHLIST PAGE
   ════════════════════════════════════════════════════════════════ */
.wl-wrap { display: flex; flex-direction: column; gap: 24px; }

/* Header */
.wl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.wl-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--green-dark);
  margin-bottom: 4px;
}
.wl-subtitle { font-size: .85rem; color: var(--text-muted); }
.wl-header-actions { display: flex; gap: 10px; align-items: center; }

.wl-share-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.wl-share-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

.wl-clear-btn {
  background: none;
  border: none;
  font-size: .8rem;
  color: #c0392b;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background .2s;
}
.wl-clear-btn:hover { background: #fff0f0; }

/* Empty state */
.wl-empty {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
}
.wl-empty-icon {
  width: 80px;
  height: 80px;
  background: var(--beige);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.wl-empty-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--green-dark); margin-bottom: 8px; }
.wl-empty-desc  { font-size: .88rem; color: var(--text-muted); margin-bottom: 24px; }
.wl-empty-btn   { background: var(--green-primary); color: #fff; padding: 12px 28px; border-radius: var(--radius-md); font-weight: 600; display: inline-block; transition: var(--transition); }
.wl-empty-btn:hover { background: var(--green-dark); }

/* Product grid */
.wl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Product card */
.wl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.wl-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.wl-card.removing {
  opacity: 0;
  transform: scale(.92);
  transition: opacity .3s ease, transform .3s ease;
}

/* Remove button */
.wl-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.wl-remove:hover { background: #fff0f0; border-color: #e05575; color: #e05575; }

/* Image */
.wl-img-link { display: block; }
.wl-img-wrap {
  width: 100%;
  height: 200px;
  background: var(--beige);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wl-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.wl-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-hot  { background: var(--green-dark); color: #fff; }
.badge-sale { background: #e74c3c; color: #fff; }
.badge-new  { background: #4a6fd4; color: #fff; }

/* Info */
.wl-info { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.wl-cat  { font-size: .72rem; font-weight: 600; color: var(--green-primary); text-transform: uppercase; letter-spacing: .04em; }
.wl-name { font-family: 'Playfair Display', serif; font-size: .95rem; color: var(--green-dark); line-height: 1.35; }

/* Stars (clip technique) */
.wl-rating-row { display: flex; align-items: center; gap: 6px; }
.wl-stars {
  position: relative;
  font-size: .85rem;
  display: inline-block;
  line-height: 1;
}
.wl-stars-bg   { color: var(--border); letter-spacing: 2px; }
.wl-stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pct, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: #f0a500;
  letter-spacing: 2px;
}
.wl-review-count { font-size: .74rem; color: var(--text-muted); }

/* Price */
.wl-price-row { display: flex; align-items: baseline; gap: 8px; }
.wl-price     { font-weight: 700; font-size: 1rem; color: var(--green-dark); }
.wl-old-price { font-size: .82rem; color: var(--text-muted); text-decoration: line-through; }

/* Add to cart */
.wl-actions { margin-top: auto; }
.wl-add-cart {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.wl-add-cart:hover   { background: var(--green-dark); }
.wl-add-cart.added   { background: var(--green-dark); }

/* Footer */
.wl-footer { padding-top: 8px; }
.wl-shop-link {
  font-size: .88rem;
  color: var(--green-primary);
  font-weight: 600;
  transition: color .2s;
}
.wl-shop-link:hover { color: var(--green-dark); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dash-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .account-layout   { grid-template-columns: 1fr; }
  .account-sidebar  { position: static; flex-direction: row; flex-wrap: wrap; }
  .acct-profile-card{ flex: 1; min-width: 240px; }
  .acct-nav         { flex: 1; min-width: 200px; }
  .acct-help-card   { flex: 0 0 auto; }
  .dash-stats       { grid-template-columns: repeat(3, 1fr); }
  .dot-head, .dot-row { grid-template-columns: 90px 1fr 60px 80px 90px 70px; font-size: .8rem; }
  .dash-info-row    { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .account-page     { padding: 28px 0 60px; }
  .account-sidebar  { flex-direction: column; }
  .dash-welcome     { flex-direction: column; align-items: flex-start; }
  .dash-welcome-badge { align-self: flex-start; }
  .dash-stats       { grid-template-columns: 1fr 1fr; }
  .dash-stats .dash-stat-card:last-child { grid-column: span 2; }
  .dash-actions     { grid-template-columns: repeat(2, 1fr); }
  .dot-head         { display: none; }
  .dot-row          { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; gap: 4px 12px; }
  .dot-number       { grid-column: 1; font-size: .85rem; }
  .dot-view         { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .dot-date         { font-size: .76rem; color: var(--text-muted); }
  .dot-items        { display: none; }
  .dot-total        { grid-column: 1; }
  .dash-status      { justify-self: start; }
  .wl-grid          { grid-template-columns: repeat(2, 1fr); }
  .wl-header        { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .wl-grid { grid-template-columns: 1fr; }
  .dash-actions { grid-template-columns: 1fr; }
}

/* ── Wishlist: guest prompt ──────────────────────────────────────── */
.wl-guest-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 32px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border);
}
.wl-guest-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--green-primary);
}
.wl-guest-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--green-dark);
  margin-bottom: 12px;
}
.wl-guest-desc {
  font-size: .92rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.wl-guest-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.wl-guest-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Wishlist: out-of-stock label ───────────────────────────────── */
.wl-out-of-stock {
  display: inline-block;
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--beige);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

/* ── Wishlist: WC price HTML overrides inside .wl-price-row ─────── */
.wl-price-row .price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark);
}
.wl-price-row del { color: var(--text-muted); font-size: .82rem; }

/* ── Responsive Enhancements v2 ──────────────────────────────── */
/* Wishlist add-to-cart minimum touch target */
.wl-add-cart { min-height: 44px; }

/* Tighter section padding on small screens */
@media (max-width: 640px) {
  .dash-section   { padding: 20px 16px; }
  .dash-welcome   { padding: 22px 20px; }
  .dash-info-card { padding: 16px; }
}

/* Tightest phones */
@media (max-width: 420px) {
  .dash-section  { padding: 16px 12px; }
  .dash-stats    { grid-template-columns: 1fr; }
  .dash-stats .dash-stat-card:last-child { grid-column: unset; }
  .wl-img-wrap   { height: 160px; }
  .wl-empty      { padding: 40px 20px; }
}
.wl-price-row ins { text-decoration: none; }

/* ================================================================
   DASHBOARD / WISHLIST – RTL
   ================================================================ */

html[dir="rtl"] .dash-page,
html[data-dir="rtl"] .dash-page,
body.dir-rtl .dash-page                 { direction: rtl; }

html[dir="rtl"] .dash-welcome,
html[data-dir="rtl"] .dash-welcome,
body.dir-rtl .dash-welcome              { direction: rtl; }

html[dir="rtl"] .dash-stats,
html[data-dir="rtl"] .dash-stats,
body.dir-rtl .dash-stats                { direction: rtl; }

html[dir="rtl"] .dash-nav,
html[data-dir="rtl"] .dash-nav,
body.dir-rtl .dash-nav                  { direction: rtl; }

html[dir="rtl"] .dash-section,
html[data-dir="rtl"] .dash-section,
body.dir-rtl .dash-section              { direction: rtl; }

html[dir="rtl"] .dash-orders-table,
html[data-dir="rtl"] .dash-orders-table,
body.dir-rtl .dash-orders-table         { direction: rtl; }

html[dir="rtl"] .wl-page,
html[data-dir="rtl"] .wl-page,
body.dir-rtl .wl-page                   { direction: rtl; }

html[dir="rtl"] .wl-grid,
html[data-dir="rtl"] .wl-grid,
body.dir-rtl .wl-grid                   { direction: rtl; }

html[dir="rtl"] .wl-info,
html[data-dir="rtl"] .wl-info,
body.dir-rtl .wl-info                   { text-align: right; }

html[dir="rtl"] .wl-price-row,
html[data-dir="rtl"] .wl-price-row,
body.dir-rtl .wl-price-row              { flex-direction: row-reverse; }

html[dir="rtl"] .wl-actions,
html[data-dir="rtl"] .wl-actions,
body.dir-rtl .wl-actions                { flex-direction: row-reverse; }

html[dir="rtl"] .wl-badge,
html[data-dir="rtl"] .wl-badge,
body.dir-rtl .wl-badge                  { left: auto; right: 10px; }

html[dir="rtl"] .wl-empty,
html[data-dir="rtl"] .wl-empty,
body.dir-rtl .wl-empty                  { direction: rtl; }

/* ================================================================
   EDIT ACCOUNT FORM
   ================================================================ */

.ambre-edit-account {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 680px;
}

.ambre-form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

.ambre-edit-account .woocommerce-form-row {
  margin-bottom: 20px;
}

.ambre-edit-account label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.ambre-edit-account .input-text,
.ambre-edit-account input[type="text"],
.ambre-edit-account input[type="email"],
.ambre-edit-account input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: .92rem;
  color: var(--green-dark);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.ambre-edit-account .input-text:focus,
.ambre-edit-account input[type="text"]:focus,
.ambre-edit-account input[type="email"]:focus,
.ambre-edit-account input[type="password"]:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(111,143,107,.12);
}

.ambre-edit-account #account_display_name_description {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 5px;
  font-style: italic;
}

.ambre-password-fieldset {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 24px 16px;
  margin-bottom: 24px;
}

.ambre-password-fieldset legend {
  font-size: .85rem;
  font-weight: 700;
  color: var(--green-dark);
  padding: 0 8px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.ambre-form-submit {
  margin-top: 8px;
}

.ambre-edit-account .ambre-btn-primary {
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 32px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s;
  letter-spacing: .01em;
}

.ambre-edit-account .ambre-btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

/* RTL */
.ambre-edit-account.rtl,
html[dir="rtl"] .ambre-edit-account,
body.dir-rtl .ambre-edit-account {
  direction: rtl;
  text-align: right;
}

/* Responsive */
@media (max-width: 640px) {
  .ambre-form-row-group { grid-template-columns: 1fr; }
  .ambre-edit-account   { padding: 24px 20px; }
}

/* ================================================================
   ORDERS LIST v2 — card layout
   ================================================================ */

/* ── Wrapper ──────────────────────────────────────────────────── */
.ambre-orders-v2 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Page header ──────────────────────────────────────────────── */
.aov2-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px 24px;
  border-bottom: 2px solid var(--border);
}
.aov2-header-icon {
  width: 44px;
  height: 44px;
  background: #eef5ed;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  flex-shrink: 0;
}
.aov2-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--green-dark);
  margin: 0 0 2px;
}
.aov2-subtitle {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Cards list ───────────────────────────────────────────────── */
.aov2-list {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
}

/* ── Single card ──────────────────────────────────────────────── */
.aov2-card {
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  transition: background .15s;
}
.aov2-card:hover { background: #fafaf8; }
.aov2-card:last-child { border-bottom: none; }

/* Left accent line per status */
.aov2-card { border-left: 3px solid transparent; }
.aov2-card.status-color-green  { border-left-color: var(--green-primary); }
.aov2-card.status-color-blue   { border-left-color: #1a73e8; }
.aov2-card.status-color-amber  { border-left-color: #f57c00; }
.aov2-card.status-color-red    { border-left-color: #c62828; }
.aov2-card.status-color-purple { border-left-color: #7b1fa2; }

/* ── Card top row ─────────────────────────────────────────────── */
.aov2-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.aov2-order-id {
  font-family: 'DM Sans', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
}
.aov2-hash { color: var(--text-muted); font-weight: 400; margin-inline-end: 1px; }

/* ── Status badge ─────────────────────────────────────────────── */
.aov2-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.aov2-badge--green  { background: #eef5ed; color: var(--green-primary); }
.aov2-badge--blue   { background: #e8f4fd; color: #1a73e8; }
.aov2-badge--amber  { background: #fff8e1; color: #f57c00; }
.aov2-badge--red    { background: #fdecea; color: #c62828; }
.aov2-badge--purple { background: #f3e5f5; color: #7b1fa2; }

/* ── Meta row ─────────────────────────────────────────────────── */
.aov2-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.aov2-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .83rem;
  color: var(--text-muted);
}
.aov2-meta-icon { display: flex; align-items: center; color: var(--green-primary); opacity: .7; }
.aov2-total .aov2-total-amount {
  font-weight: 700;
  font-size: .92rem;
  color: var(--green-dark);
}

/* ── Card footer ──────────────────────────────────────────────── */
.aov2-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.aov2-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--green-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: .83rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.aov2-view-btn:hover { background: var(--green-primary); transform: translateY(-1px); }
.aov2-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  transition: border-color .2s, color .2s;
}
.aov2-action-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

/* ── Pagination ───────────────────────────────────────────────── */
.aov2-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px 24px;
}
.aov2-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.aov2-page-btn:hover { border-color: var(--green-primary); background: #eef5ed; color: var(--green-primary); }
.aov2-page-info { font-size: .82rem; color: var(--text-muted); }

/* When no pagination, close the card list with rounded bottom */
.aov2-list:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ── Empty state ──────────────────────────────────────────────── */
.ambre-orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px 32px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.ambre-orders-empty p { font-size: .95rem; margin: 0; }
.ambre-orders-empty .ambre-btn-primary {
  display: inline-block;
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 28px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.ambre-orders-empty .ambre-btn-primary:hover { background: var(--green-dark); }

/* ── RTL ──────────────────────────────────────────────────────── */
.ambre-orders-v2.rtl { direction: rtl; }
.ambre-orders-v2.rtl .aov2-header      { flex-direction: row-reverse; text-align: right; }
.ambre-orders-v2.rtl .aov2-card        { border-left: none; border-right: 3px solid transparent; }
.ambre-orders-v2.rtl .aov2-card.status-color-green  { border-right-color: var(--green-primary); }
.ambre-orders-v2.rtl .aov2-card.status-color-blue   { border-right-color: #1a73e8; }
.ambre-orders-v2.rtl .aov2-card.status-color-amber  { border-right-color: #f57c00; }
.ambre-orders-v2.rtl .aov2-card.status-color-red    { border-right-color: #c62828; }
.ambre-orders-v2.rtl .aov2-card.status-color-purple { border-right-color: #7b1fa2; }
.ambre-orders-v2.rtl .aov2-card-top    { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-meta        { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-meta-item   { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-card-footer { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-view-btn    { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-pagination  { flex-direction: row-reverse; }
.ambre-orders-v2.rtl .aov2-page-btn    { flex-direction: row-reverse; }
.ambre-orders-empty.rtl { direction: rtl; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 520px) {
  .aov2-card       { padding: 16px 18px; }
  .aov2-meta       { gap: 12px; }
  .aov2-meta-item  { font-size: .78rem; }
  .aov2-order-id   { font-size: .95rem; }
  .aov2-view-btn   { padding: 8px 14px; font-size: .8rem; }
  .aov2-header     { padding: 18px 18px; }
  .aov2-pagination { padding: 14px 18px; }
}

/* Keep old .ambre-btn-outline for WC compatibility */
.ambre-btn-outline {
  display: inline-block;
  padding: 7px 16px;
  border: 1.5px solid var(--green-primary);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  transition: background .2s, color .2s;
}
.ambre-btn-outline:hover { background: var(--green-primary); color: #fff; }

/* ================================================================
   VIEW ORDER PAGE
   ================================================================ */

.ambre-view-order {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.avo-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border-left: 4px solid var(--green-primary);
}
.avo-status-blue   { border-left-color: #1a73e8; }
.avo-status-green  { border-left-color: var(--green-primary); }
.avo-status-amber  { border-left-color: #f57c00; }
.avo-status-red    { border-left-color: #c62828; }
.avo-status-purple { border-left-color: #7b1fa2; }

.avo-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.avo-hero-icon {
  width: 44px;
  height: 44px;
  background: #eef5ed;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  flex-shrink: 0;
}
.avo-order-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--green-dark);
  margin: 0 0 3px;
}
.avo-order-date {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Status badges ────────────────────────────────────────────── */
.avo-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.avo-badge--green  { background: #eef5ed; color: var(--green-primary); }
.avo-badge--blue   { background: #e8f4fd; color: #1a73e8; }
.avo-badge--amber  { background: #fff8e1; color: #f57c00; }
.avo-badge--red    { background: #fdecea; color: #c62828; }
.avo-badge--purple { background: #f3e5f5; color: #7b1fa2; }

/* ── Shared section card ──────────────────────────────────────── */
.avo-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.avo-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--green-dark);
  margin: 0;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--beige-light, #f5f5f0);
}

/* ── Items list ───────────────────────────────────────────────── */
.avo-items-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.avo-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.avo-item-row:last-child { border-bottom: none; }
.avo-item-row:hover { background: #fafaf8; }

.avo-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.avo-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--beige);
  border: 1px solid var(--border);
}
.avo-item-thumb img.avo-item-img { width: 56px; height: 56px; object-fit: cover; display: block; }
.avo-item-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.avo-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.avo-item-name { font-size: .92rem; font-weight: 600; color: var(--green-dark); }
.avo-item-name a { color: inherit; text-decoration: none; }
.avo-item-name a:hover { color: var(--green-primary); text-decoration: underline; }
.avo-item-qty { font-size: .8rem; color: var(--text-muted); }
.avo-item-total { font-size: .95rem; font-weight: 700; color: var(--green-dark); flex-shrink: 0; white-space: nowrap; }
.avo-purchase-note { padding: 0 24px 14px 94px; font-size: .82rem; color: var(--text-muted); font-style: italic; }

/* ── Totals ───────────────────────────────────────────────────── */
.avo-totals { padding: 8px 0; }
.avo-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.avo-total-row:last-child { border-bottom: none; }
.avo-total-label { color: var(--text-muted); font-weight: 500; }
.avo-total-value { font-weight: 600; color: var(--green-dark); }
.avo-total-row--grand {
  background: var(--beige-light, #f5f5f0);
}
.avo-total-row--grand .avo-total-label { font-weight: 700; color: var(--green-dark); font-size: .95rem; }
.avo-total-row--grand .avo-total-value { font-size: 1.1rem; font-weight: 800; color: var(--green-dark); }
.avo-total-row--note .avo-total-value { font-style: italic; color: var(--text-muted); }

/* ── Actions ──────────────────────────────────────────────────── */
.avo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
}
.avo-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .83rem;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
  background: #fff;
  transition: border-color .2s, color .2s;
}
.avo-action-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

/* ── Addresses ────────────────────────────────────────────────── */
.avo-addresses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.avo-addresses--two-col { grid-template-columns: 1fr 1fr; }

.avo-address-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.avo-address-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--beige-light, #f5f5f0);
  border-bottom: 1px solid var(--border);
}
.avo-address-icon {
  width: 32px;
  height: 32px;
  background: #eef5ed;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  flex-shrink: 0;
}
.avo-address-header h4 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0;
}
.avo-address-body { padding: 18px 20px; }
.avo-address-body address {
  font-style: normal;
  font-size: .88rem;
  color: var(--green-dark);
  line-height: 1.75;
  margin-bottom: 8px;
}
.avo-address-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

/* ── Order notes ──────────────────────────────────────────────── */
.avo-notes {
  background: #fff8ec;
  border: 1px solid #f0c080;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.avo-notes-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 700;
  color: #b35900;
  margin: 0 0 14px;
}
.avo-notes-list { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.avo-note-item { padding: 10px 14px; background: rgba(255,255,255,.6); border-radius: var(--radius-sm); }
.avo-note-date { display: block; font-size: .74rem; color: #b35900; margin-bottom: 4px; }
.avo-note-text { font-size: .85rem; color: #7a4000; }
.avo-note-text p { margin: 0; }

/* ── Back link ────────────────────────────────────────────────── */
.avo-back { padding-top: 4px; }
.avo-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  transition: color .2s;
}
.avo-back-link:hover { color: var(--green-dark); }

/* ── RTL ──────────────────────────────────────────────────────── */
.ambre-view-order.rtl { direction: rtl; }
.ambre-view-order.rtl .avo-hero      { flex-direction: row-reverse; border-left: none; border-right: 4px solid var(--green-primary); }
.ambre-view-order.rtl .avo-status-blue   { border-right-color: #1a73e8; }
.ambre-view-order.rtl .avo-status-green  { border-right-color: var(--green-primary); }
.ambre-view-order.rtl .avo-status-amber  { border-right-color: #f57c00; }
.ambre-view-order.rtl .avo-status-red    { border-right-color: #c62828; }
.ambre-view-order.rtl .avo-status-purple { border-right-color: #7b1fa2; }
.ambre-view-order.rtl .avo-hero-left   { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-section-title { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-items-head  { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-item-row    { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-item-left   { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-item-info   { text-align: right; }
.ambre-view-order.rtl .avo-total-row   { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-address-header { flex-direction: row-reverse; text-align: right; }
.ambre-view-order.rtl .avo-address-body   { text-align: right; }
.ambre-view-order.rtl .avo-address-meta   { flex-direction: row-reverse; justify-content: flex-end; }
.ambre-view-order.rtl .avo-back-link   { flex-direction: row-reverse; }
.ambre-view-order.rtl .avo-back-link svg { transform: scaleX(-1); }
.ambre-view-order.rtl .avo-notes-title { flex-direction: row-reverse; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .avo-hero         { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ambre-view-order.rtl .avo-hero { align-items: flex-end; }
  .avo-addresses--two-col { grid-template-columns: 1fr; }
  .avo-item-thumb   { width: 44px; height: 44px; }
  .avo-item-thumb img.avo-item-img { width: 44px; height: 44px; }
  .avo-purchase-note { padding-left: 24px; }
  .avo-item-row     { padding: 14px 18px; }
  .avo-total-row    { padding: 10px 18px; }
  .avo-section-title { padding: 14px 18px; }
  .avo-items-head   { padding: 8px 18px; }
}

/* ── WC native overrides inside our wrapper ───────────────────── */
.avo-details .woocommerce-order-details,
.avo-details .woocommerce-customer-details { display: none !important; }

/* ================================================================
   ADDRESSES
   ================================================================ */

.ambre-addresses-wrap { }

.ambre-addresses-desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.ambre-addresses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ambre-address-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s;
}
.ambre-address-card:hover { box-shadow: var(--shadow-sm); }

.ambre-address-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--beige-light, #f5f5f0);
}

.ambre-address-icon {
  width: 36px;
  height: 36px;
  background: #eef5ed;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-primary);
  flex-shrink: 0;
}

.ambre-address-title {
  flex: 1;
  font-size: .9rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0;
}

.ambre-address-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--green-primary);
  text-decoration: none;
  padding: 5px 12px;
  border: 1.5px solid var(--green-primary);
  border-radius: 20px;
  transition: background .2s, color .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.ambre-address-edit:hover { background: var(--green-primary); color: #fff; }

.ambre-address-body {
  padding: 20px;
}
.ambre-address-body address {
  font-style: normal;
  font-size: .9rem;
  color: var(--green-dark);
  line-height: 1.7;
}
.ambre-address-empty {
  font-size: .88rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* RTL */
.ambre-addresses-wrap.rtl,
.ambre-addresses-wrap.rtl .ambre-addresses-desc,
.ambre-addresses-wrap.rtl .ambre-address-title,
.ambre-addresses-wrap.rtl .ambre-address-body {
  direction: rtl;
  text-align: right;
}
.ambre-addresses-wrap.rtl .ambre-address-header {
  flex-direction: row-reverse;
}

@media (max-width: 640px) {
  .ambre-addresses-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   EDIT ADDRESS FORM
   ================================================================ */

.ambre-edit-address {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Header ───────────────────────────────────────────────────── */
.aea-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px 28px;
  border-bottom: 2px solid var(--border);
}
.aea-header-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aea-icon--blue  { background: #e8f4fd; color: #1a73e8; }
.aea-icon--green { background: #eef5ed; color: var(--green-primary); }
.aea-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--green-dark);
  margin: 0 0 4px;
}
.aea-subtitle {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Form body ────────────────────────────────────────────────── */
.aea-form {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 28px 28px 0;
}

/* ── Field grid ───────────────────────────────────────────────── */
.aea-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

/* WC wraps each field in a <p> with class "form-row" */
.aea-fields .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

/* Full-width fields */
.aea-fields .form-row.form-row-wide,
.aea-fields .form-row.address-field.form-row-wide {
  grid-column: 1 / -1;
}

/* ── Labels ───────────────────────────────────────────────────── */
.aea-label,
.aea-fields label {
  font-size: .82rem !important;
  font-weight: 600 !important;
  color: var(--green-dark) !important;
  letter-spacing: .01em;
  margin-bottom: 0 !important;
}
.aea-fields .required { color: #e74c3c; margin-inline-start: 2px; }

/* ── Inputs / selects ─────────────────────────────────────────── */
.aea-input,
.aea-fields input[type="text"],
.aea-fields input[type="email"],
.aea-fields input[type="tel"],
.aea-fields input[type="number"],
.aea-fields select,
.aea-fields textarea {
  width: 100%;
  padding: 11px 14px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: .9rem !important;
  color: var(--green-dark) !important;
  background: var(--beige-light, #f5f5f0) !important;
  outline: none !important;
  transition: border-color .2s, box-shadow .2s, background .2s !important;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.aea-fields input:focus,
.aea-fields select:focus,
.aea-fields textarea:focus {
  border-color: var(--green-primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(111,143,107,.12) !important;
}
.aea-fields input::placeholder { color: #b0b8b0 !important; }

/* Select arrow */
.aea-fields select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236f8f6b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
  cursor: pointer;
}

/* Validation states */
.aea-fields .woocommerce-invalid input,
.aea-fields .woocommerce-invalid select {
  border-color: #e74c3c !important;
  background: #fff5f5 !important;
}
.aea-fields .woocommerce-validated input,
.aea-fields .woocommerce-validated select {
  border-color: var(--green-primary) !important;
}

/* WC validation icons — hide them, we handle via border color */
.aea-fields .woocommerce-invalid-required-field::after,
.aea-fields .woocommerce-validated::after { display: none !important; }

/* ── Footer ───────────────────────────────────────────────────── */
.aea-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-wrap: wrap;
}
.aea-save-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: var(--green-dark) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 12px 28px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: .92rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: background .2s, transform .15s !important;
  text-decoration: none;
  min-height: 46px;
}
.aea-save-btn:hover {
  background: var(--green-primary) !important;
  transform: translateY(-1px);
}
.aea-cancel-btn {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .2s, color .2s;
}
.aea-cancel-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

/* ── RTL ──────────────────────────────────────────────────────── */
.ambre-edit-address.rtl { direction: rtl; }
.ambre-edit-address.rtl .aea-header  { flex-direction: row-reverse; text-align: right; }
.ambre-edit-address.rtl .aea-fields  { direction: rtl; }
.ambre-edit-address.rtl .aea-fields label { text-align: right; }
.ambre-edit-address.rtl .aea-fields input,
.ambre-edit-address.rtl .aea-fields select,
.ambre-edit-address.rtl .aea-fields textarea { text-align: right; direction: rtl; }
/* Flip select arrow to left */
.ambre-edit-address.rtl .aea-fields select {
  background-position: left 14px center !important;
  padding-right: 14px !important;
  padding-left: 36px !important;
}
.ambre-edit-address.rtl .aea-footer { flex-direction: row-reverse; }
.ambre-edit-address.rtl .aea-save-btn { flex-direction: row-reverse; }
/* Arabic font size bump */
.ambre-edit-address.rtl .aea-fields label { font-size: .9rem !important; }
.ambre-edit-address.rtl .aea-fields input,
.ambre-edit-address.rtl .aea-fields select { font-size: .95rem !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .aea-fields { grid-template-columns: 1fr; }
  .aea-fields .form-row.form-row-wide { grid-column: 1; }
  .aea-header { padding: 18px 20px; gap: 12px; }
  .aea-form   { padding: 20px 20px 0; }
  .aea-footer { padding: 20px 0 24px; }
  .aea-save-btn { width: 100%; justify-content: center; }
}

/* iOS zoom prevention */
@media (max-width: 768px) {
  .aea-fields input,
  .aea-fields select,
  .aea-fields textarea { font-size: 16px !important; }
}
