/* ---------- Shared account layout (account.php / account-orders.php / account-addresses.php) ---------- */
.account-layout {
  display: flex;
  align-items: flex-start;
  gap: 26px;
  padding: 18px 0 60px;
}
.account-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.account-sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}
/* ---------- Sidebar profile card ---------- */
.account-profile-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 22px;
  text-align: center;
}
.account-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.account-avatar svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: white;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-profile-card strong { display: block; font-size: 15px; color: var(--navy-text); }
.account-profile-card > small { color: var(--text-muted); font-size: 11.5px; }
.account-sidebar-progress { margin-top: 16px; text-align: left; }
.account-sidebar-progress .loyalty-progress-track { margin: 0 0 6px; }
.account-sidebar-progress small { color: var(--text-muted); font-size: 11px; }
.account-mini-stats {
  display: flex;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.account-mini-stats div { flex: 1; }
.account-mini-stats strong { display: block; font-size: 17px; color: var(--navy-text); }
.account-mini-stats span { color: var(--text-muted); font-size: 11px; }

.account-nav {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.account-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-text);
}
.account-nav-link:hover { background: var(--bg-tint); }
.account-nav-link.active { background: var(--blue); color: white; }
.an-ico { font-size: 16px; width: 20px; text-align: center; }

.account-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}
.account-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.account-card-head h2 { font-size: 16px; margin: 0; color: var(--navy-text); }
.account-card-link { color: var(--blue); font-size: 12.5px; font-weight: 600; }

/* ---------- Dashboard banner ---------- */
.account-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 100%);
  color: white;
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--card-shadow);
}
.account-banner h1 { font-size: 24px; margin: 0 0 6px; }
.account-banner p { color: #cfd8f7; font-size: 13.5px; margin: 0 0 18px; max-width: 460px; }
.account-banner .btn-primary { background: white; color: var(--blue); }
.account-banner-emoji {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 56px;
  opacity: .85;
  display: flex;
  gap: 10px;
}

/* ---------- Stat tiles ---------- */
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.account-stat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--card-shadow);
}
.account-stat-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.account-stat-tile:nth-child(1) .account-stat-ico { background: var(--bg-tint); color: var(--blue); }
.account-stat-tile:nth-child(2) .account-stat-ico { background: #fdf1d8; color: var(--gold-dark); }
.account-stat-tile:nth-child(3) .account-stat-ico { background: #fde3e9; color: var(--red); }
.account-stat-tile:nth-child(4) .account-stat-ico { background: #e2f4e9; color: var(--green); }
.account-stat-tile strong { display: block; font-size: 19px; color: var(--navy-text); }
.account-stat-tile span { color: var(--text-muted); font-size: 12px; }

/* ---------- Dashboard two-column body ---------- */
.account-columns {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ---------- Recent orders table (reused by account-orders.php) ---------- */
.account-orders-table { width: 100%; border-collapse: collapse; }
.account-orders-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-muted);
  padding: 0 10px 10px;
}
.account-orders-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--navy-text);
  vertical-align: middle;
}
.order-row-product { display: flex; align-items: center; gap: 10px; }
.order-row-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-tint);
  color: var(--blue);
}

/* ---------- Wishlist preview widget ---------- */
.account-wishlist-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.awp-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.awp-item .awp-emoji { font-size: 28px; display: block; margin-bottom: 6px; }
.awp-item strong { display: block; font-size: 12.5px; color: var(--navy-text); margin-bottom: 2px; }
.awp-item span { color: var(--blue); font-weight: 700; font-size: 12.5px; }

/* ---------- Default address card ---------- */
.account-address-block { font-size: 13.5px; line-height: 1.7; color: var(--navy-text); }
.account-address-block strong { display: block; margin-bottom: 2px; }
.account-address-badge {
  display: inline-block;
  background: var(--bg-tint);
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------- Loyalty rewards progress ---------- */
.loyalty-progress-track {
  height: 8px;
  border-radius: 6px;
  background: var(--bg-tint);
  overflow: hidden;
  margin: 12px 0 8px;
}
.loyalty-progress-fill { height: 100%; background: var(--gold); border-radius: 6px; }
.loyalty-progress-note { font-size: 12px; color: var(--text-muted); }

/* Rewards card on the dashboard gets the dark treatment like the sidebar profile
   card's progress bar, echoing the reference mockup's "GoGini Rewards" panel. */
.account-card.rewards-card {
  background: linear-gradient(135deg, var(--navy) 0%, #131b6b 100%);
  border: none;
  color: white;
}
.rewards-card .account-card-head h2 { color: white; }
.rewards-card .loyalty-points-big { font-size: 32px; font-weight: 700; color: white; }
.rewards-card .loyalty-points-big small { font-size: 13px; font-weight: 600; color: #b9c4ee; margin-left: 4px; }
.rewards-card .loyalty-progress-track { background: rgba(255, 255, 255, .18); }
.rewards-card .loyalty-progress-note { color: #cfd8f7; }

/* ---------- Empty state (shared by dashboard/orders/addresses/wishlist-preview) ---------- */
.account-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
  font-size: 13px;
}
.account-empty .btn-primary, .account-empty .btn-outline { margin-top: 12px; }

/* ---------- Order history cards (account-orders.php) ---------- */
.order-history-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--card-shadow);
}
.order-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.order-history-head h3 { margin: 0; font-size: 15px; color: var(--navy-text); }
.order-history-head small { color: var(--text-muted); font-size: 12px; }
.order-history-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.order-history-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.order-history-total { font-size: 15px; font-weight: 700; color: var(--navy-text); }

/* ---------- Saved address cards (account-addresses.php) ---------- */
.address-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.address-card {
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
}
.address-card.is-default { border-color: var(--blue); background: var(--bg-tint); }
.address-card-label { font-weight: 700; font-size: 13.5px; color: var(--navy-text); margin-bottom: 6px; }
.address-card p { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.address-card-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.address-card-actions button, .address-card-actions a {
  background: none;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 600;
}
.address-card-actions .danger { color: var(--red); }
.add-address-btn {
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: 600;
  font-size: 13.5px;
  background: none;
}

/* ---------- Saved-address picker (checkout.php) ---------- */
.saved-address-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.saved-address-chip {
  text-align: left;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: white;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.saved-address-chip strong { display: block; color: var(--navy-text); font-size: 13px; margin-bottom: 2px; }
.saved-address-chip.active { border-color: var(--blue); background: var(--bg-tint); }
.saved-address-chip.add-new {
  border-style: dashed;
  color: var(--blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Loyalty preview line (checkout.php / review.php summary) ---------- */
.summary-loyalty {
  background: var(--bg-tint);
  color: var(--navy-text);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 12px;
  margin: 4px 0 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .account-layout { flex-direction: column; }
  .account-sidebar { width: 100%; position: static; }
  .account-columns { grid-template-columns: 1fr; }
  .account-stats { grid-template-columns: repeat(2, 1fr); }
}
