/* ============ RESET & TOKENS ============ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --ink: #222222;
  --ink-soft: #767676;
  --ink-light: #999999;
  --accent: #E64545;
  --accent-dark: #C73030;
  --flash-orange: #FA6338;
  --flash-gradient: linear-gradient(135deg, #FF6B35, #FF3E3E);
  --success: #1A8917;
  --line: #E8E8E8;
  --line-light: #F0F0F0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 90px;
  --bottom-nav-h: 56px;
  --announce-h: 32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  /* padding-bottom moved to footer */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ ANNOUNCEMENT BAR ============ */
.announcement-bar {
  background: #FFF8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.announcement-bar svg {
  width: 16px;
  height: 16px;
  fill: var(--success);
  flex-shrink: 0;
}
.announcement-bold { font-weight: 700; color: var(--ink); }
.announcement-light { color: var(--ink-soft); }
  .announcement-text { text-align: center; line-height: 1.4; }
  main.page { flex: 1; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  transition: background 0.2s;
}
.header-icon-btn:hover { background: var(--line-light); }
.header-icon-btn svg { width: 22px; height: 22px; fill: var(--ink); }

.brand-logo {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
}

.cart-badge, .cart-badge-mobile {
  position: absolute;
  top: 2px;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

.cart-badge.is-empty {
  display: none;
}

.header-login-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  margin-left: 4px;
}

/* ============ NAV TABS ============ */
.nav-tabs {
  overflow: hidden;
}
.nav-tabs-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 12px;
}
.nav-tabs-scroll::-webkit-scrollbar { display: none; }

.nav-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-tab.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}
.nav-tab:hover { color: var(--ink); }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.search-overlay.is-open {
  transform: translateX(0);
}

.search-overlay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--line-light);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}
.search-input-icon { width: 18px; height: 18px; fill: var(--ink-soft); flex-shrink: 0; }
.search-input-wrapper input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.9rem;
  color: var(--ink);
  font-family: var(--font);
}
.search-input-wrapper input::placeholder { color: var(--ink-light); }
.search-clear-btn {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: none;
}
.search-clear-btn.visible { display: grid; place-items: center; }
.search-clear-btn svg { width: 18px; height: 18px; fill: var(--ink-soft); }

.search-suggestions { padding: 20px 16px; }
.search-suggestions h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
}
.suggestion-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestion-tag {
  padding: 8px 16px;
  background: var(--line-light);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
}
.suggestion-tag:hover { background: var(--line); color: var(--ink); }

.search-product-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 8px 100px;
}
.search-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.search-no-results svg { width: 64px; height: 64px; fill: var(--line); margin: 0 auto 16px; }
.search-no-results p { font-size: 0.9rem; }
.search-result-count {
  grid-column: 1 / -1;
  padding: 8px 8px 4px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ============ SIDE MENU ============ */
.side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.side-menu-overlay.is-open { opacity: 1; visibility: visible; }

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--surface);
  z-index: 301;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.side-menu.is-open { transform: translateX(0); }

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
}
.side-menu-user { display: flex; align-items: center; gap: 12px; }
.side-menu-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
}
.side-menu-avatar svg { width: 24px; height: 24px; fill: #fff; }
.side-menu-greeting { font-size: 0.8rem; opacity: 0.7; margin-bottom: 2px; }
.side-menu-signin { font-size: 0.9rem; font-weight: 600; }
.side-menu-header .header-icon-btn svg { fill: #fff; }

.side-menu-links { padding: 8px 0; }
.side-menu-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.2s;
}
.side-menu-links li a:hover { background: var(--line-light); }

/* ============ HERO BANNER ============ */
.hero-banner {
  position: relative;
  overflow: hidden;
  margin: 0;
}
.hero-slide {
  display: none;
  position: relative;
}
.hero-slide.is-active { display: block; }

.hero-slide-inner {
  display: flex;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}
.hero-slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.7);
}
.hero-slide-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  padding: 24px 16px;
  align-items: flex-end;
}
.hero-text {
  flex: 1;
}
.hero-label {
  display: inline-block;
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  font-style: italic;
}
.hero-hashtag {
  display: inline-block;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}
