/* LEVELZ & STYLEZ - MOBILE-FIRST CUSTOMER APP SHELL */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --app-bg: #080808;
  --app-card: #121215;
  --app-card-elevated: #1a1a1f;
  --app-gold: #C9A45C;
  --app-gold-hover: #E0BD76;
  --app-gold-dim: rgba(201, 164, 92, 0.12);
  --app-gold-border: rgba(201, 164, 92, 0.28);
  --app-border: rgba(255, 255, 255, 0.08);
  --app-text: #F5F1E8;
  --app-text-muted: #9E9EA7;
  --app-nav-height: 64px;
  --app-header-height: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--app-bg);
  color: var(--app-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

.brand-font {
  font-family: 'Cinzel', Georgia, serif;
}

/* Base Mobile Viewport Wrapper */
.app-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--app-header-height) + var(--safe-top));
  padding-bottom: calc(var(--app-nav-height) + var(--safe-bottom) + 24px);
  max-width: 100%;
  position: relative;
}

/* App Top Navigation Bar */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--app-header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  background: rgba(10, 10, 13, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--app-border);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  padding-right: 16px;
}

/* Persistent Mobile Bottom Navigation (5 destinations) */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--app-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(12, 12, 15, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--app-border);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

.app-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 48px;
  color: var(--app-text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  gap: 3px;
  transition: all 0.2s ease;
  position: relative;
}

.app-nav-item.active {
  color: var(--app-gold);
}

.app-nav-item.active svg {
  color: var(--app-gold);
  transform: translateY(-1px);
}

.app-nav-item:active {
  transform: scale(0.95);
}

/* Touch Targets: 44px+ strictly enforced */
.touch-target, button, .btn-touch, a.btn-touch {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* App Buttons */
.btn-gold {
  background: linear-gradient(135deg, #C9A45C 0%, #B89047 100%);
  color: #080808;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(201, 164, 92, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-gold:active {
  transform: scale(0.98);
  background: #E0BD76;
}

.btn-dark {
  background: #18181c;
  color: var(--app-text);
  border: 1px solid var(--app-border);
  font-weight: 600;
  font-size: 13px;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.btn-dark:active {
  background: #222228;
  transform: scale(0.98);
}

/* Card Tokens */
.app-card {
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.app-card-gold {
  background: linear-gradient(145deg, #161511 0%, #111114 100%);
  border: 1px solid var(--app-gold-border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(201, 164, 92, 0.08);
}

/* Active Location Badge */
.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(201, 164, 92, 0.15);
  border: 1px solid rgba(201, 164, 92, 0.4);
  color: #E0BD76;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Mobile Cart Drawer (Bottom Sheet) */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #121216;
  border-top: 1px solid var(--app-gold-border);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  z-index: 51;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
  padding-bottom: calc(var(--safe-bottom) + 12px);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  margin: 10px auto 4px auto;
  cursor: grab;
}

/* Signature App Splash Loader */
#app-boot-splash {
  position: fixed;
  inset: 0;
  background: #080808;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#app-boot-splash.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(201, 164, 92, 0.12);
  border: 1.5px solid rgba(201, 164, 92, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C9A45C;
  font-size: 28px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  box-shadow: 0 0 45px rgba(201, 164, 92, 0.25);
  animation: logoPulse 1.8s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 60px rgba(201, 164, 92, 0.4); }
}

/* Top Progress Bar Indicator */
#page-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, #8C6D32, #C9A45C, #E0BD76);
  z-index: 99999;
  transition: width 0.25s ease, opacity 0.3s ease;
}

/* Quantity Steppers */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #18181c;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  overflow: hidden;
}

.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #F5F1E8;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qty-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  font-family: monospace;
}

/* Skeleton Loaders */
.skeleton-shimmer {
  background: linear-gradient(90deg, #141418 25%, #1d1d24 50%, #141418 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Offline Banner */
#offline-indicator {
  position: fixed;
  top: calc(var(--app-header-height) + var(--safe-top));
  left: 0;
  right: 0;
  background: #C75C5C;
  color: white;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  z-index: 39;
  display: none;
  letter-spacing: 0.03em;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
