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

:root {
  --primary: #7B1A3A;
  --primary-dark: #5C1229;
  --primary-light: #F9E8EE;
  --primary-mid: #A8264E;
  --gray-bg: #F8F8F8;
  --gray-light: #F2F2F2;
  --gray-text: #777;
  --border: #E8E8E8;
  --text: #222;
  --star: #F4A300;
  --green: #4CAF50;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --nav-h: 64px;
}

html, body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: var(--text);
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 0; }

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.header-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-light);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  color: var(--text);
  font-size: 18px;
  text-decoration: none;
}
.header-cart {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.cart-badge {
  position: absolute;
  top: -2px; right: -4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--nav-h);
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--gray-text);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.nav-item.active { color: var(--primary); }
.nav-item .nav-icon { font-size: 22px; line-height: 1; }
.nav-item .nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
}

/* ── Page wrapper ── */
.page {
  padding-bottom: calc(var(--nav-h) + 8px);
  min-height: 100vh;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(0.98); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-full { width: 100%; }
.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
  border-radius: 50px;
}
.btn-add {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ── Filter Tabs ── */
.filter-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.tab-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--gray-light);
  color: var(--gray-text);
  transition: all 0.2s;
}
.tab-pill.active {
  background: var(--primary);
  color: #fff;
}

/* ── Section headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.view-all {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Qty control ── */
.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  transition: all 0.15s;
}
.qty-btn:active { background: var(--primary-light); }
.qty-value {
  font-size: 16px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* ── Stars ── */
.stars { color: var(--star); font-size: 14px; letter-spacing: 1px; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 0 16px; }
.divider-full { height: 8px; background: var(--gray-bg); }

/* ── Form inputs ── */
.form-group { margin-bottom: 16px; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
}
.form-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--primary); }
.form-input::placeholder { color: #bbb; }
textarea.form-input { resize: none; min-height: 80px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Price ── */
.price { color: var(--primary); font-weight: 700; }

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 64px; opacity: 0.3; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-text { font-size: 14px; color: var(--gray-text); line-height: 1.5; }