.hero-featured {
  display: flex;
  gap: 10px;
}
.hero-featured-card {
  width: 120px;
  height: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
  transform: rotate(3deg);
  transition: transform 0.3s;
  position: relative;
}
.hero-featured-card:first-child { transform: rotate(-2deg); }
.hero-featured-card:hover { transform: rotate(0) scale(1.05); }
.hero-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-featured-price {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(230, 69, 69, 0.9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.hero-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 10px;
  background: var(--surface);
}
.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.is-active {
  width: 20px;
  border-radius: var(--radius-pill);
  background: var(--ink);
}

/* ============ CATEGORY CIRCLES ============ */
.category-circles {
  background: var(--surface);
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--line);
}
.category-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 12px 8px;
  scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-circle {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 76px;
  cursor: pointer;
  padding: 4px;
}
.cat-circle-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #F5F5F5;
  border: 2px solid transparent;
  transition: all 0.3s;
  position: relative;
}
.cat-circle.is-active .cat-circle-img,
.cat-circle:hover .cat-circle-img {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}
.cat-circle-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-circle-label {
  font-size: 0.7rem;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-circle.is-active .cat-circle-label {
  color: var(--ink);
  font-weight: 600;
}

/* ============ FLASH SALE ============ */
.flash-sale-section {
  background: var(--surface);
  margin-top: 8px;
  padding-bottom: 12px;
}
.flash-sale-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}
.flash-sale-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.flash-sale-title svg { width: 20px; height: 20px; fill: var(--flash-orange); }
.flash-sale-timer {
  display: flex;
  align-items: center;
  gap: 2px;
}
.timer-block {
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  min-width: 24px;
  text-align: center;
}
.timer-sep { font-weight: 700; font-size: 0.75rem; color: var(--ink); }
.flash-sale-more {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.flash-sale-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 4px;
  scrollbar-width: none;
}
.flash-sale-scroll::-webkit-scrollbar { display: none; }

.flash-card {
  flex: 0 0 120px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s;
}
.flash-card:hover { transform: translateY(-2px); }
.flash-card-img {
  width: 120px;
  height: 120px;
  overflow: hidden;
  background: #F8F8F8;
}
.flash-card-img img { width: 100%; height: 100%; object-fit: cover; }
.flash-card-info { padding: 6px 8px; }
.flash-card-price {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
}
.flash-card-was {
  font-size: 0.68rem;
  color: var(--ink-light);
  text-decoration: line-through;
}
.flash-card-discount {
  display: inline-block;
  background: #FFF0F0;
  color: var(--accent);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  margin-top: 2px;
}

/* ============ PRODUCT SECTION ============ */
.product-section {
  background: var(--surface);
  margin-top: 8px;
  padding: 0 0 8px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.section-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.see-all-link {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ============ PRODUCT GRID ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 8px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-light);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  background: #F8F8F8;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-card-img img { transform: scale(1.03); }

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}
.product-badge.new-badge { background: var(--ink); }
.product-badge.hot-badge { background: var(--flash-orange); }

