/* ── Public header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 249, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vt-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--vt-header-h);
}

.site-header-inner > .logo {
  flex: none;
  min-width: 0;
}

.site-nav-mobile-actions {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  flex: 1;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--vt-muted);
}

.site-nav a:hover {
  color: var(--vt-pink);
  background: rgba(240, 70, 106, 0.08);
  opacity: 1;
}

.site-nav a.active,
.site-nav a.active:hover {
  color: var(--vt-text);
  background: rgba(36, 26, 32, 0.06);
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.4px solid var(--vt-border);
  background: var(--vt-white);
  align-items: center;
  justify-content: center;
}

/* ── Public footer ── */
.site-footer {
  background: var(--vt-text);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand .logo .logo-img {
  height: 56px;
  max-width: 300px;
}

.footer-brand p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
  opacity: 1;
  transform: translateX(3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  flex-wrap: wrap;
}

/* ── Auth layout ── */
.auth-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-visual {
  background: var(--vt-gradient-deep);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-visual::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -120px;
  bottom: -80px;
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-visual-logo .logo,
.auth-visual .logo {
  color: #fff;
}

.auth-visual-logo .logo {
  background: none;
  padding: 0;
}

.auth-visual-logo .logo-img {
  height: 140px;
  max-width: 260px;
}

.auth-visual-foot {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  position: relative;
  z-index: 1;
}

.auth-visual h1 {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 28px 0 14px;
}

.auth-visual p {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.6;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-width: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(240, 70, 106, 0.08), transparent 55%),
    var(--vt-bg-soft);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 800;
  color: var(--vt-text);
  letter-spacing: -0.3px;
}

.auth-mobile-brand .logo-img {
  height: 40px;
  max-width: 200px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  min-width: 0;
  background: var(--vt-white);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: var(--vt-shadow-lg);
  border: 1px solid rgba(238, 228, 232, 0.8);
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.auth-card .lead {
  font-size: 14px;
  color: var(--vt-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

.auth-row-end {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.auth-row-end a {
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--vt-bg);
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 22px;
}

.auth-tab {
  height: 40px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--vt-muted);
}

.auth-tab.active {
  background: var(--vt-white);
  color: var(--vt-text);
  box-shadow: var(--vt-shadow);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vt-muted);
}

.auth-guest {
  text-align: center;
  margin-top: 14px;
}

.auth-guest a {
  font-size: 12px;
  font-weight: 700;
  color: var(--vt-muted);
}

.auth-pro-link {
  text-align: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--vt-border);
}

.auth-pro-link a {
  font-size: 13px;
  font-weight: 700;
}

/* ── App shell (pro / account) ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--vt-bg);
}

.app-sidebar {
  width: var(--vt-sidebar-w);
  flex: none;
  background: var(--vt-bg-sidebar);
  border-right: 1px solid var(--vt-border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 80;
  overflow: visible;
  transition: transform 0.25s ease;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--vt-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: var(--vt-pink);
  background: rgba(240, 70, 106, 0.08);
  opacity: 1;
}

.nav-item.active,
.nav-item.active:hover {
  background: var(--vt-gradient);
  color: #fff;
  box-shadow: var(--vt-shadow-btn);
  opacity: 1;
}

.nav-item .cart-count,
.nav-item .notif-count {
  margin-left: auto;
  flex: none;
}

.nav-item.active .cart-count,
.nav-item.active .notif-count {
  background: rgba(255, 255, 255, 0.25);
  border-color: transparent;
}

.sidebar-profile {
  position: relative;
  margin-top: auto;
  flex: none;
  z-index: 20;
  overflow: visible;
}

.sidebar-user,
.sidebar-profile-btn {
  width: 100%;
  background: var(--vt-white);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(36, 26, 32, 0.05);
  border: 1.4px solid transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-profile-btn:hover,
.sidebar-profile.is-open .sidebar-profile-btn {
  border-color: rgba(240, 70, 106, 0.25);
  box-shadow: 0 4px 14px rgba(36, 26, 32, 0.08);
}

.sidebar-profile-chevron {
  flex: none;
  color: var(--vt-muted);
  transition: transform 0.2s ease;
}

.sidebar-profile.is-open .sidebar-profile-chevron {
  transform: rotate(180deg);
  color: var(--vt-pink, #F0466A);
}

.sidebar-profile-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  background: var(--vt-white);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(36, 26, 32, 0.14);
  border: 1px solid var(--vt-border);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-profile.is-open .sidebar-profile-menu {
  display: flex !important;
}

.sidebar-profile-menu[hidden] {
  display: none !important;
}

.sidebar-profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--vt-text);
}

.sidebar-profile-item:hover {
  background: rgba(36, 26, 32, 0.04);
  opacity: 1;
}

.sidebar-profile-item.is-danger {
  color: #F0466A;
}

.sidebar-profile-item.is-danger:hover {
  background: rgba(240, 70, 106, 0.08);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--vt-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--vt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-status {
  font-size: 11px;
  color: var(--vt-green);
  font-weight: 700;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 249, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--vt-border);
}

.app-content {
  padding: 24px 28px;
  flex: 1;
}

.page-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.page-narrow {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

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

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(36, 26, 32, 0.4);
  z-index: 70;
}

.sidebar-overlay.show {
  display: block;
}

/* Public page wrapper */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrap > main {
  flex: 1;
}

/* Mobile bottom nav for account/shop */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--vt-border);
  padding: 10px 12px 16px;
  justify-content: space-around;
  align-items: flex-end;
}

