/* =========================================
   WC Mi Cuenta Pro — Frontend v4
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --wcmap-primary:      #6366F1;
  --wcmap-primary-dark: #4F46E5;
  --wcmap-accent:       #06B6D4;
  --wcmap-sidebar-bg:   #0F172A;
  --wcmap-sidebar-text: #94A3B8;
  --wcmap-card:         #FFFFFF;
  --wcmap-bg:           #F8FAFC;
  --wcmap-welcome-bg:   #6366F1;
  --wcmap-welcome-text: #FFFFFF;
  --wcmap-sidebar-w:    270px;
  --wcmap-r:            16px;
  --wcmap-shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --wcmap-shadow-md:    0 4px 6px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
}

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.wcmap {
  display: grid;
  grid-template-columns: var(--wcmap-sidebar-w) 1fr;
  gap: 28px;
  align-items: start;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--wcmap-bg);
  min-height: 60vh;
}

/* =========================================
   SIDEBAR / NAV
   ========================================= */
.wcmap-nav {
  background: var(--wcmap-sidebar-bg);
  border-radius: var(--wcmap-r);
  padding: 28px 16px 20px;
  position: sticky;
  top: 100px;
  overflow: hidden;
}
/* Fondo decorativo en sidebar */
.wcmap-nav::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
  pointer-events: none;
}