.product-wishlist {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: grid;
  place-items: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  z-index: 2;
}
.product-wishlist:hover { background: #fff; transform: scale(1.1); }
.product-wishlist svg { width: 16px; height: 16px; fill: var(--ink-soft); }
.product-wishlist.is-liked svg { fill: var(--accent); }

.product-card-info { padding: 8px 10px 12px; }

.product-card-name {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  font-weight: 400;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.stars { display: flex; gap: 1px; }
.stars svg { width: 10px; height: 10px; }
.stars svg.filled { fill: #FFB800; }
.stars svg.empty { fill: var(--line); }
.rating-count { font-size: 0.68rem; color: var(--ink-light); }

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.price-current {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}
.price-original {
  font-size: 0.72rem;
  color: var(--ink-light);
  text-decoration: line-through;
}
.price-discount {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  background: #FFF0F0;
  padding: 1px 4px;
  border-radius: 2px;
}

.product-card-sold {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sold-bar {
  flex: 1;
  height: 4px;
  background: #FFE0E0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.sold-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.6s ease;
}
.sold-text { font-size: 0.62rem; color: var(--accent); white-space: nowrap; }

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface);
  display: flex;
  border-top: 1px solid var(--line);
  padding: 4px 0 calc(env(safe-area-inset-bottom, 0px) + 4px);
  box-shadow: 0 -1px 8px rgba(0,0,0,0.05);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--ink-soft);
  font-size: 0.62rem;
  position: relative;
  transition: color 0.2s;
}
.bottom-nav-item svg { width: 22px; height: 22px; fill: var(--ink-soft); transition: fill 0.2s; }
.bottom-nav-item.is-active { color: var(--ink); }
.bottom-nav-item.is-active svg { fill: var(--ink); }

.cart-badge-mobile {
  position: absolute;
  top: 0;
  right: 50%;
  transform: translateX(14px);
  background: var(--accent);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  bottom: 72px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  border: 1px solid var(--line);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top svg { width: 20px; height: 20px; fill: var(--ink); }

/* ============ RESPONSIVE: TABLET ============ */
@media (min-width: 700px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 12px; }
  .search-product-results { grid-template-columns: repeat(3, 1fr); }
  .cat-circle { width: 90px; }
  .cat-circle-img { width: 72px; height: 72px; }
  .flash-card { flex: 0 0 140px; }
  .flash-card-img { width: 140px; height: 140px; }
  .hero-slide-inner { min-height: 260px; }
  .hero-featured-card { width: 140px; height: 190px; }
}

/* ============ RESPONSIVE: DESKTOP ============ */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }

  .site-header { top: var(--announce-h); }
  .header-top { padding: 10px 40px; }
  .nav-tabs-scroll { padding: 0 40px; }

  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 16px; }
  .search-product-results { grid-template-columns: repeat(4, 1fr); }

  .category-scroll { padding: 0 40px 8px; gap: 8px; }
  .cat-circle { width: 100px; }
  .cat-circle-img { width: 80px; height: 80px; }

  .flash-sale-header { padding: 12px 40px; }
  .flash-sale-scroll { padding: 0 40px 4px; }
  .flash-card { flex: 0 0 160px; }
  .flash-card-img { width: 160px; height: 160px; }

  .section-header { padding: 14px 40px 10px; }
  .product-section { padding: 0 24px 8px; }

  .hero-slide-inner { min-height: 340px; }
  .hero-slide-content { padding: 40px; }
  .hero-featured-card { width: 170px; height: 220px; }
  .hero-label { font-size: 2rem; }
}

@media (min-width: 1280px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
  .search-product-results { grid-template-columns: repeat(5, 1fr); }
  .hero-slide-inner { min-height: 380px; }

  .header-top { max-width: 1400px; margin: 0 auto; }
  .nav-tabs-scroll { max-width: 1400px; margin: 0 auto; }
  .category-scroll { max-width: 1400px; margin: 0 auto; }
  .section-header { max-width: 1400px; margin: 0 auto; }
  .product-grid { max-width: 1400px; margin: 0 auto; }
  .flash-sale-header { max-width: 1400px; margin: 0 auto; }
  .flash-sale-scroll { max-width: 1400px; margin: 0 auto; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: fadeInUp 0.4s ease both;
}

/* ============ EMPTY STATE ============ */
.empty-section {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft);
  grid-column: 1 / -1;
}
.empty-section svg { width: 48px; height: 48px; fill: var(--line); margin-bottom: 12px; }
.empty-section p { font-size: 0.85rem; }

/* ââ Footer mobile clearance (above bottom nav) ââ */
.site-footer { margin-bottom: calc(var(--bottom-nav-h) + 8px); }
@media (min-width: 700px) { .site-footer { margin-bottom: 0; } }