.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--vt-muted-2);
  font-size: 10px;
  font-weight: 700;
  min-width: 56px;
  border-radius: 12px;
  padding: 4px 6px;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.mobile-bottom-nav a:hover {
  color: var(--vt-pink);
  background: rgba(240, 70, 106, 0.08);
  opacity: 1;
  transform: translateY(-1px);
}

.mobile-bottom-nav a.active {
  color: var(--vt-pink);
  opacity: 1;
}

.mobile-bottom-nav .nav-cart {
  position: relative;
  margin-top: -20px;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--vt-gradient);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(240, 70, 106, 0.4);
}

.mobile-bottom-nav .nav-cart.active {
  outline: 2px solid rgba(36, 26, 32, 0.2);
  outline-offset: 3px;
  box-shadow: 0 10px 24px rgba(240, 70, 106, 0.5);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .auth-layout {
    display: block;
    width: 100%;
  }

  .auth-visual {
    display: none !important;
  }

  .auth-mobile-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 28px 16px 40px;
    justify-content: flex-start;
    padding-top: max(28px, env(safe-area-inset-top));
    box-sizing: border-box;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: var(--vt-shadow);
  }

  .auth-card h2 {
    font-size: 22px;
  }

  .auth-card .form-input {
    height: 50px;
    font-size: 16px; /* prevents iOS zoom */
  }

  .auth-card .btn-lg {
    height: 52px;
    width: 100%;
  }

  .otp-inputs {
    gap: 6px;
  }

  .otp-inputs input {
    width: 44px;
    height: 50px;
  }

  .site-header-inner {
    gap: 12px;
    justify-content: space-between;
  }

  .site-header-inner > .logo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 56px);
  }

  .site-header-inner > .logo .logo-img {
    max-width: min(170px, 48vw);
  }

  .site-actions {
    margin-left: auto !important;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--vt-header-h);
    left: 0;
    right: 0;
    background: var(--vt-white);
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--vt-border);
    box-shadow: var(--vt-shadow);
    margin: 0;
    z-index: 120;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .site-nav-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 4px 4px;
    margin-top: 4px;
    border-top: 1px solid var(--vt-border);
  }

  .site-nav-mobile-actions .btn {
    width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  .site-actions {
    margin-left: 0;
    gap: 8px;
  }

  .site-actions .site-desktop-only {
    display: none;
  }

  /* Hide header cart only when bottom nav is present (shop pages) */
  html.has-bottom-nav .site-actions .site-cart-btn {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-105%);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .app-topbar,
  .app-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .app-content.has-mobile-nav {
    padding-bottom: 90px;
  }
}

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

  .app-topbar {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .app-topbar .page-heading {
    font-size: 16px;
  }

  .app-topbar .page-sub {
    font-size: 11px;
  }

  .app-topbar .search-box {
    order: 5;
    width: 100%;
    max-width: none !important;
    margin-left: 0 !important;
  }

  .app-content {
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .cart-layout {
    gap: 16px;
  }

  .site-header-inner {
    gap: 8px;
  }

  .site-header-inner > .logo .logo-img {
    height: 32px;
    max-width: 150px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .hero {
    border-radius: 0;
  }

  .cta-band {
    border-radius: 18px;
  }
}
