/* Veloura Scents — App Styles */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; font-family: 'DM Sans', sans-serif; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ─── App Shell ─── */
#app { height: 100vh; background: #0f0f1a; }
#main-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f8f6f2;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* ─── Splash ─── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: #0f0f1a;
  display: flex; align-items: center; justify-content: center;
}
.splash-inner { text-align: center; animation: fadeUp 0.8s ease; }
.splash-logo {
  width: 72px; height: 72px; background: #d4af37;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px; font-weight: 600; color: #0f0f1a;
  margin: 0 auto 16px;
}
.splash-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 600; color: #fff; letter-spacing: 1px;
}
.splash-name span { color: #d4af37; }
.splash-tagline { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 8px; letter-spacing: 0.5px; }

/* ─── Topbar ─── */
.topbar {
  background: #0f0f1a;
  padding: 12px 16px;
  position: relative; z-index: 50; flex-shrink: 0;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-mark {
  width: 34px; height: 34px; background: #d4af37;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: #0f0f1a;
}
.brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600; color: #fff; letter-spacing: 0.5px;
}
.topbar-actions { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  background: none; border: none;
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8); position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); }
.badge {
  position: absolute; top: 4px; right: 4px;
  background: #d4af37; color: #0f0f1a;
  font-size: 9px; font-weight: 500;
  width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}