/* Perfil */
.wcmap-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.wcmap-avatar { flex-shrink: 0; }
.wcmap-avatar img { display:block; width:48px; height:48px; object-fit:cover; }
.wcmap-avatar--circle  img { border-radius:50%; }
.wcmap-avatar--square  img { border-radius:10px; }
.wcmap-avatar--hexagon img { clip-path:polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%); }
.wcmap-profile-info strong { display:block; color:#F1F5F9; font-size:.9rem; font-weight:600; }
.wcmap-profile-info span   { display:block; color:var(--wcmap-sidebar-text); font-size:.74rem; margin-top:2px; }

/* Hamburger */
.wcmap-burger {
  display: none;
  background: rgba(255,255,255,.06);
  border: none; border-radius:10px;
  padding: 10px 14px; width:100%;
  flex-direction: column; align-items: flex-start;
  gap: 5px; margin-bottom: 10px; cursor: pointer;
}
.wcmap-burger span {
  display:block; width:18px; height:2px;
  background: var(--wcmap-sidebar-text); border-radius:2px;
  transition: .2s;
}

/* Menú */
.wcmap-menu { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.wcmap-menu-item a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--wcmap-sidebar-text);
  text-decoration: none !important;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
}
.wcmap-menu-item a:hover { background:rgba(255,255,255,.07); color:#E2E8F0; }
.wcmap-menu-item.is-active a {
  background: linear-gradient(135deg, var(--wcmap-primary), var(--wcmap-primary-dark)) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.wcmap-menu-icon { width:20px; height:20px; flex-shrink:0; }
.wcmap-icon { width:100%; height:100%; }
.wcmap-menu-pip {
  width:7px; height:7px; border-radius:50%;
  background: rgba(255,255,255,.7);
  margin-left: auto; flex-shrink:0;
}

/* =========================================
   CONTENIDO
   ========================================= */
.wcmap-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* Hero / Banner */
.wcmap-hero {
  background: linear-gradient(135deg, var(--wcmap-welcome-bg) 0%, var(--wcmap-primary-dark) 100%);
  border-radius: var(--wcmap-r);
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  color: var(--wcmap-welcome-text);
}
.wcmap-hero-text { position:relative; z-index:1; }
.wcmap-hero h1 {
  margin:0 0 8px;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--wcmap-welcome-text) !important;
  line-height: 1.2;
}
.wcmap-hero p {
  margin:0; font-size:.95rem; opacity:.85;
  color: var(--wcmap-welcome-text) !important;
  max-width: 500px;
}
.wcmap-hero-shape {
  position: absolute;
  right: -80px; bottom: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events:none;
}
.wcmap-hero-shape::after {
  content:'';
  position:absolute; right:40px; top:40px;
  width:160px; height:160px; border-radius:50%;
  background:rgba(255,255,255,.06);
}

/* Stats */
.wcmap-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.wcmap-stat {
  background: var(--wcmap-card);
  border-radius: var(--wcmap-r);
  padding: 22px 20px;
  box-shadow: var(--wcmap-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform .15s, box-shadow .15s;
}
.wcmap-stat:hover { transform:translateY(-2px); box-shadow:var(--wcmap-shadow-md); }
.wcmap-stat-icon {
  width:48px; height:48px; border-radius:12px;
  background: linear-gradient(135deg, var(--wcmap-primary), var(--wcmap-primary-dark));
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.wcmap-stat-icon .wcmap-icon { width:24px; height:24px; color:#fff; }
.wcmap-stat-num { font-size:1.9rem; font-weight:800; color:#0F172A; line-height:1; }
.wcmap-stat-lbl { font-size:.78rem; color:#64748B; font-weight:500; margin-top:4px; text-transform:uppercase; letter-spacing:.05em; }

/* Sección */
.wcmap-section { display:flex; flex-direction:column; gap:14px; }
.wcmap-section-head { display:flex; align-items:center; justify-content:space-between; }
.wcmap-section-title { margin:0; font-size:1.05rem; font-weight:700; color:#0F172A; }
.wcmap-link { color:var(--wcmap-primary); font-size:.85rem; font-weight:600; text-decoration:none !important; }
.wcmap-link:hover { text-decoration:underline !important; }

/* Quick actions */
.wcmap-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.wcmap-quick-card {
  background: var(--wcmap-card);
  border-radius: var(--wcmap-r);
  padding: 22px 12px 18px;
  text-align: center;
  text-decoration: none !important;
  color: #334155;
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--wcmap-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 2px solid transparent;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.wcmap-quick-card:hover {
  transform: translateY(-3px);
  border-color: var(--wcmap-primary);
  box-shadow: 0 8px 25px rgba(99,102,241,.15);
  color: var(--wcmap-primary) !important;
}
.wcmap-quick-ico { width:32px; height:32px; color:var(--wcmap-primary); }

/* Orders */
.wcmap-orders { display:flex; flex-direction:column; gap:8px; }
.wcmap-order {
  background: var(--wcmap-card);
  border-radius: 12px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto auto 28px;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
  color: #334155;
  box-shadow: var(--wcmap-shadow);
  border-left: 3px solid transparent;
  transition: transform .15s, border-color .15s;
}
.wcmap-order:hover { transform:translateX(3px); border-left-color:var(--wcmap-primary); }
.wcmap-order-id { display:flex; align-items:center; gap:10px; }
.wcmap-order-num { font-weight:700; color:#0F172A; }
.wcmap-order-meta { font-size:.8rem; color:#94A3B8; }
.wcmap-order-total { font-weight:700; color:#0F172A; white-space:nowrap; }
.wcmap-order-arrow .wcmap-icon { width:16px; height:16px; color:#CBD5E1; }

/* Badges */
.wcmap-badge {
  display:inline-flex; align-items:center;
  padding:3px 10px; border-radius:20px;
  font-size:.68rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em; white-space:nowrap;
}
.wcmap-badge.s-completed  { background:#ECFDF5; color:#059669; }
.wcmap-badge.s-processing { background:#EFF6FF; color:#2563EB; }
.wcmap-badge.s-on-hold    { background:#FFFBEB; color:#D97706; }
.wcmap-badge.s-pending    { background:#FFF7ED; color:#EA580C; }
.wcmap-badge.s-cancelled  { background:#FEF2F2; color:#DC2626; }
.wcmap-badge.s-refunded   { background:#F5F3FF; color:#7C3AED; }

/* Sub-páginas */
.wcmap-subpage { background:var(--wcmap-card); border-radius:var(--wcmap-r); padding:32px 36px; box-shadow:var(--wcmap-shadow); }
.wcmap-subpage h2 { font-size:1.2rem; font-weight:700; color:#0F172A; margin-bottom:20px; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .wcmap { --wcmap-sidebar-w: 220px; gap:20px; }
  .wcmap-quick { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .wcmap { grid-template-columns:1fr; }
  .wcmap-nav { position:static; }
  .wcmap-burger { display:flex; }
  .wcmap-menu { display:none; }
  .wcmap-menu.is-open { display:flex; animation:wcmap-in .15s ease; }
  .wcmap-hero { padding:24px; }
  .wcmap-stats { grid-template-columns:1fr 1fr; }
  .wcmap-order { grid-template-columns:1fr auto; }
  .wcmap-order-meta, .wcmap-order-arrow { display:none; }
}
@media (max-width:480px) {
  .wcmap-stats { grid-template-columns:1fr; }
  .wcmap-quick { grid-template-columns:1fr 1fr; }
  .wcmap-subpage { padding:20px 16px; }
}
@keyframes wcmap-in {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:none; }
}
