/*
 * MODASTORE — Customer Pages Design System
 * Premium editorial fashion aesthetic
 */

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — Login / Register / Forgot Password
═══════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  background: #fff;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background: var(--black);
  min-height: 100vh;
}

.auth-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=900&q=85');
  background-size: cover;
  background-position: center;
  opacity: .75;
  transition: transform 8s ease;
}

.auth-visual-img.register-img {
  background-image: url('https://images.unsplash.com/photo-1487412947147-5cebf100ffc2?w=900&q=85');
}

.auth-visual-img.forgot-img {
  background-image: url('https://images.unsplash.com/photo-1469334031218-e382a71b716b?w=900&q=85');
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,.4) 0%,
    rgba(0,0,0,.15) 60%,
    rgba(0,0,0,.5) 100%
  );
}

.auth-visual-content {
  position: absolute;
  bottom: 52px;
  left: 48px;
  right: 48px;
  color: #fff;
}

.auth-visual-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.auth-visual-headline {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 14px;
}

.auth-visual-sub {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 320px;
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 72px;
  overflow-y: auto;
}

.auth-logo-block {
  margin-bottom: 48px;
}

.auth-logo-link {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--black);
  text-decoration: none;
  letter-spacing: -.02em;
}

.auth-logo-link em { font-style: normal; color: var(--accent); }

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  margin-top: 12px;
  transition: color .2s;
}

.auth-back:hover { color: var(--black); }

.auth-back svg { width: 14px; height: 14px; }

.auth-heading {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 6px;
}

.auth-subheading {
  font-size: 13.5px;
  color: var(--mid);
  margin-bottom: 36px;
  line-height: 1.6;
}

/* Auth form fields */
.auth-fields { display: flex; flex-direction: column; gap: 0; }

.auth-field-group {
  position: relative;
  border: 1.5px solid var(--border);
  margin-bottom: -1.5px;
  transition: border-color .2s, z-index 0s;
}

.auth-field-group:first-child { border-radius: var(--r-sm) var(--r-sm) 0 0; }
.auth-field-group:last-of-type { border-radius: 0 0 var(--r-sm) var(--r-sm); margin-bottom: 0; }
.auth-field-group:focus-within { border-color: var(--black); z-index: 1; }

.auth-field-group label {
  position: absolute;
  top: 10px; left: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  pointer-events: none;
}

.auth-field-group input,
.auth-field-group select {
  width: 100%;
  padding: 28px 14px 10px;
  border: none;
  background: transparent;
  font-size: 14.5px;
  font-family: var(--sans);
  color: var(--black);
  outline: none;
}

.auth-field-group input::placeholder { color: var(--light-mid); }

.auth-pwd-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--mid);
  display: flex; align-items: center;
  padding: 4px; transition: color .2s;
}

.auth-pwd-toggle:hover { color: var(--black); }
.auth-pwd-toggle svg { width: 16px !important; height: 16px !important; }

.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.auth-grid-2 .auth-field-group { border-radius: 0; }
.auth-grid-2 .auth-field-group:first-child { border-right-width: 0; }

.auth-error-box {
  padding: 13px 16px;
  background: #fdecea;
  border: 1px solid rgba(198,40,40,.2);
  border-left: 3px solid var(--danger);
  color: #c62828;
  font-size: 13px;
  margin-bottom: 20px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.auth-success-box {
  padding: 13px 16px;
  background: #e8f5e9;
  border: 1px solid rgba(46,125,50,.2);
  border-left: 3px solid #2e7d32;
  color: #2e7d32;
  font-size: 13px;
  margin-bottom: 20px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.auth-submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--black);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 20px;
  transition: background .2s, transform .15s;
  font-family: var(--sans);
}

.auth-submit-btn:hover {
  background: #111;
  transform: translateY(-1px);
}

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--light-mid);
}

.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--mid);
}

.auth-switch a {
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1.5px solid var(--black);
  padding-bottom: 1px;
}

.auth-terms {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px; font-size: 12.5px; color: var(--mid);
  cursor: pointer; line-height: 1.55;
}

.auth-terms input {
  margin-top: 2px;
  accent-color: var(--black);
  flex-shrink: 0;
  width: 14px; height: 14px;
}

.auth-terms a { color: var(--black); font-weight: 600; text-decoration: underline; }

.auth-forgot-link {
  display: block;
  text-align: right;
  font-size: 11.5px;
  color: var(--mid);
  text-decoration: none;
  margin-top: 6px;
  transition: color .2s;
}

