/* ── Reset & Variables ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:      #E08272;
  --pink-l:    #FAF0EE;
  --pink-m:    #F2C4B8;
  --purple:    #71468C;
  --purple-l:  #EDE5F5;
  --purple-m:  #C8ADD6;
  --white:     #ffffff;
  --gray-50:   #EEB8A8;
  --gray-100:  #F5CFC0;
  --gray-300:  #C8ADD6;
  --gray-500:  #6B4888;
  --gray-700:  #6B4888;
  --gray-900:  #4A2870;
  --green:     #A5D2D0;
  --red:       #EF4444;
  --radius:    16px;
  --radius-sm: 8px;
  --shadow:    0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --font:      'Mali', cursive;
  --font-h:    'Mali', cursive;
  --font-body: 'Mali', cursive;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Mali', cursive;
  color: var(--gray-900);
  background: #fdfafd;
  line-height: 1.6;
  font-size: 15px;
}
p, span, li, input, textarea, select { font-family: 'Mali', cursive; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-h); font-size: 20px;
  color: var(--purple); flex-shrink: 0; text-decoration: none;
}
.logo-img {
  height: 32px !important;
  width: auto !important;
  max-width: none !important;
  display: inline-block !important;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text { font-family: var(--font-h); font-size: 18px; color: var(--purple); }
.logo-icon { font-size: 28px; }
.nav-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-link {
  padding: 8px 14px; border-radius: 8px;
  font-weight: 500; font-size: 14px; color: var(--gray-700);
  transition: all .2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--purple); background: var(--purple-l); }
.nav-link-book {
  background: #C9AFD4;
  color: #4A2870 !important; border-radius: 24px; padding: 8px 18px;
  font-weight: 600; margin-left: 8px;
}
.nav-link-book:hover { background: #B89EC3; }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.btn-login {
  padding: 8px 20px; border-radius: 24px; font-weight: 600; font-size: 14px;
  background: var(--purple); color: white;
  transition: opacity .2s;
}
.btn-login:hover { opacity: .85; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--gray-700); }

/* User menu */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-50); border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 24px; padding: 4px 14px 4px 4px;
  font-size: 14px; color: var(--gray-700);
}
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-avatar-ph { width: 32px; height: 32px; border-radius: 50%; background: var(--purple-l, #e9d5ff); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--purple); flex-shrink: 0; }
.user-name { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.chevron-sm { font-size: 10px; color: var(--gray-500); margin-left: 2px; display: none; }
@media (min-width: 769px) {
  .user-name { display: inline; }
  .chevron-sm { display: inline; }
}
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: white; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); border: 1px solid var(--gray-100);
  min-width: 180px; overflow: hidden; z-index: 200;
}
.user-dropdown.open { display: block; }
.user-dropdown a { display: block; padding: 10px 16px; font-size: 14px; color: var(--gray-700); }
.user-dropdown a:hover { background: var(--gray-50); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 0; }
.text-red { color: var(--red) !important; }

/* ── Main Content ────────────────────────────────────── */
.main-content { min-height: calc(100vh - 64px - 240px); }

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  background-color: #F8E2D0;
  background-image:
    linear-gradient(rgba(195,130,105,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195,130,105,.10) 1px, transparent 1px);
  background-size: 64px 64px;
  position: relative;
  overflow: hidden;
  padding: 96px 24px 80px;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-h); font-size: 40px; color: var(--purple);
  font-weight: 700; margin-bottom: 12px;
}
.page-header p { color: var(--gray-500); font-size: 16px; max-width: 480px; margin: 0 auto; }

/* ── Container ───────────────────────────────────────── */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 900px;  margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-title {
  font-family: var(--font-h); font-size: 28px; color: var(--purple);
  font-weight: 700; margin-bottom: 8px;
}
.section-sub { color: var(--gray-500); margin-bottom: 36px; }
.text-center { text-align: center; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }

