/* Design Tokens: Toko Baju Anak Grosir — Vintage Thrifting Mobile-First */
:root {
  --bg-outer: #EAE3D5;
  --bg-app: #F7F4ED;
  --bg-surface: #FFFDF9;
  --bg-card: #EFEAE0;
  --bg-hero: #DCE3D6;
  --brand-primary: #1F3A32;
  --brand-primary-hover: #162B25;
  --brand-accent: #C86D51;
  --brand-gold: #D49A42;
  --text-main: #1E2421;
  --text-secondary: #646B66;
  --text-inverse: #FFFDF9;
  --border-soft: #E2DBD0;
  --shadow-soft: 0 8px 24px rgba(31, 58, 50, 0.08);
  --shadow-float: 0 12px 32px rgba(24, 38, 33, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-sheet: 28px;
  --radius-pill: 999px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-outer);
  color: var(--text-main);
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Mobile-First App Shell */
.app-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--bg-app);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

@media (min-width: 481px) {
  body {
    padding: 16px 0;
  }
  .app-shell {
    min-height: calc(100vh - 32px);
    border-radius: 34px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 20px 50px rgba(31, 58, 50, 0.12);
  }
}

/* Pure CSS Geometric Icons (Zero SVG) */
.ico {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ico-search::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.ico-search::after {
  content: "";
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.ico-filter::before, .ico-filter::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.ico-filter::before {
  top: 6px;
  box-shadow: 0 6px 0 currentColor;
}
.ico-filter::after {
  top: 4px;
  left: 6px;
  right: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.ico-heart::before {
  content: "\2661";
  font-size: 18px;
  line-height: 20px;
  display: block;
  text-align: center;
  font-style: normal;
}
.is-liked .ico-heart::before, .ico-heart.filled::before {
  content: "\2665";
  color: var(--brand-accent);
}

.ico-bag::before {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 3px;
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}
.ico-bag::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 8px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
}

.ico-back::before {
  content: "\2190";
  font-size: 19px;
  line-height: 20px;
  display: block;
  text-align: center;
  font-weight: 600;
}

.ico-home::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}
.ico-home::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 4px;
  width: 12px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: none;
}

.ico-grid::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: 8px 0 0 0 currentColor, 0 8px 0 0 currentColor, 8px 8px 0 0 currentColor;
}

.ico-info::before {
  content: "i";
  position: absolute;
  inset: 1px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  font-style: normal;
}

/* App Top Bar */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #F7F4ED;
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(226, 219, 208, 0.6);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-primary);
}

.brand-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.18;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, transform 0.12s ease;
}

.icon-btn:hover, .icon-btn:focus-visible {
  background: var(--bg-card);
  outline: 2px solid var(--brand-primary);
  outline-offset: 1px;
}

.icon-btn.is-active-dark {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}

.badge-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--brand-accent);
  color: #FFFDF9;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-count[data-count="0"] {
  display: none;
}

/* Search Bar Row */
.search-section {
  padding: 12px 18px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 44px;
}

.search-box:focus-within {
  border-color: var(--brand-primary);
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text-main);
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

/* Collapsible Filter Drawer */
.filter-panel {
  margin: 0 18px 10px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  display: none;
}

.filter-panel.is-open {
  display: block;
}

.filter-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.price-chip {
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-app);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.price-chip.is-active {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}

/* Horizontal Category Pills (Reference Style) */
.pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 18px 12px;
  scrollbar-width: none;
}
.pill-row::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.16s ease;
}

.cat-pill.is-active {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}

/* Screen Views */
.screen-view {
  display: none;
  flex: 1;
}

.screen-view.is-active {
  display: block;
}

/* Hero Banner Card (Reference Screen 1) */
.hero-card {
  margin: 4px 18px 18px;
  border-radius: var(--radius-lg);
  background-color: var(--bg-hero);
  position: relative;
  overflow: hidden;
  min-height: 188px;
  display: flex;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(31, 58, 50, 0.08);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 63%;
}

.hero-badge {
  display: inline-block;
  background: var(--bg-surface);
  color: var(--brand-primary);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.hero-desc {
  font-size: 0.76rem;
  color: #36473F;
  margin-bottom: 12px;
  line-height: 1.38;
}

.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-primary);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-height: 38px;
}

.btn-primary-pill:hover {
  background: var(--brand-primary-hover);
}

/* Section Headers */
.section-head {
  padding: 4px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-accent);
  cursor: pointer;
}

/* Circular Category Quick Row (Reference Screen 1) */
.cat-circles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

.cat-circle-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}

.cat-circle-thumb {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  padding: 4px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.cat-circle-item:hover .cat-circle-thumb {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
}

.cat-circle-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.cat-circle-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
}