.auth-forgot-link:hover { color: var(--accent); }

/* Forgot steps */
.forgot-step {
  text-align: center;
  padding: 24px 0;
}

.forgot-icon {
  width: 72px; height: 72px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 28px;
}

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-side { padding: 40px 32px; min-height: 100vh; }
}

@media (max-width: 480px) {
  .auth-form-side { padding: 32px 20px; }
  .auth-heading { font-size: 1.8rem; }
  .auth-grid-2 { grid-template-columns: 1fr; }
  .auth-grid-2 .auth-field-group:first-child { border-right-width: 1.5px; }
}

/* ═══════════════════════════════════════════════════════════
   ACCOUNT LAYOUT — Sidebar + Content
═══════════════════════════════════════════════════════════ */

.account-page {
  min-height: 80vh;
  background: #f5f4f2;
  padding: 0 0 80px;
}

.account-hero {
  background: var(--black);
  padding: 36px 0;
  margin-bottom: 0;
}

.account-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.account-hero-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-hero-av {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.account-hero-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
}

.account-hero-email {
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
  margin-top: 3px;
}

.account-breadcrumb {
  font-size: 11.5px;
  color: rgba(255,255,255,.4);
  margin-bottom: 16px;
}

.account-breadcrumb a { color: rgba(255,255,255,.4); text-decoration: none; }
.account-breadcrumb a:hover { color: var(--accent); }
.account-breadcrumb span { margin: 0 6px; }

.account-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding-top: 24px;
  align-items: start;
}

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

/* ── SIDEBAR ── */
.acc-sidebar {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.acc-nav { padding: 8px 0; }

.acc-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all .2s;
  position: relative;
}

.acc-nav-item svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  color: var(--light-mid);
  transition: color .2s;
}

.acc-nav-item:hover {
  background: #f5f4f2;
  color: var(--black);
  border-left-color: var(--border);
}

.acc-nav-item:hover svg { color: var(--dark); }

.acc-nav-item.is-active {
  background: #f5f4f2;
  color: var(--black);
  font-weight: 700;
  border-left-color: var(--black);
}

.acc-nav-item.is-active svg { color: var(--black); }

.acc-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.acc-nav-item.is-danger { color: var(--danger); }
.acc-nav-item.is-danger svg { color: var(--danger); }

/* ── CONTENT CARDS ── */
.acc-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  overflow: hidden;
}

.acc-card + .acc-card { margin-top: 16px; }

.acc-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.acc-card-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--black);
  line-height: 1.2;
}

.acc-card-subtitle {
  font-size: 12.5px;
  color: var(--mid);
  margin-top: 4px;
  line-height: 1.5;
}

.acc-card-body { padding: 28px; }
.acc-card-body-sm { padding: 20px 28px; }

/* ── STATS ── */
.acc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(0,0,0,.07);
  margin-bottom: 20px;
  overflow: hidden;
}

.acc-stat {
  padding: 24px 20px;
  text-align: center;
  background: #fff;
  border-right: 1px solid var(--border);
  transition: background .2s;
}

.acc-stat:last-child { border-right: none; }
.acc-stat:hover { background: #f5f4f2; }

.acc-stat-value {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1;
  display: block;
}

.acc-stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-top: 6px;
  display: block;
}

/* ── ORDER TABLE ── */
.orders-wrap { overflow-x: auto; }

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}

.orders-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 2px solid var(--border);
  background: #f5f4f2;
  white-space: nowrap;
}

.orders-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
  vertical-align: middle;
}