/* ─── Page Container ─── */
#page-container { flex: 1; overflow: hidden; position: relative; }
.page { display: none; position: absolute; inset: 0; overflow-y: auto; background: #f8f6f2; }
.page.active { display: block; }

/* ─── Page Header ─── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #f0ece4;
  position: sticky; top: 0; z-index: 10;
}
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600; color: #1a1a2e;
}
.back-btn {
  background: #f0ece4; border: none; border-radius: 10px;
  width: 36px; height: 36px; font-size: 18px; color: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
}
.floating-back {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(4px);
}

/* ─── Hero Section ─── */
.hero-section {
  background: #0f0f1a;
  padding: 28px 20px 32px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(212,175,55,0.12) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #d4af37; margin-bottom: 8px; }
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 44px; font-weight: 600; line-height: 1.05;
  color: #fff; margin-bottom: 10px;
}
.hero-title em { color: #d4af37; font-style: italic; }
.hero-sub { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 20px; line-height: 1.6; max-width: 220px; }
.hero-visual {
  position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
  font-size: 110px; opacity: 0.08;
}

/* ─── Buttons ─── */
.btn-primary {
  background: #d4af37; color: #0f0f1a; border: none;
  padding: 12px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary.wide { flex: 1; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: transparent; color: #1a1a2e;
  border: 1.5px solid #d4af37; border-radius: 12px;
  padding: 11px 24px; font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ─── Categories ─── */
.categories-row {
  display: flex; gap: 8px; padding: 14px 16px 2px;
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.categories-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; padding: 7px 16px;
  border-radius: 20px; border: 1.5px solid #e0d9cc;
  background: #fff; font-size: 13px; color: #888; white-space: nowrap;
}
.cat-pill.active { background: #1a1a2e; color: #d4af37; border-color: #1a1a2e; }

/* ─── Section ─── */
.section { padding: 20px 0 4px; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 12px; }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600; color: #1a1a2e;
}
.see-all { font-size: 13px; color: #d4af37; background: none; border: none; }

/* ─── Product Grid ─── */
.products-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 4px 16px 12px;
}
.products-grid.padded { padding-top: 14px; padding-bottom: 80px; }

/* ─── Product Card ─── */
.product-card {
  background: #fff; border-radius: 16px;
  overflow: hidden; cursor: pointer;
  border: 1px solid #f0ece4;
  transition: transform 0.15s;
}
.product-card:active { transform: scale(0.97); }
.card-img {
  height: 150px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-photo {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.product-card:active .card-photo { transform: scale(1.03); }
.card-emoji-fallback { font-size: 54px; display: none; }
.card-heart {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: #bbb;
}
.sale-tag {
  position: absolute; top: 8px; left: 8px;
  background: #e74c3c; color: #fff; font-size: 10px; font-weight: 500;
  padding: 3px 8px; border-radius: 20px;
}
.card-body { padding: 10px 12px 12px; }
.card-cat { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: #aaa; margin-bottom: 3px; }
.card-name { font-size: 13px; font-weight: 500; color: #1a1a2e; margin-bottom: 8px; line-height: 1.3; min-height: 32px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-prices { display: flex; flex-direction: column; }
.card-price { font-size: 14px; font-weight: 500; color: #1a1a2e; }
.card-old { font-size: 11px; color: #bbb; text-decoration: line-through; }
.add-cart-btn {
  background: #1a1a2e; color: #d4af37; border: none;
  width: 28px; height: 28px; border-radius: 8px;
  font-size: 20px; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ─── Promo Banner ─── */
.promo-banner {
  margin: 12px 16px;
  background: linear-gradient(135deg, #1a1a2e, #2a2a4e);
  border-radius: 14px; padding: 16px 20px;
}
.promo-code { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #d4af37; margin-bottom: 4px; }
.promo-code strong { font-size: 16px; letter-spacing: 3px; }
.promo-desc { font-size: 13px; color: rgba(255,255,255,0.7); }

/* ─── Features Row ─── */
.features-row {
  display: flex; justify-content: space-around;
  padding: 20px 16px 24px;
  background: #fff; margin: 8px 0;
}
.feature { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.feature-icon { font-size: 24px; }
.feature-label { font-size: 11px; color: #888; text-align: center; }

/* ─── Search ─── */
.search-box-wrap {
  position: relative; padding: 12px 16px;
  background: #fff; border-bottom: 1px solid #f0ece4;
}
.search-icon { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); color: #bbb; }
.search-input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1.5px solid #e8e3db; border-radius: 12px;
  font-size: 14px; color: #1a1a2e; background: #f8f6f2;
  outline: none;
}
.search-input:focus { border-color: #d4af37; }

/* ─── Product Detail ─── */
.detail-img-area {
  height: 260px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.detail-emoji { font-size: 100px; }
.detail-photo { width: 100%; height: 100%; object-fit: cover; }
.detail-body { background: #fff; border-radius: 24px 24px 0 0; margin-top: -20px; padding: 24px 20px 100px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.detail-cat { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #d4af37; margin-bottom: 4px; }
.detail-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 600; color: #1a1a2e;
}
.heart-btn { background: #f8f6f2; border: none; border-radius: 12px; padding: 10px; color: #ccc; }
.detail-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.detail-price { font-size: 24px; font-weight: 500; color: #1a1a2e; }
.detail-old-price { font-size: 14px; color: #bbb; text-decoration: line-through; }
.detail-notes h3 { font-size: 13px; font-weight: 500; color: #888; margin-bottom: 10px; }
.notes-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.note-chip {
  background: #f8f6f2; border: 1px solid #e8e3db;
  border-radius: 20px; padding: 5px 12px; font-size: 12px; color: #555;
}
.detail-desc { font-size: 14px; line-height: 1.7; color: #666; margin-bottom: 20px; }
.detail-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; background: #f8f6f2; border-radius: 14px; padding: 14px; margin-bottom: 24px;
}
.meta-item { text-align: center; }
.meta-label { font-size: 10px; color: #aaa; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 3px; }
.meta-val { font-size: 12px; font-weight: 500; color: #1a1a2e; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-ctrl { display: flex; align-items: center; gap: 10px; background: #f8f6f2; border-radius: 12px; padding: 8px 12px; }
.qty-btn {
  background: #fff; border: 1px solid #e8e3db; border-radius: 8px;
  width: 30px; height: 30px; font-size: 18px; display: flex; align-items: center; justify-content: center;
  color: #1a1a2e;
}
.qty-btn.sm { width: 26px; height: 26px; font-size: 16px; }
.qty-val { font-size: 15px; font-weight: 500; color: #1a1a2e; min-width: 20px; text-align: center; }

/* ─── Cart ─── */
.cart-item {
  display: flex; gap: 12px; align-items: center;
  background: #fff; padding: 14px 16px;
  border-bottom: 1px solid #f0ece4;
}
.cart-thumb {
  width: 58px; height: 58px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0;
}
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 14px; font-weight: 500; color: #1a1a2e; margin-bottom: 2px; }
.cart-unit { font-size: 12px; color: #aaa; margin-bottom: 8px; }
.cart-qty-row { display: flex; align-items: center; gap: 8px; }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-total { font-size: 14px; font-weight: 500; color: #1a1a2e; }
.remove-btn { background: none; border: none; color: #ccc; font-size: 16px; }
.cart-summary {
  background: #fff; margin: 12px 16px 0;
  border-radius: 14px; padding: 16px;
  border: 1px solid #f0ece4;
}
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: #888; margin-bottom: 10px; }
.free-ship-hint { font-size: 11px; color: #d4af37; margin-bottom: 8px; }
.summary-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 500; color: #1a1a2e; border-top: 1px solid #f0ece4; padding-top: 12px; margin-top: 4px; }
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #25d366; color: #fff; border: none;
  width: calc(100% - 32px); margin: 12px 16px 0;
  border-radius: 14px; padding: 15px;
  font-size: 15px; font-weight: 500;
}
.track-btn {
  display: flex; align-items: center; justify-content: center;
  background: #f8f6f2; color: #1a1a2e; border: 1.5px solid #e8e3db;
  width: calc(100% - 32px); margin: 10px 16px 80px;
  border-radius: 14px; padding: 13px;
  font-size: 14px; font-weight: 500;
}

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 60px 24px 80px; }
.empty-icon { font-size: 52px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 15px; color: #888; margin-bottom: 20px; }

/* ─── Wishlist ─── */
#wish-empty { padding-bottom: 80px; }

/* ─── Profile / Login ─── */
.login-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 50px 24px 80px;
}
.login-logo {
  width: 70px; height: 70px; background: #0f0f1a;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 600; color: #d4af37;
  margin-bottom: 16px;
}
.login-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 600; color: #1a1a2e; margin-bottom: 6px;
}
.login-sub { font-size: 13px; color: #999; text-align: center; margin-bottom: 28px; line-height: 1.6; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.form-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid #e8e3db; border-radius: 12px;
  font-size: 14px; color: #1a1a2e; background: #f8f6f2; outline: none;
}
.form-input:focus { border-color: #d4af37; }
.or-line { display: flex; align-items: center; gap: 12px; color: #ccc; font-size: 12px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: #e8e3db; }
.profile-hero { background: #0f0f1a; padding: 32px 24px 28px; text-align: center; }
.avatar {
  width: 64px; height: 64px; background: #d4af37; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500; color: #0f0f1a; margin: 0 auto 12px;
}
.profile-name { font-size: 18px; font-weight: 500; color: #fff; margin-bottom: 4px; }
.profile-email { font-size: 13px; color: rgba(255,255,255,0.5); }
.menu-list { background: #fff; border-top: 1px solid #f0ece4; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid #f8f6f2;
  font-size: 14px; color: #1a1a2e; cursor: pointer;
}
.menu-icon { font-size: 18px; width: 24px; text-align: center; }
.menu-item span:nth-child(2) { flex: 1; }
.menu-arr { color: #ccc; font-size: 18px; }
.store-info { text-align: center; padding: 20px 16px 80px; font-size: 12px; color: #aaa; line-height: 1.8; }

/* ─── Order Tracking ─── */
.tracking-wrap { padding: 16px 20px 80px; }
.order-id-box { background: #0f0f1a; border-radius: 14px; padding: 16px 20px; margin-bottom: 24px; }
.order-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.order-id { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: #d4af37; font-weight: 600; }
.tracking-steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.track-step { display: flex; align-items: flex-start; gap: 16px; }
.track-dot {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #e8e3db; font-size: 14px; color: #aaa;
  z-index: 1;
}
.track-step.done .track-dot { background: #d4af37; color: #0f0f1a; font-size: 14px; }
.track-step.active .track-dot { background: #1a1a2e; font-size: 16px; }
.track-dot.pulse { animation: pulse 1.5s infinite; }
.track-line {
  position: absolute; left: 36px; width: 2px; height: 36px; background: #e8e3db; margin-top: 36px; margin-left: -2px;
}
.track-step { position: relative; padding-bottom: 20px; }
.track-step:last-child { padding-bottom: 0; }
.track-step::after {
  content: ''; position: absolute; left: 17px; top: 36px;
  width: 2px; height: calc(100% - 36px); background: #e8e3db;
}
.track-step.done::after { background: #d4af37; }
.track-step:last-child::after { display: none; }
.track-info { padding-top: 6px; }
.track-title { font-size: 14px; font-weight: 500; color: #1a1a2e; margin-bottom: 2px; }
.track-step:not(.done):not(.active) .track-title { color: #bbb; }
.track-time { font-size: 12px; color: #aaa; }
.track-step.active .track-time { color: #d4af37; }
.delivery-card {
  background: #f8f6f2; border-radius: 14px; padding: 16px; margin-bottom: 16px;
  border: 1px solid #e8e3db;
}
.delivery-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #aaa; margin-bottom: 4px; }
.delivery-addr { font-size: 14px; font-weight: 500; color: #1a1a2e; margin-bottom: 4px; }
.delivery-eta { font-size: 13px; color: #d4af37; }
.wa-track-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #25d366; color: #fff; border: none;
  width: 100%; border-radius: 14px; padding: 15px;
  font-size: 15px; font-weight: 500;
}

/* ─── Bottom Nav ─── */
.bottomnav {
  display: flex; background: #fff;
  border-top: 1px solid #f0ece4;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  flex-shrink: 0; z-index: 50;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: #ccc; font-size: 11px; padding: 4px 0;
}
.nav-btn.active { color: #1a1a2e; }
.nav-btn.active svg { stroke: #d4af37; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #1a1a2e; color: #d4af37;
  padding: 10px 22px; border-radius: 24px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: opacity 0.25s;
  pointer-events: none; white-space: nowrap; z-index: 9999;
  max-width: 90%;
}
.toast.show { opacity: 1; }

/* ─── Animations ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