/* ── Grid ────────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: 24px;
  font-size: 14px; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: #C9AFD4;
  color: #4A2870;
}
.btn-primary:hover { background: #B89EC3; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--purple); color: var(--purple);
}
.btn-outline:hover { background: var(--purple-l); }
.btn-line { background: #06C755; color: white; }
.btn-line:hover { opacity: .9; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  background: #F8E2D0;
  padding: 60px 24px;
  min-height: 520px;
  display: flex; align-items: center;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; gap: 48px;
}
.hero-text { flex: 0 0 auto; max-width: 520px; }
.hero-tag {
  display: inline-block; background: var(--pink-m); color: var(--pink);
  font-size: 13px; font-weight: 600; padding: 4px 14px;
  border-radius: 24px; margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-h); font-size: 52px; line-height: 1.1;
  font-weight: 700; color: var(--purple); margin-bottom: 20px;
}
.hero-title span { color: var(--pink); }
.hero-desc { color: var(--gray-700); font-size: 17px; line-height: 1.8; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; }
.hero-img img { border-radius: 24px; box-shadow: var(--shadow-lg); }
.hero-logo-img {
  width: 320px; height: auto;
  max-height: 400px; object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(124,58,237,.15));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.hero-img-placeholder {
  width: 100%; height: 360px; border-radius: 24px;
  background: linear-gradient(135deg, var(--pink-m), var(--purple-m));
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
}
.hero-stats {
  display: flex; gap: 32px; margin-top: 36px; padding-top: 32px;
  border-top: 1px solid var(--gray-100);
}
.hero-stat-num { font-family: var(--font-h); font-size: 28px; font-weight: 700; color: var(--purple); }
.hero-stat-label { font-size: 13px; color: var(--gray-500); }

/* ── Class Type Cards ────────────────────────────────── */
.class-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.class-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.class-card-color { height: 6px; }
.class-card-body { padding: 20px; }
.class-card-level {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 24px; margin-bottom: 10px;
}
.level-beginner { background: #FEE2E2; color: #DC2626; }
.level-intermediate { background: #FEF3C7; color: #D97706; }
.level-advanced { background: #EDE9FE; color: #7C3AED; }
.level-all { background: #D1FAE5; color: #059669; }
.class-card-name { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.class-card-desc { font-size: 13px; color: var(--gray-500); line-height: 1.6; }
.class-card-warning { font-size: 12px; color: #D97706; margin-top: 8px; }

/* ── Class Card Rich (with image) ────────────────────── */
.class-card-rich {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.class-card-rich:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.class-card-img-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
  flex-shrink: 0;
}
.class-card-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.class-card-rich:hover .class-card-img { transform: scale(1.04); }

.class-card-img-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
}
.class-card-level-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 24px;
}
.class-card-level-badge.level-beginner    { background: #A5D2D0; color: #1D5E5C; }
.class-card-level-badge.level-intermediate{ background: #C8ADD6; color: #4A2770; }
.class-card-level-badge.level-advanced    { background: #B8C9F2; color: #2A3D8C; }
.class-card-level-badge.level-all,
.class-card-level-badge.level-all_level   { background: #F2C4B8; color: #7A2820; }
.class-card-warn-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 24px;
  background: rgba(251,191,36,.9); color: #78350f;
}

.class-card-rich-body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; flex: 1;
}
.class-card-rich-title {
  font-size: 18px; font-weight: 700;
  color: var(--gray-900); margin-bottom: 8px; line-height: 1.3;
}
.class-card-rich-desc {
  font-size: 14px; color: var(--gray-700);
  line-height: 1.75; margin-bottom: 14px; flex: 1;
}
.class-card-warning-box {
  background: #FEF3C7; border-radius: 8px;
  padding: 10px 14px; font-size: 13px;
  color: #92400E; margin-bottom: 16px;
}

/* ── Package Cards ───────────────────────────────────── */
.pkg-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 24px;
  position: relative; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.pkg-card .btn-full { margin-top: auto; }
.pkg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pkg-card.hot {
  background: linear-gradient(135deg, #FFF1F2, #FDF4FF);
  border: 2px solid var(--pink);
}
.pkg-hot-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white; font-size: 12px; font-weight: 700;
  padding: 4px 16px; border-radius: 24px; white-space: nowrap;
}
.pkg-sessions { font-family: var(--font-h); font-size: 40px; font-weight: 700; color: var(--purple); text-align: center; line-height: 42px; }
.pkg-label { text-align: center; color: var(--gray-500); font-size: 13px; margin-bottom: 16px; }
.pkg-price { text-align: center; margin-bottom: 20px; }
.pkg-price-main { font-family: var(--font-h); font-size: 32px; font-weight: 700; color: var(--pink); }
.pkg-price-old { font-size: 14px; color: var(--gray-400, #9CA3AF); text-decoration: line-through; margin-right: 8px; }
.pkg-duration { display: flex; justify-content: center; gap: 12px; font-size: 13px; color: var(--gray-500); margin-bottom: 20px; }
.pkg-duration span { background: var(--gray-100); padding: 4px 12px; border-radius: 24px; }

/* ── Instructor Cards ────────────────────────────────── */
.inst-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s; cursor: pointer;
}
.inst-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.inst-card-img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: contain;
  background: #fdf0f5;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
}
.inst-card-img-ph { width: 100%; aspect-ratio: 1/1; background: linear-gradient(135deg, var(--pink-m), var(--purple-m)); display: flex; align-items: center; justify-content: center; font-size: 80px; }
.inst-card-body { padding: 20px; }
.inst-card-name { font-weight: 700; font-size: 17px; color: var(--purple); margin-bottom: 4px; }
.inst-card-spec { font-size: 13px; color: var(--gray-500); margin-bottom: 12px; }

/* ── Booking ─────────────────────────────────────────── */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 8px; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-btn {
  flex: 0 0 64px; border: 2px solid var(--gray-100); border-radius: 12px;
  background: white; padding: 10px 4px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.date-btn:hover { border-color: var(--purple-m); }
.date-btn.active { border-color: var(--purple); background: var(--purple); color: white; }
.day-name { display: block; font-size: 11px; font-weight: 500; }
.day-num  { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.day-month { display: block; font-size: 11px; }

.booking-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  margin-bottom: 12px; cursor: pointer;
  border-left: 4px solid var(--purple);
  transition: transform .15s, box-shadow .15s;
}
.booking-card:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }
.booking-card.full { opacity: .6; cursor: default; }
.booking-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.booking-card-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.booking-card-inst { font-size: 13px; color: var(--gray-500); }
.booking-meta { display: flex; gap: 12px; font-size: 13px; color: var(--gray-500); margin-top: 10px; flex-wrap: wrap; }
.seats-low { color: #D97706; font-weight: 600; }
.seats-full { color: var(--red); font-weight: 600; }

/* ── Session Bar (booking page) ──────────────────────── */
.session-bar {
  background: linear-gradient(135deg, var(--purple-l), var(--pink-l));
  border: 1px solid var(--purple-m); border-radius: var(--radius-sm);
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.session-bar-warn { background: #FEF3C7; border-color: #FCD34D; }
.session-info { display: flex; align-items: center; gap: 16px; }
.session-count { font-family: var(--font-h); font-size: 28px; color: var(--purple); line-height: 1; }
.session-label { font-size: 12px; color: var(--gray-500); }
.session-expiry { font-size: 13px; color: var(--gray-700); }

/* ── Account ─────────────────────────────────────────── */
.account-card {
  background: #b191c4;
  border-radius: var(--radius); padding: 32px; color: white;
  display: flex; align-items: center; gap: 24px; margin-bottom: 24px;
}
.account-avatar { width: 72px; height: 72px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); object-fit: cover; }
.account-avatar-ph { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.account-name { font-family: var(--font-h); font-size: 24px; margin-bottom: 4px; }
.account-id { font-size: 13px; opacity: .8; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-box { background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.stat-box-num { font-family: var(--font-h); font-size: 32px; color: var(--purple); }
.stat-box-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* ── Auth ────────────────────────────────────────────── */
.auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: linear-gradient(135deg, #FEE2E2, #FDF4FF, #EDE9FE); }
.auth-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 48px 40px; width: 100%; max-width: 420px; text-align: center; }
.auth-logo { font-family: var(--font-h); font-size: 26px; color: var(--purple); margin-bottom: 8px; }
.auth-sub { color: var(--gray-500); margin-bottom: 28px; font-size: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray-500); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200, #e5e7eb); }

/* Auth form fields */
.auth-form { margin-bottom: 4px; }
.auth-field {
  position: relative; display: flex; align-items: center;
  border: 1.5px solid var(--gray-300); border-radius: 12px;
  overflow: hidden; background: white;
  margin-bottom: 14px;
  transition: border-color .2s;
}
.auth-field:focus-within { border-color: var(--purple); }
.auth-field-icon {
  padding: 0 14px; color: var(--gray-500); font-size: 15px; flex-shrink: 0;
}
.auth-input {
  flex: 1; border: none; outline: none;
  padding: 14px 8px; font-size: 15px;
  background: transparent; font-family: var(--font);
  color: var(--gray-900);
}
.auth-input::placeholder { color: var(--gray-400); }
.auth-eye {
  background: none; border: none; cursor: pointer;
  padding: 0 14px; color: var(--gray-400);
  font-size: 15px; flex-shrink: 0;
  transition: color .2s;
}
.auth-eye:hover { color: var(--purple); }
.btn-signin {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; font-family: var(--font);
  cursor: pointer; width: 100%; padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity .2s, transform .1s;
  margin-bottom: 4px;
}
.btn-signin:hover { opacity: .92; transform: translateY(-1px); }
.auth-error {
  background: #FEE2E2; color: #DC2626;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; text-align: left;
}

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 16px; text-align: left; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300); font-size: 14px; font-family: var(--font);
  transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--purple); }

/* ── Modal ───────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-card { position: relative; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; width: 100%; max-width: 480px; }
.modal-title { font-family: var(--font-h); font-size: 22px; color: var(--purple); margin-bottom: 20px; }
.modal-detail { margin-bottom: 24px; }
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.modal-warning { background: #FEF3C7; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: #92400E; margin-top: 12px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }

/* ── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--gray-900); color: white;
  padding: 12px 24px; border-radius: 24px;
  font-size: 14px; font-weight: 500;
  z-index: 9999; animation: toastIn .3s ease;
  white-space: nowrap;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--purple); }
@keyframes toastIn { from { opacity:0; transform: translateX(-50%) translateY(12px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* ── Tags & Badges ───────────────────────────────────── */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 24px; }
.badge-pink   { background: var(--pink-m);   color: #BE185D; }
.badge-purple { background: var(--purple-l); color: var(--purple); }
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-red    { background: #FEE2E2; color: var(--red); }
.badge-gray   { background: var(--gray-100); color: var(--gray-500); }

/* ── Empty / Loading ─────────────────────────────────── */
.empty-box { text-align: center; padding: 64px 24px; color: var(--gray-500); }
.empty-box-icon { font-size: 64px; margin-bottom: 16px; color: var(--gray-300); }
.loading-row { text-align: center; padding: 40px; color: var(--gray-500); }
.spinner { width: 40px; height: 40px; border: 4px solid var(--purple-m); border-top-color: var(--purple); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ──────────────────────────────────────────── */
.footer { background: var(--gray-900); color: var(--gray-300); padding: 56px 24px 24px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 60px; margin-bottom: 0; flex-wrap: wrap; }
.footer-brand { flex: 0 0 260px; }
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-h); font-size: 22px; color: white;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-social a { font-size: 13px; background: rgba(255,255,255,.1); padding: 6px 12px; border-radius: 24px; transition: background .2s; }
.footer-social a:hover { background: rgba(255,255,255,.2); }
.footer-links { flex: 1; display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title { font-size: 14px; font-weight: 700; color: white; margin-bottom: 4px; }
.footer-col a, .footer-col span { font-size: 13px; transition: color .2s; }
.footer-col a:hover { color: var(--pink-m); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; text-align: center; }

/* ── Goods ───────────────────────────────────────────── */
.goods-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s; display: flex; flex-direction: column; }
.goods-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.goods-card-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 60px; flex-shrink: 0; }
.goods-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.goods-card-name { font-weight: 700; font-size: 16px; margin-bottom: 8px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.goods-card-price { font-family: var(--font-h); font-size: 24px; color: var(--pink); }
.goods-card-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.goods-card-btns .btn { flex: 1; min-width: 120px; text-align: center; }
.variant-tag { display: inline-block; padding: 2px 10px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 12px; margin: 2px; color: var(--gray-700); cursor: pointer; transition: all .15s; user-select: none; background: #fff; }
.variant-tag:hover { border-color: var(--purple); color: var(--purple); }
.variant-tag.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.variant-tag.disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; pointer-events: none; }

/* ── Checkout / Order ────────────────────────────────── */
.order-row { background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.order-id { font-size: 12px; color: var(--gray-500); }
.order-amount { font-family: var(--font-h); font-size: 20px; color: var(--purple); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { gap: 40px; }
  .hero-title { font-size: 42px; }
  .hero-img { flex: 0 0 320px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  body { overflow-x: hidden; }
  body.nav-open { overflow: hidden; }
  .nav-inner { gap: 8px; padding: 0 16px; }
  /* Nav links overlay */
  .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0; background: white; flex-direction: column; align-items: flex-start; padding: 20px 24px 32px; gap: 4px; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.12); border-bottom: 1px solid var(--gray-100); }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; padding: 12px 16px; font-size: 16px; }
  /* Hamburger button */
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; outline: none; flex-shrink: 0; }
  .nav-toggle:focus { outline: none; box-shadow: none; }
  /* Hide user name text on small screens, show only avatar */
  /* Mobile: pill button — avatar + chevron together, no name */
  .user-btn { width: auto; height: 36px; padding: 3px 10px 3px 3px; background: var(--gray-50); border: 1px solid var(--gray-200, #e5e7eb); border-radius: 24px; justify-content: center; flex-shrink: 0; gap: 6px; }
  .user-btn .user-avatar-ph { width: 30px; height: 30px; font-size: 14px; border: none; }
  .user-btn .user-avatar { width: 30px; height: 30px; border: none; border-radius: 50%; }
  .chevron-sm { display: inline !important; font-size: 9px; margin-left: 0; }
  /* Ensure nav-right doesn't overflow */
  .nav-right { gap: 8px; flex-shrink: 0; }
  .btn-login { padding: 7px 14px; font-size: 13px; }
  .hero { padding: 48px 24px; }
  .hero-inner { flex-direction: column; gap: 32px; }
  .hero-title { font-size: 34px; }
  .hero-img { flex: none; width: 100%; order: -1; }
  .hero-stats { gap: 20px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .account-card { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-brand { flex: none; }
}
@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .why-section .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .why-section .card-body { padding: 10px; }
  .why-icon { font-size: 28px !important; margin-bottom: 8px !important; }
  .why-title { font-size: 12px !important; margin-bottom: 4px !important; }
  .why-desc  { font-size: 12px !important; }
  .hero-title { font-size: 28px; }
  .page-header h1 { font-size: 28px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 32px 24px; }
}

/* ══════════════════════════════════════
   V3 Brand Styles
   ══════════════════════════════════════ */

/* ── Nav ── */
.nav-link:hover, .nav-link.active { color: #71468C; background: #EDE5F3; }
.logo-text { color: #71468C; }
.nav-link-book { background: #C9AFD4; color: #4A2870; }
.nav-link-book:hover { background: #B89EC3; }

/* ── Buttons ── */
.btn-primary { background: #C9AFD4; color: #4A2870; box-shadow: none; border: none; }
.btn-primary:hover { background: #B89EC3; transform: translateY(-2px); }
.btn-outline { border-color: #71468C; color: #71468C; background: transparent; }
.btn-outline:hover { background: #EDE5F3; }

/* ── Hero ── */
.hero {
  background-color: #F8E2D0;
  background-image:
    linear-gradient(rgba(195,130,105,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(195,130,105,.10) 1px, transparent 1px);
  background-size: 64px 64px;
  position: relative; overflow: hidden;
}
.hero .hero-inner { position: relative; z-index: 2; }
.hero-title { color: #4A2870; }
.hero-title span { color: #71468C; }
.hero-desc { color: #6B4888; }
.hero-tag { background: #EDE5F3; color: #71468C; border-color: #C9AFD4; }
.hero-stat-num { color: #71468C; }
.hero-stat-label { color: #6B4888; }
.hero-stats > div + div { border-color: #C9AFD4; }

/* ── Hero blobs ── */
@keyframes blob-morph-tl {
  0%   { border-radius: 55% 45% 50% 50% / 50% 60% 40% 50%; }
  25%  { border-radius: 40% 60% 60% 40% / 55% 45% 55% 45%; }
  50%  { border-radius: 60% 40% 45% 55% / 40% 60% 50% 50%; }
  75%  { border-radius: 45% 55% 55% 45% / 60% 40% 45% 55%; }
  100% { border-radius: 55% 45% 50% 50% / 50% 60% 40% 50%; }
}
@keyframes blob-morph-br {
  0%   { border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%; }
  25%  { border-radius: 60% 40% 40% 60% / 45% 55% 50% 50%; }
  50%  { border-radius: 50% 50% 60% 40% / 55% 45% 40% 60%; }
  75%  { border-radius: 40% 60% 45% 55% / 50% 50% 60% 40%; }
  100% { border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%; }
}
.h-blob { position: absolute; pointer-events: none; z-index: 0; }
.h-blob-tl {
  top: -90px; left: -90px; width: 340px; height: 300px;
  background-color: #e8b9b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 300'%3E%3Cpath d='M20,160 Q100,140 180,158 Q260,176 330,155' fill='none' stroke='white' stroke-width='2' opacity='.35' stroke-linecap='round'/%3E%3Cpath d='M15,195 Q95,175 178,193 Q260,211 330,190' fill='none' stroke='white' stroke-width='2' opacity='.28' stroke-linecap='round'/%3E%3Cpath d='M18,230 Q98,210 180,228 Q262,246 330,225' fill='none' stroke='white' stroke-width='2' opacity='.22' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  border-radius: 55% 45% 50% 50% / 50% 60% 40% 50%;
  animation: blob-morph-tl 8s ease-in-out infinite;
}
.h-blob-br {
  bottom: -100px; right: -80px; width: 300px; height: 260px;
  background-color: #e8b9b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 260'%3E%3Cpath d='M15,80 Q85,62 160,78 Q235,94 292,74' fill='none' stroke='white' stroke-width='2' opacity='.35' stroke-linecap='round'/%3E%3Cpath d='M12,115 Q82,97 158,113 Q234,129 290,109' fill='none' stroke='white' stroke-width='2' opacity='.28' stroke-linecap='round'/%3E%3Cpath d='M15,150 Q85,132 160,148 Q235,164 290,144' fill='none' stroke='white' stroke-width='2' opacity='.22' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%;
  animation: blob-morph-br 10s ease-in-out infinite;
}

/* ── Cards ── */
.card { border-color: #C8ADD6; background: #FFF8F5; }
.class-card-rich { border: none; background: #FFF8F5; box-shadow: 0 4px 18px rgba(113,70,140,.08); }
.class-card-rich:hover { box-shadow: 0 10px 32px rgba(113,70,140,.16); }
.pkg-card { border-color: #C8ADD6; background: #FFF8F5; }
.pkg-card.hot { border-color: #E08272; }
.pkg-sessions { color: #71468C; }
.pkg-price-main { color: #E99B91; }
.pkg-hot-badge { background: #E08272; }
.inst-card { border-color: #C8ADD6; background: #FFF8F5; }
.inst-card-name { color: #71468C; }
.inst-card-spec { color: #6B4888; }
.inst-card-img-ph { background: #EDE5F5; color: #C8ADD6; }
.class-card-warn-badge { background: #fef3c7; color: #92400e; }

/* ── Section titles ── */
.section-title { color: #71468C; }
.section-sub { color: #6B4888; }

/* ── Level badges ── */
.level-beginner { background: #A5D2D0; color: #1D5E5C; }
.level-intermediate { background: #C8ADD6; color: #4A2770; }
.level-all, .level-all_level { background: #F2C4B8; color: #6B2820; }

/* ── Banner slider ── */
.banner-slider { box-shadow: 0 4px 24px rgba(113,70,140,.10); }

/* ── Why section ── */
.why-section { background-color: #c9afd3; position: relative; overflow: hidden; }

/* ── Footer ── */
.footer {
  background-color: #71468c;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  color: rgba(255,255,255,.85);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px; left: auto;
  width: 320px; height: 290px;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 290'%3E%3Cpath d='M172,12 C236,5 308,54 313,118 C318,182 276,259 214,277 C152,295 73,284 34,235 C-5,186 10,102 50,62 C77,32 122,18 172,12Z' fill='none' stroke='%23c4a0d5' stroke-width='2.5' opacity='0.75'/%3E%3Cpath d='M180,25 C240,20 295,65 300,125 C305,185 265,255 210,270 C155,285 85,275 50,230 C15,185 20,110 55,72 C80,45 125,28 180,25Z' fill='%23b191c4'/%3E%3Cpath d='M50,180 Q108,168 160,186 Q212,204 262,188 Q292,178 315,190' fill='none' stroke='white' stroke-width='2' opacity='.38' stroke-linecap='round'/%3E%3Cpath d='M45,205 Q105,193 158,212 Q212,231 263,213 Q292,203 314,216' fill='none' stroke='white' stroke-width='2' opacity='.30' stroke-linecap='round'/%3E%3Cpath d='M50,232 Q110,219 162,238 Q214,257 264,239 Q292,228 312,242' fill='none' stroke='white' stroke-width='2' opacity='.23' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.footer::after {
  content: '';
  position: absolute;
  bottom: -70px; left: -70px; right: auto;
  width: 290px; height: 260px;
  z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 290 260'%3E%3Cpath d='M112,8 C170,-2 256,36 268,96 C280,156 250,230 190,255 C130,280 54,268 18,216 C-18,164 4,80 48,46 C76,20 82,16 112,8Z' fill='none' stroke='%23c4a0d5' stroke-width='2.5' opacity='0.75'/%3E%3Cpath d='M120,22 C175,12 250,45 262,100 C274,155 245,225 190,248 C135,271 62,260 28,212 C-6,164 15,90 55,58 C80,34 85,30 120,22Z' fill='%23b191c4'/%3E%3Cpath d='M22,78 Q68,66 112,84 Q156,102 198,86 Q232,74 265,87' fill='none' stroke='white' stroke-width='2' opacity='.38' stroke-linecap='round'/%3E%3Cpath d='M18,105 Q65,93 110,112 Q155,131 198,114 Q231,102 263,115' fill='none' stroke='white' stroke-width='2' opacity='.30' stroke-linecap='round'/%3E%3Cpath d='M20,132 Q68,119 112,138 Q156,157 200,140 Q233,127 264,141' fill='none' stroke='white' stroke-width='2' opacity='.23' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.footer-inner, .footer-bottom { position: relative; z-index: 1; }
.footer-logo { color: #fff; }
.footer-logo span { color: #e8b9b8; }
.footer-brand p { color: rgba(255,255,255,.65); }
.footer-col-title { color: #fff; }
.footer-col a, .footer-col span { color: rgba(255,255,255,.65); }
.footer-col a:hover { color: #fff; }
.footer-social a { background: rgba(255,255,255,.15); color: #fff; }
.footer-social a:hover { background: rgba(255,255,255,.25); }
.footer-bottom { border-color: rgba(255,255,255,.15); color: rgba(255,255,255,.45); }

/* ── Page header blobs ── */
.page-header > * { position: relative; z-index: 1; }
.page-header::before {
  content: '';
  position: absolute;
  top: -90px; left: -90px;
  width: 340px; height: 300px;
  background-color: #e8b9b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 300'%3E%3Cpath d='M20,160 Q100,140 180,158 Q260,176 330,155' fill='none' stroke='white' stroke-width='2' opacity='.35' stroke-linecap='round'/%3E%3Cpath d='M15,195 Q95,175 178,193 Q260,211 330,190' fill='none' stroke='white' stroke-width='2' opacity='.28' stroke-linecap='round'/%3E%3Cpath d='M18,230 Q98,210 180,228 Q262,246 330,225' fill='none' stroke='white' stroke-width='2' opacity='.22' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  border-radius: 55% 45% 50% 50% / 50% 60% 40% 50%;
  z-index: 0;
  animation: blob-morph-tl 8s ease-in-out infinite;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -80px;
  width: 300px; height: 260px;
  background-color: #e8b9b8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 260'%3E%3Cpath d='M15,80 Q85,62 160,78 Q235,94 292,74' fill='none' stroke='white' stroke-width='2' opacity='.35' stroke-linecap='round'/%3E%3Cpath d='M12,115 Q82,97 158,113 Q234,129 290,109' fill='none' stroke='white' stroke-width='2' opacity='.28' stroke-linecap='round'/%3E%3Cpath d='M15,150 Q85,132 160,148 Q235,164 290,144' fill='none' stroke='white' stroke-width='2' opacity='.22' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  border-radius: 45% 55% 50% 50% / 60% 40% 60% 40%;
  z-index: 0;
  animation: blob-morph-br 10s ease-in-out infinite;
}
