/* PRO PHONE — Customer app shell */

body.customer { padding-bottom: 82px; background: var(--bg); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(160deg, var(--primary) 0%, var(--accent) 130%);
  color: #fff;
  padding: 16px 20px 20px;
  border-radius: 0 0 20px 20px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-mark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark .logo-box {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background .12s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.22); }
.icon-btn .count {
  position: absolute; top: -3px; right: -3px;
  background: #fff; color: var(--primary-dark);
  font-size: 10px; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.location-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; opacity: .85; margin: 12px 0 14px; font-weight: 500;
}
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: var(--r-pill);
  padding: 12px 16px; color: var(--muted-soft);
  font-size: 13.5px;
  box-shadow: 0 6px 18px rgba(11,18,32,.10);
}
.search-bar input { border: none; outline: none; flex: 1; font-size: 13.5px; background: transparent; color: var(--ink); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(15,23,42,.04);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  color: var(--muted-soft);
  padding: 7px 0;
  border-radius: var(--r-md);
  transition: color .12s ease, background .12s ease;
}
.bottom-nav a.active { color: var(--primary); background: var(--primary-soft); }
.bottom-nav a svg { width: 21px; height: 21px; }

/* Desktop top navigation (hidden on mobile) */
.desktop-nav { display: none; }
@media (min-width: 900px) {
  body.customer { padding-bottom: 48px; }
  .bottom-nav { display: none; }
  .topbar { border-radius: 0; padding: 16px 0; }
  .topbar .container { display: flex; align-items: center; gap: 32px; }
  .topbar-row { flex: 1; }
  .location-row, .search-bar { margin: 0; }
  .desktop-nav { display: flex; gap: 24px; font-weight: 700; font-size: 13.5px; }
  .desktop-nav a.active { text-decoration: underline; text-underline-offset: 6px; }
  .mobile-only { display: none; }
}

/* ---------- Hero ---------- */
.hero-banner {
  margin: 0 0 var(--sp-6);
  border-radius: var(--r-lg);
  background: radial-gradient(130% 150% at 100% 0%, #4A6BFF 0%, #2F5CFF 42%, #16224D 100%);
  color: #fff;
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-banner::after {
  content: '';
  position: absolute; right: -50px; bottom: -70px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.hero-banner h1 { font-size: 23px; margin: 0 0 6px; font-weight: 800; line-height: 1.28; max-width: 260px; letter-spacing: -0.02em; }
.hero-banner p { margin: 0 0 20px; opacity: .82; font-size: 13px; }
.hero-cta { display: flex; gap: 10px; position: relative; z-index: 1; }

/* ---------- Category grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4) var(--sp-3);
}
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cat-icon {
  width: 52px; height: 52px; border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cat-item:hover .cat-icon { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cat-item span { font-size: 11px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }

/* ---------- Brand row ---------- */
.brand-pill {
  min-width: 64px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.brand-pill .circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--primary);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.brand-pill .circle img {
  width: 42%; height: 42%; object-fit: contain;
  display: block; margin: 0 auto;
  filter: grayscale(100%);
}
.brand-pill .circle-fallback {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.brand-pill span { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ---------- Product card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border-soft); }
.product-card .thumb {
  aspect-ratio: 1/1;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .wish-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  box-shadow: var(--shadow-xs);
}
.product-card .discount-flag {
  position: absolute; top: 8px; left: 8px;
}
.product-card .body { padding: 13px; }
.product-card h3 { font-size: 13px; margin: 0 0 5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; }
.product-card .meta { font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.product-card .price-row { display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; }
.product-card .price { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }
.product-card .old-price { font-size: 11.5px; color: var(--muted-soft); text-decoration: line-through; }
.product-card .foot-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Horizontal card variant used in "Deals of the day" wide rows */
.hscroll .product-card { min-width: 164px; max-width: 164px; }

/* ---------- Product detail ---------- */
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs .thumb-sm {
  width: 54px; height: 54px; border-radius: var(--r-sm);
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .12s ease;
}
.gallery-thumbs .thumb-sm.active { border-color: var(--primary); }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: #fff; border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
  box-shadow: 0 -8px 24px rgba(15,23,42,.05);
}
@media (min-width: 900px) { .sticky-cta { display: none; } }
.desktop-cta { display: none; margin-top: var(--sp-4); }
@media (min-width: 900px) { .desktop-cta { display: flex; } }
/* The cart's own submit button should stay visible (not hidden) on desktop — just un-stick it */
@media (min-width: 900px) {
  .sticky-cta.cart-submit-row { display: flex; position: static; border: none; padding: 0; margin-top: var(--sp-5); box-shadow: none; background: none; }
}
.spec-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.spec-row span { color: var(--muted); }
.spec-row:last-child { border-bottom: none; }

/* ---------- Estimate card ---------- */
.estimate-card {
  background: linear-gradient(165deg, var(--primary-soft), #fff 65%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  text-align: center;
}
.estimate-card .amount { font-size: 28px; font-weight: 800; color: var(--primary-dark); margin: 8px 0 4px; letter-spacing: -0.02em; }
.included-list { text-align: left; margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.included-list .item { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink); }
.included-list .item svg { color: var(--success); flex-shrink: 0; margin-top: 1px; }
.note-box {
  background: var(--warning-soft); color: #92400E;
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 12px; margin-top: 18px; display: flex; gap: 8px; text-align: left;
}

/* ---------- Order card ---------- */
.order-card { padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.order-card .thumb { width: 50px; height: 50px; border-radius: var(--r-sm); background: var(--bg); flex-shrink: 0; overflow: hidden; }
.order-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-card .info { flex: 1; min-width: 0; }
.order-card .info h4 { margin: 0 0 3px; font-size: 13px; font-weight: 700; }
.order-card .info .sub { font-size: 11.5px; color: var(--muted); }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: var(--sp-4); }
.tabs button {
  border: 1px solid var(--border); background: #fff;
  padding: 9px 16px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 12.5px; color: var(--muted); white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Account ---------- */
.account-header { display: flex; align-items: center; gap: 14px; padding: 8px 0 var(--sp-5); }
.account-header .avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; overflow: hidden;
}
.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid var(--border-soft);
  font-weight: 600; font-size: 14px; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; color: var(--ink);
  transition: background .1s ease;
}
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
.menu-list a:last-child, .menu-list button:last-child { border-bottom: none; }
.menu-list .ic { color: var(--primary); width: 20px; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 400px; margin: 0 auto; padding: 44px 20px 60px; }
.auth-logo { text-align: center; margin-bottom: var(--sp-6); }
.auth-logo .logo-box {
  width: 56px; height: 56px; border-radius: 17px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: var(--shadow-lift);
}
.auth-tabs { display: flex; background: var(--bg); border-radius: var(--r-pill); padding: 4px; margin-bottom: var(--sp-5); }
.auth-tabs button { flex: 1; border: none; background: none; padding: 10px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--muted); transition: background .12s ease, color .12s ease; }
.auth-tabs button.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-xs); }