/* ==========================================================================
   AUTH & CHECKOUT PAGES  MODERN, RESPONSIVE & PREMIUM E-COMMERCE DESIGN
   ========================================================================== */

/* -- Auth Layout & Card -- */
.auth-page-wrapper {
  min-height: calc(100vh - var(--header-h) - 60px);
  background: linear-gradient(180deg, #F8F9FA 0%, #EDF2F7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 64px;
}

.auth-card-container {
  width: 100%;
  max-width: 480px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid #EAEAEA;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-header {
  padding: 32px 32px 20px;
  text-align: center;
  border-bottom: 1px solid #F0F0F0;
  background: #FAFAFA;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #FFF0EB;
  color: var(--flash-orange);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-badge-ok {
  background: #EBF8EE;
  color: #1B7A3A;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: left;
}

.auth-note svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-note-error {
  background: #FFF1F0;
  border: 1px solid #FFCCC7;
  color: #A8071A;
}

.auth-steps {
  list-style: none;
  margin: 0 0 22px;
  display: grid;
  gap: 10px;
}

.auth-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
}

.auth-steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.auth-body {
  padding: 28px 32px 32px;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: #999;
  pointer-events: none;
  transition: fill 0.2s;
}

.auth-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: #FAFAFA;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  transition: all 0.2s ease;
  outline: none;
}

.auth-input:focus {
  background: #FFFFFF;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
  fill: var(--ink);
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  padding: 6px;
  color: #888;
  border-radius: 6px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle-btn:hover { color: var(--ink); }
.password-toggle-btn svg { width: 18px; height: 18px; fill: currentColor; }

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin: 12px 0 20px;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink-soft);
  user-select: none;
}
.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
  border-radius: 4px;
}

.auth-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--accent); }

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  cursor: pointer;
}
.auth-submit-btn:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0 20px;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #EAEAEA;
}
.auth-divider span {
  position: relative;
  background: #FFFFFF;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
}
.oauth-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.oauth-btn svg { width: 18px; height: 18px; }

/* Demo helper pill box */
.demo-accounts-box {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 10px;
  padding: 14px;
  margin-top: 20px;
}
.demo-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.demo-chips {
  display: flex;
  gap: 8px;
}
.demo-chip-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  color: var(--ink);
  transition: all 0.15s ease;
  text-align: center;
}
.demo-chip-btn:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.auth-footer-nav {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 24px;
}

/* Security Trust strip */
.auth-trust-strip {
  background: #FAFAFA;
  border-top: 1px solid #F0F0F0;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.75rem;
  color: #777;
}
.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.auth-trust-item svg { width: 14px; height: 14px; fill: var(--success); }

/* Password strength meter */
.pw-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #E2E8F0;
  margin-top: 6px;
  overflow: hidden;
  position: relative;
}
.pw-strength-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

/* -- CHECKOUT PAGE MODERN STYLING -- */
.checkout-page-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.checkout-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.checkout-page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EBF8EE;
  color: var(--success);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.checkout-security-badge svg { width: 14px; height: 14px; fill: currentColor; }

.checkout-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .checkout-grid-layout {
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    align-items: start;
  }
}

/* Left Column: Cards */
.checkout-step-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}

.checkout-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.checkout-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-col-1 { grid-column: span 1; }
.field-col-2 { grid-column: span 2; }

@media (max-width: 600px) {
  .field-col-1 { grid-column: span 2; }
}

.co-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.co-input, .co-select, .co-textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
  background: #FAFAFA;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.co-input:focus, .co-select:focus, .co-textarea:focus {
  background: #FFFFFF;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.08);
}

/* Shipping Options Radio Cards */
.delivery-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 600px) {
  .delivery-options-grid { grid-template-columns: 1fr; }
}

.delivery-radio-card {
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FAFAFA;
  transition: all 0.2s ease;
  position: relative;
}