.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: #faf9f7; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 20px;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-badge.pending    { background: #fff8e1; color: #92600a; }
.status-badge.processing { background: #e3f2fd; color: #1565c0; }
.status-badge.shipped    { background: #f3e5f5; color: #6a1b9a; }
.status-badge.delivered  { background: #e8f5e9; color: #2e7d32; }
.status-badge.cancelled  { background: #fdecea; color: #c62828; }
.status-badge.refunded   { background: #efebe9; color: #4e342e; }

/* ── FORM SYSTEM ── */
.form-section { margin-bottom: 32px; }

.form-section-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

.form-field { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mid);
}

.form-input-field {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: var(--sans);
  color: var(--black);
  background: #fff;
  transition: border-color .2s;
  border-radius: 0;
  width: 100%;
}

.form-input-field:focus {
  outline: none;
  border-color: var(--black);
}

.form-input-field:disabled {
  background: #f5f4f2;
  color: var(--mid);
  cursor: not-allowed;
}

.form-hint { font-size: 11px; color: var(--light-mid); }

.form-radio-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.form-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--dark);
  cursor: pointer;
}

.form-radio-label input { accent-color: var(--black); }

/* ── ADDRESS CARDS ── */
.addr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 580px) { .addr-grid { grid-template-columns: 1fr; } }

.addr-card {
  border: 1.5px solid var(--border);
  padding: 20px;
  position: relative;
  transition: border-color .2s;
  cursor: default;
}

.addr-card:hover { border-color: #c5c0b8; }
.addr-card.is-default { border-color: var(--black); }

.addr-default-tag {
  position: absolute;
  top: -1px; right: -1px;
  background: var(--black);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 10px;
}

.addr-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: .02em;
  margin-bottom: 8px;
}

.addr-text {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.8;
}

.addr-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.addr-btn {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dark);
  text-decoration: none;
  padding: 5px 12px;
  border: 1.5px solid var(--border);
  transition: all .2s;
  background: none;
  cursor: pointer;
  font-family: var(--sans);
}

.addr-btn:hover { border-color: var(--black); color: var(--black); background: none; }
.addr-btn.is-danger { color: var(--danger); border-color: rgba(198,40,40,.3); }
.addr-btn.is-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── EMPTY STATE ── */
.acc-empty {
  text-align: center;
  padding: 64px 20px;
}

.acc-empty-icon {
  width: 64px; height: 64px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.acc-empty-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 8px;
}

.acc-empty-text {
  font-size: 13.5px;
  color: var(--mid);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── FILTER TABS ── */
.filter-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  border: 1.5px solid var(--border);
  border-right-width: 0;
  background: #fff;
  transition: all .2s;
  white-space: nowrap;
}

.filter-tab:last-child { border-right-width: 1.5px; }
.filter-tab:hover { color: var(--black); background: #f5f4f2; }
.filter-tab.is-active { background: var(--black); color: #fff; border-color: var(--black); }

/* ── ORDER PREVIEW CARDS ── */
.order-card {
  border-bottom: 1px solid var(--border);
  padding: 22px 28px;
}

.order-card:last-child { border-bottom: none; }

.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.order-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.order-meta-item { display: flex; flex-direction: column; gap: 2px; }

.order-meta-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--light-mid);
}

.order-meta-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
}

.order-thumbs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.order-thumb {
  width: 52px; height: 64px;
  object-fit: cover;
  background: #f5f4f2;
  flex-shrink: 0;
}

.order-thumb-more {
  width: 52px; height: 64px;
  background: #f5f4f2;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mid);
}

/* ── WISHLIST GRID ── */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 800px) { .wishlist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .wishlist-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── ALERT BOXES ── */
.acc-alert {
  padding: 14px 18px;
  font-size: 13px;
  margin-bottom: 20px;
  border-left: 3px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.acc-alert.success { background: #e8f5e9; border-color: #2e7d32; color: #2e7d32; }
.acc-alert.error   { background: #fdecea; border-color: #c62828; color: #c62828; }
.acc-alert.warning { background: #fff8e1; border-color: #92600a; color: #92600a; }

/* ── FORGOT STEPS ── */
.forgot-progress {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}

.forgot-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--mid); flex-shrink: 0;
  transition: all .3s;
}

.forgot-step-dot.is-done  { background: var(--black); border-color: var(--black); color: #fff; }
.forgot-step-dot.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.forgot-step-line {
  flex: 1; height: 2px;
  background: var(--border);
  margin: 0 6px;
}

.forgot-step-line.is-done { background: var(--black); }

/* ── Auth visual back link ── */
.auth-visual-back {
  position: absolute;
  top: 28px; left: 32px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  text-decoration: none; transition: color .2s;
  z-index: 2;
}
.auth-visual-back:hover { color: #fff; }
.auth-visual-back svg { width: 14px !important; height: 14px !important; }

/* ── Forgot password icon ── */
.forgot-icon-wrap { margin: 8px 0 24px; }
.forgot-big-icon {
  width: 72px; height: 72px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
}

/* ═══ PAGINATION ═══ */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 20px 0;
}
.page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  font-size: 13px; font-weight: 600; color: var(--dark);
  text-decoration: none; border: 1.5px solid var(--border);
  border-radius: 6px; transition: all .2s;
  font-family: var(--sans); background: #fff;
}
.page-link:hover { border-color: var(--black); color: var(--black); }
.page-link.active { background: var(--black); color: #fff; border-color: var(--black); }