/* Catalog Status Bar */
.catalog-meta {
  padding: 0 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.reset-btn {
  background: none;
  border: none;
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
}

/* 2-Column Product Grid (Reference Screen 1 & 2) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wish-float-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(226, 219, 208, 0.8);
  background: rgba(255, 253, 249, 0.92);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.product-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255, 253, 249, 0.94);
  color: var(--brand-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
}

.product-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-origin {
  font-size: 0.67rem;
  color: var(--brand-accent);
  font-weight: 700;
  margin-bottom: 2px;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 6px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.product-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.product-orig {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.card-quick-add {
  margin-top: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--brand-primary);
  background: transparent;
  color: var(--brand-primary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 34px;
  transition: background 0.15s ease, color 0.15s ease;
}

.card-quick-add:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
}

/* Empty State */
.empty-state {
  margin: 16px 18px;
  padding: 28px 18px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}

.empty-state h3 {
  font-size: 0.96rem;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* Product Detail Sheet Modal (Reference Screen 3) */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 34, 30, 0.55);
  z-index: 60;
  display: none;
  justify-content: center;
  align-items: flex-end;
}

.detail-overlay.is-open {
  display: flex;
}

.detail-container {
  width: 100%;
  max-width: 440px;
  max-height: 94vh;
  background: var(--bg-card);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #EFEAE0;
}

.detail-topbar-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
}

.detail-hero-media {
  width: 100%;
  aspect-ratio: 4 / 4.2;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-sheet {
  background: var(--bg-surface);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  margin-top: -22px;
  position: relative;
  z-index: 5;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.detail-tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.detail-origin-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--brand-accent);
}

.detail-code-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.detail-price-box {
  text-align: right;
  flex-shrink: 0;
}

.detail-orig-price {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.detail-final-price {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.size-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.size-pill {
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
}

.size-pill.is-selected {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}

.detail-desc-title {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 10px;
}

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--brand-primary);
  background: var(--bg-surface);
  color: var(--brand-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  min-height: 46px;
}

.btn-solid-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  min-height: 46px;
}

/* Bag & Info Views */
.list-stack {
  padding: 6px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bag-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.bag-item img {
  width: 66px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-card);
  flex-shrink: 0;
}

.bag-item-info {
  flex: 1;
  min-width: 0;
}

.bag-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.bag-item-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-app);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

.qty-btn {
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
}

.checkout-box {
  margin: 6px 18px 18px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.checkout-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary);
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--brand-primary);
  margin-bottom: 6px;
}

.info-card p, .info-card li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.info-card ul {
  padding-left: 18px;
  margin-top: 6px;
}

/* Floating Pill Bottom Navigation (Matches Reference Image) */
.bottom-nav-wrap {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 36px);
  max-width: 404px;
  z-index: 45;
}

.bottom-nav {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 7px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  box-shadow: var(--shadow-float);
}

.nav-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 46px;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-tab.is-active {
  background: var(--brand-primary);
  color: var(--text-inverse);
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: var(--brand-primary);
  color: var(--text-inverse);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.toast-msg.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Multi-page Navigation & Live Editor Image Click Safety */
a.nav-tab, a.icon-btn, a.cat-pill, a.cat-circle-item, a.section-link {
  text-decoration: none;
}

.product-media {
  cursor: default;
}

.card-btn-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}

.card-detail-btn {
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card-detail-btn:hover {
  background: var(--bg-card);
  border-color: var(--brand-primary);
}

.card-btn-row .card-quick-add {
  margin-top: 0;
}


/* Smooth Scroll & Image Rendering Performance */
.product-card {
  content-visibility: auto;
  contain-intrinsic-size: 268px;
  contain: layout style;
}

.product-media img,
.cat-circle-thumb img,
.detail-hero-media img,
.bag-item img {
  background-color: var(--bg-card);
  will-change: auto;
}

.card-quick-add.is-added,
.btn-solid-pill.is-added {
  background: #2E6F40;
  border-color: #2E6F40;
  color: #FFFDF9;
}

@keyframes badgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.badge-count.is-pop {
  animation: badgePop 0.28s ease;
}


/* Mobile Card Button & Price Single-Line Alignment Fix */
.product-price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 4px;
}

.product-price {
  font-size: clamp(0.78rem, 3.6vw, 0.9rem);
  font-weight: 800;
  color: var(--brand-primary);
  white-space: nowrap;
}

.product-orig {
  font-size: clamp(0.62rem, 2.8vw, 0.7rem);
  color: var(--text-secondary);
  text-decoration: line-through;
  white-space: nowrap;
}

.card-btn-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  align-items: center;
}

.card-detail-btn {
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-app);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card-btn-row .card-quick-add {
  margin-top: 0;
  padding: 6px 8px;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 32px;
}

@media (max-width: 390px) {
  .product-body {
    padding: 9px 9px 11px;
  }

  .card-btn-row {
    gap: 4px;
  }

  .card-detail-btn {
    padding: 6px 7px;
    font-size: 0.67rem;
  }

  .card-btn-row .card-quick-add {
    padding: 6px 6px;
    font-size: 0.67rem;
  }
}