.delivery-radio-card.active, .delivery-radio-card:hover {
  border-color: var(--ink);
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.delivery-radio-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--ink);
}

.delivery-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.delivery-card-desc {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.delivery-card-price {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--success);
  margin-top: 4px;
}

/* Payment Method Panels */
.payment-selector-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.payment-tab-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 10px;
  background: #FAFAFA;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.payment-tab-btn svg { width: 22px; height: 22px; fill: currentColor; }

.payment-tab-btn.active {
  background: #FFFFFF;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.payment-tab-btn.active.is-wa {
  border-color: #25D366;
  color: #128C7E;
}

.payment-panel {
  padding: 16px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  margin-top: 10px;
}

.wa-checkout-box {
  background: #E7F9EE;
  border: 1px solid #B8EECD;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wa-icon-large {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  flex-shrink: 0;
}
.wa-icon-large svg { width: 24px; height: 24px; fill: #FFFFFF; }

.btn-place-order-main {
  width: 100%;
  padding: 16px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.2s;
}
.btn-place-order-main:hover {
  background: #000;
  transform: translateY(-1px);
}
.btn-place-order-main.btn-wa-variant {
  background: #25D366;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}
.btn-place-order-main.btn-wa-variant:hover {
  background: #20BA5A;
}

/* Right Column: Sticky Order Summary */
.checkout-summary-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.summary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.summary-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.summary-items-list {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 16px;
}

.summary-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-light);
}

.summary-item-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #EAEAEA;
  background: #F9F9F9;
  flex-shrink: 0;
}

.summary-item-info {
  flex: 1;
  min-width: 0;
}

.summary-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-meta {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.summary-item-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

/* Free Shipping Meter */
.free-ship-meter-box {
  background: #FFF8F0;
  border: 1px solid #FFE4CC;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.free-ship-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.free-ship-bar-bg {
  height: 5px;
  background: #FFE4CC;
  border-radius: 999px;
  margin-top: 6px;
  overflow: hidden;
}
.free-ship-bar-fill {
  height: 100%;
  background: var(--flash-orange);
  border-radius: 999px;
  width: 100%;
}

/* Promo Box in checkout */
.checkout-promo-box {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.checkout-promo-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-family: inherit;
  outline: none;
}
.checkout-promo-input:focus { border-color: var(--ink); }
.checkout-promo-btn {
  padding: 9px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.checkout-promo-btn:hover { background: #000; }

.checkout-totals-list {
  margin-top: 14px;
}
.checkout-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.checkout-totals-row.is-discount {
  color: var(--success);
  font-weight: 600;
}
.checkout-totals-row.is-grand-total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  border-top: 1.5px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.checkout-trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-light);
  text-align: center;
}
.checkout-trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.checkout-trust-badge-item svg { width: 18px; height: 18px; fill: #666; }

/* -- SUCCESS ORDER CONFIRMATION PAGE -- */
.success-page-container {
  max-width: 680px;
  margin: 40px auto 80px;
  padding: 0 16px;
}

.success-hero-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  padding: 40px 32px;
  text-align: center;
}

.success-check-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #E7F9EE;
  color: var(--success);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}
.success-check-circle svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 3; }

.success-headline {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}

.success-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #F1F5F9;
  color: var(--ink);
  font-family: monospace;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  margin: 12px 0 20px;
}

/* Order tracker timeline */
.order-tracker-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0;
  position: relative;
}
.order-tracker-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: #E2E8F0;
  z-index: 1;
}
.tracker-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tracker-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #888;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.tracker-step.completed .tracker-dot {
  background: var(--success);
  color: #FFFFFF;
}
.tracker-step.active .tracker-dot {
  background: var(--ink);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(34,34,34,0.15);
}
.tracker-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.success-details-box {
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 20px;
  text-align: left;
  margin-top: 24px;
}

.success-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 500px) {
  .success-actions-row { flex-direction: column; }
}

