/* ============================================================
   RONSTAN & RYAN — App Stylesheet
   ============================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: #1a1a18; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; color: #1a1a18; font-size: 16px; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
input { font-family: inherit; }

/* ── App shell ── */
.app {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  height: 100vh;
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Screens ── */
.screen { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.screen.active { display: flex; }
.screen-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bottom-spacer { height: 80px; }

/* ── Top bar ── */
.top-bar { background: #1a1a18; flex-shrink: 0; }
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.logo { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: #c9b99a; font-weight: 500; }
.top-icons { display: flex; gap: 4px; align-items: center; }
.icon-btn { color: #c9b99a; padding: 6px; display: flex; align-items: center; justify-content: center; border-radius: 6px; position: relative; }
.icon-btn:active { opacity: 0.7; }

/* ── Sale banner ── */
.sale-banner { background: #c9b99a; color: #1a1a18; text-align: center; font-size: 11px; letter-spacing: 0.12em; padding: 7px 16px; font-weight: 500; }
.sale-banner.hidden { display: none; }

/* ── Search bar ── */
.search-bar { display: flex; align-items: center; gap: 8px; background: #2e2e2c; margin: 0 12px 10px; border-radius: 8px; padding: 9px 12px; }
.search-bar svg { color: #7a7a78; flex-shrink: 0; }
.search-bar input { flex: 1; background: none; border: none; outline: none; color: #fff; font-size: 13px; }
.search-bar input::placeholder { color: #6a6a68; }
.search-clear { color: #7a7a78; font-size: 14px; padding: 2px 4px; }
.search-clear.hidden { display: none; }

/* ── Category pills ── */
.cats { display: flex; gap: 8px; padding: 0 12px 12px; overflow-x: auto; flex-shrink: 0; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat-pill { background: #2e2e2c; color: #9a9690; font-size: 11px; letter-spacing: 0.08em; padding: 7px 14px; border-radius: 20px; white-space: nowrap; cursor: pointer; transition: all 0.18s; flex-shrink: 0; border: 1px solid transparent; }
.cat-pill.active, .cat-pill:active { background: #c9b99a; color: #1a1a18; }

/* ── Hero ── */
.hero { background: linear-gradient(160deg, #2a1f14 0%, #3d2d1c 40%, #1e1e1c 100%); padding: 32px 20px 28px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid rgba(201,185,154,0.12); }
.hero::after { content: ''; position: absolute; top: -10px; right: -10px; width: 100px; height: 100px; border-radius: 50%; border: 1px solid rgba(201,185,154,0.06); }
.hero-eyebrow { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: #c9b99a; margin-bottom: 10px; }
.hero-title { font-size: 26px; font-weight: 400; color: #fff; line-height: 1.18; margin-bottom: 8px; font-family: Georgia, 'Times New Roman', serif; }
.hero-sub { font-size: 12px; color: #8a8a88; letter-spacing: 0.05em; margin-bottom: 20px; }
.hero-cta { background: #c9b99a; color: #1a1a18; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding: 11px 22px; border-radius: 2px; font-weight: 500; transition: opacity 0.18s; display: inline-block; }
.hero-cta:active { opacity: 0.85; }

/* ── Section headers ── */
.section-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px; }
.section-title { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #1a1a18; font-weight: 500; }
.section-link { font-size: 12px; color: #9a9690; text-decoration: underline; text-underline-offset: 3px; }

/* ── Product grid ── */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px 8px; }
.product-card { cursor: pointer; }
.product-card:active { opacity: 0.85; }
.product-img { width: 100%; aspect-ratio: 3/4; background: #f0ede8; border-radius: 6px; overflow: hidden; position: relative; margin-bottom: 7px; }
.product-img img { transition: transform 0.3s; }
.product-card:active .product-img img { transform: scale(1.03); }
.product-img-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 36px; }
.product-badge { position: absolute; top: 8px; left: 8px; background: #c9b99a; color: #1a1a18; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; font-weight: 500; }
.product-badge.sale { background: #d85a30; color: #fff; }
.product-wishlist { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.92); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #9a9690; border: none; transition: all 0.18s; }
.product-wishlist.active { color: #d85a30; }
.product-name { font-size: 12px; color: #1a1a18; line-height: 1.35; margin-bottom: 4px; }
.product-price { font-size: 12px; color: #7a7a78; }
.product-price s { font-size: 10px; margin-right: 3px; }
.product-price strong { color: #1a1a18; font-weight: 500; }

/* ── Skeleton loader ── */
.skeleton-card { background: #f0ede8; border-radius: 6px; aspect-ratio: 3/4; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 0%,100% { opacity:1; } 50% { opacity:0.5; } }

/* ── Appointment strip ── */
.appt-strip { display: flex; align-items: center; gap: 14px; background: #f5f3ef; padding: 18px 14px; margin: 8px 12px 0; border-radius: 8px; cursor: pointer; }
.appt-strip:active { opacity: 0.85; }
.appt-strip-icon { font-size: 28px; flex-shrink: 0; }
.appt-eyebrow { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: #9a9690; margin-bottom: 4px; }
.appt-title { font-size: 14px; color: #1a1a18; font-family: Georgia, serif; margin-bottom: 2px; }
.appt-sub { font-size: 11px; color: #7a7a78; }
.appt-arrow { color: #9a9690; margin-left: auto; flex-shrink: 0; }

/* ── Bottom nav ── */
.bottom-nav { background: #1a1a18; display: flex; padding: 8px 0 env(safe-area-inset-bottom, 8px); border-top: 1px solid #2a2a28; flex-shrink: 0; position: relative; z-index: 10; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: #6a6a68; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.18s; position: relative; }
.nav-item.active, .nav-item:active { color: #c9b99a; }
.nav-item svg { transition: color 0.18s; }

/* ── Cart badge ── */
.cart-badge { background: #d85a30; color: #fff; font-size: 9px; font-weight: 600; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cart-badge[style*="none"], .cart-badge:empty { display: none !important; }
.nav-cart-badge { position: absolute; top: 2px; right: 18%; }

/* ── Product detail ── */
.pd-image-area { flex-shrink: 0; height: 55vw; max-height: 300px; background: #f0ede8; position: relative; overflow: hidden; }
.pd-image-area img { width: 100%; height: 100%; object-fit: cover; }
.pd-back { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,0.92); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; }
.pd-wishlist-btn { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.92); width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; font-size: 18px; color: #9a9690; }
.pd-wishlist-btn.active { color: #d85a30; }
.pd-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.pd-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.4); transition: all 0.2s; }
.pd-dot.active { background: #1a1a18; width: 14px; border-radius: 3px; }
.pd-info { padding: 16px; overflow-y: auto; flex: 1; }
.pd-eyebrow { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #c9b99a; margin-bottom: 5px; }
.pd-name { font-size: 20px; font-family: Georgia, serif; color: #1a1a18; line-height: 1.2; margin-bottom: 10px; }
.pd-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pd-price { font-size: 18px; font-weight: 500; color: #1a1a18; }
.pd-orig { font-size: 13px; color: #9a9690; text-decoration: line-through; }
.pd-discount-badge { background: #d85a30; color: #fff; font-size: 10px; padding: 3px 8px; border-radius: 2px; }
.pd-var-note { font-size: 12px; color: #7a7a78; background: #f5f3ef; padding: 10px 12px; border-radius: 6px; margin-bottom: 14px; line-height: 1.5; }
.pd-add-btn { background: #1a1a18; color: #c9b99a; width: 100%; padding: 14px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; border-radius: 2px; font-weight: 500; margin-bottom: 10px; transition: opacity 0.18s; }
.pd-add-btn:active { opacity: 0.85; }
.pd-add-btn:disabled { background: #ccc; color: #888; cursor: not-allowed; }
.pd-site-btn { background: transparent; color: #5a5752; width: 100%; padding: 12px; font-size: 11px; letter-spacing: 0.12em; border: 1px solid #e0ddd6; border-radius: 2px; text-transform: uppercase; margin-bottom: 14px; }
.pd-desc { font-size: 13px; color: #7a7a78; line-height: 1.65; padding-top: 14px; border-top: 1px solid #f0ede8; }

/* ── Cart ── */
.cart-item { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid #f5f3ef; align-items: flex-start; }
.cart-item-img { width: 68px; height: 84px; background: #f0ede8; border-radius: 4px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; color: #1a1a18; line-height: 1.3; margin-bottom: 4px; }
.cart-item-price { font-size: 12px; color: #7a7a78; margin-bottom: 8px; }
.cart-item-total { font-size: 14px; font-weight: 500; color: #1a1a18; flex-shrink: 0; }
.cart-qty-row { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 28px; height: 28px; border: 1px solid #e0ddd6; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #5a5752; }
.qty-btn:active { background: #f0ede8; }
.qty-val { font-size: 13px; font-weight: 500; min-width: 20px; text-align: center; }
.remove-btn { font-size: 11px; color: #9a9690; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.cart-footer { background: #fff; padding: 14px 14px env(safe-area-inset-bottom, 14px); border-top: 1px solid #e8e5df; flex-shrink: 0; }
.free-ship { background: #eaf3de; color: #3b6d11; font-size: 11px; text-align: center; padding: 8px; border-radius: 4px; margin-bottom: 10px; }
.free-ship.hidden { display: none; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: #5a5752; margin-bottom: 7px; }
.total-row { font-size: 15px; font-weight: 500; color: #1a1a18; border-top: 1px solid #e8e5df; padding-top: 10px; margin-top: 4px; }
.checkout-btn { background: #c9b99a; color: #1a1a18; width: 100%; padding: 14px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; border-radius: 2px; font-weight: 500; margin-top: 12px; }
.checkout-btn:active { opacity: 0.85; }
.continue-btn { background: transparent; color: #9a9690; width: 100%; padding: 10px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; margin-top: 6px; }

/* ── Empty states ── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 30px; text-align: center; }
.empty-state.hidden { display: none; }
.empty-icon { font-size: 40px; margin-bottom: 14px; }
.empty-title { font-size: 16px; color: #1a1a18; margin-bottom: 6px; font-family: Georgia, serif; }
.empty-sub { font-size: 13px; color: #9a9690; line-height: 1.5; }

/* ── Load more ── */
.load-more { text-align: center; padding: 16px; }
.load-more.hidden { display: none; }
.load-more button { background: #1a1a18; color: #c9b99a; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding: 11px 28px; border-radius: 2px; font-family: inherit; }

/* ── Account ── */
.profile-header { background: #1a1a18; padding: 24px 16px 22px; text-align: center; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: #c9b99a; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 500; color: #1a1a18; margin: 0 auto 10px; letter-spacing: 0.05em; }
.profile-name { font-size: 18px; color: #fff; font-family: Georgia, serif; margin-bottom: 3px; }
.profile-email { font-size: 12px; color: #7a7a78; margin-bottom: 14px; }
.profile-login-btn { background: #c9b99a; color: #1a1a18; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; padding: 10px 22px; border-radius: 2px; font-weight: 500; font-family: inherit; }
.profile-section-label { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #9a9690; padding: 16px 14px 6px; }
.profile-row { display: flex; align-items: center; padding: 14px; gap: 12px; border-bottom: 1px solid #f5f3ef; cursor: pointer; }
.profile-row:active { background: #f9f8f6; }
.profile-row-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.profile-row-text { flex: 1; font-size: 13px; color: #1a1a18; }
.profile-row-sub { font-size: 11px; color: #9a9690; margin-top: 2px; }
.profile-row svg { color: #c8c5be; flex-shrink: 0; }
.app-version { text-align: center; font-size: 11px; color: #c8c5be; padding: 20px 0 10px; }

/* ── Toast ── */
.toast { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); background: #1a1a18; color: #c9b99a; font-size: 12px; letter-spacing: 0.08em; padding: 10px 20px; border-radius: 20px; white-space: nowrap; z-index: 100; transition: opacity 0.3s; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.toast.hidden { opacity: 0; pointer-events: none; }

/* ── Install banner ── */
.install-banner { display: flex; align-items: center; gap: 10px; background: #1a1a18; border-bottom: 1px solid #c9b99a; padding: 10px 14px; position: sticky; top: 0; z-index: 50; }
.install-banner.hidden { display: none; }
.install-banner-text { flex: 1; }
.install-banner-text strong { display: block; font-size: 13px; color: #c9b99a; }
.install-banner-text span { font-size: 11px; color: #7a7a78; }
.install-btn { background: #c9b99a; color: #1a1a18; font-size: 11px; font-weight: 500; letter-spacing: 0.1em; padding: 7px 14px; border-radius: 2px; text-transform: uppercase; font-family: inherit; flex-shrink: 0; }
.install-dismiss { color: #7a7a78; font-size: 16px; padding: 4px 6px; flex-shrink: 0; }

/* ── Hidden utility ── */
.hidden { display: none !important; }

/* ── Responsive: larger phones ── */
@media (min-width: 400px) {
  .hero-title { font-size: 28px; }
  .pd-image-area { max-height: 340px; }
}

/* ── Safe area / notch support ── */
@supports (padding: env(safe-area-inset-top)) {
  .top-bar-inner { padding-top: max(14px, calc(env(safe-area-inset-top) + 6px)); }
}
