@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-page: #fff5f8;
  --bg-card: #ffffff;
  --bg-soft: #fde8f0;
  --primary: #9d174d;
  --primary-mid: #db2777;
  --primary-light: #f472b6;
  --grad-hero: linear-gradient(180deg, #fbcfe8 0%, #fce7f3 55%, #fff5f8 100%);
  --text-dark: #4a0e29;
  --text-body: #6b2142;
  --text-muted: #9f607b;
  --border: #f5d0e0;
  --success-bg: #dcfce7;
  --success-text: #15803d;
  --warn-bg: #fef9c3;
  --warn-text: #a16207;
  --info-bg: #e0f2fe;
  --info-text: #0369a1;
  --danger-bg: #fee2e2;
  --danger-text: #b91c1c;
  --shadow-sm: 0 4px 14px rgba(157, 23, 77, 0.06);
  --shadow-md: 0 8px 24px rgba(157, 23, 77, 0.10);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f3e5ec;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--bg-page);
  position: relative;
  box-shadow: 0 0 40px rgba(157, 23, 77, 0.12);
  overflow-x: hidden;
  padding-bottom: 88px;
}

/* SPLASH SCREEN */
#splash-screen {
  position: fixed;
  inset: 0;
  max-width: 440px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fbcfe8 0%, #f9d8e6 50%, #fce7f3 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.brand-logo-box {
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 10px 25px rgba(157, 23, 77, 0.12);
}
.brand-logo-box svg {
  width: 42px;
  height: 42px;
  stroke: var(--primary);
  stroke-width: 2.3;
  fill: none;
}
.brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin-bottom: 6px;
}
.brand-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-body);
}
.dots-loader {
  display: flex;
  gap: 8px;
  margin-top: 64px;
}
.dots-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c084fc;
  animation: bounceDot 1s infinite ease-in-out;
}
.dots-loader span:nth-child(2) { background: #e879f9; animation-delay: 0.16s; }
.dots-loader span:nth-child(3) { background: #f472b6; animation-delay: 0.32s; }
@keyframes bounceDot {
  0%, 80%, 100% { transform: scale(0.75); opacity: 0.5; }
  40% { transform: scale(1.25); opacity: 1; }
}

/* COMMON */
.hidden { display: none !important; }
.btn-primary {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(90deg, #f9a8d4 0%, #fbcfe8 55%, #fdf2f8 100%);
  box-shadow: 0 6px 16px rgba(219, 39, 119, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-outline {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.btn-soft {
  border: none;
  background: var(--bg-soft);
  color: var(--primary);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.input-field, .select-field, .textarea-field {
  width: 100%;
  border: 1.5px solid #f3e1e9;
  background: #fdf8fa;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  margin-bottom: 12px;
}
.input-field:focus, .textarea-field:focus {
  border-color: var(--primary-light);
  background: #fff;
}
.label-sm {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* AUTH */
.auth-header {
  background: var(--grad-hero);
  padding: 36px 20px 28px;
  text-align: center;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}
.auth-box {
  margin: -14px 16px 16px;
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.auth-tab {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.auth-tab.active {
  background: linear-gradient(90deg, #f9a8d4, #fce7f3);
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(157, 23, 77, 0.12);
}
.security-note {
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* TOP BAR & HOME */
.page-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #fbcfe8 0%, #fff5f8 100%);
  position: sticky;
  top: 0;
  z-index: 40;
}
.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.8);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.home-top {
  background: var(--grad-hero);
  padding: 14px 16px 16px;
}
.welcome-toast {
  background: var(--success-bg);
  color: var(--success-text);
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.announce-bar {
  background: #fff;
  border: 1.5px solid #fbcfe8;
  color: var(--primary);
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.search-bar {
  background: #fff;
  border-radius: 16px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.search-bar input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 13.5px;
  color: var(--text-dark);
}
.container { padding: 0 16px; }

/* FLASH SALE & GIVEAWAY */
.flash-box {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.flash-head {
  background: linear-gradient(90deg, #fbcfe8, #fce7f3);
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flash-head h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}
.timer-pill {
  background: #fff;
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}
.flash-scroll {
  display: flex;
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
}
.flash-item {
  min-width: 122px;
  cursor: pointer;
}
.flash-thumb {
  width: 122px;
  height: 112px;
  border-radius: 16px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 6px;
  overflow: hidden;
}
.flash-thumb img, .prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.giveaway-card {
  background: #fff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  cursor: pointer;
  border: 1.5px solid #fce7f3;
}
.giveaway-banner {
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 10px;
}

/* PILLS & GRID */
.pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.pills-row::-webkit-scrollbar { display: none; }
.pill {
  border: none;
  background: #fff;
  color: var(--primary);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(157,23,77,0.05);
}
.pill.active {
  background: linear-gradient(90deg, #f9a8d4, #fce7f3);
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.16);
}
.prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.prod-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.prod-img {
  height: 142px;
  background: var(--bg-soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.badge-disc {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #facc15;
  color: #713f12;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}
.badge-flash {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.92);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
}
.prod-body {
  padding: 11px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.prod-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.35;
}
.price-now {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
}
.price-old {
  font-size: 11px;
  color: #b88a9e;
  text-decoration: line-through;
  margin-left: 4px;
}
.prod-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-top: 1px solid #f7dce7;
  display: flex;
  justify-content: space-around;
  padding: 8px 4px 10px;
  z-index: 90;
}
.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #b47b93;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  flex: 1;
}
.nav-item.active { color: var(--primary); }
.nav-item svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.cart-badge {
  position: absolute;
  top: -4px;
  right: 22%;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* BADGES, MODAL, TOAST, SWITCH */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.tag-green { background: var(--success-bg); color: var(--success-text); }
.tag-yellow { background: var(--warn-bg); color: var(--warn-text); }
.tag-blue { background: var(--info-bg); color: var(--info-text); }
.tag-pink { background: var(--bg-soft); color: var(--primary); }
.tag-red { background: var(--danger-bg); color: var(--danger-text); }

.btn-warranty-green {
  border: none;
  background: #16a34a;
  color: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.star-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 16px;
}
.star-btn {
  font-size: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.4;
  transition: transform 0.15s ease;
}
.star-btn.active {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(50, 10, 28, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-sheet {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 20px 18px 28px;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-head h3 { font-size: 17px; font-weight: 800; color: var(--primary); }
.close-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-soft);
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

#toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  display: none;
  max-width: 90%;
  text-align: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #f3d1df;
  transition: .3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-mid); }
input:checked + .slider:before { transform: translateX(20px); }

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.metric-card {
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 8px;
}
.account-box {
  background: #fff5f8;
  border: 1.5px dashed #f472b6;
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
  font-size: 12.5px;
}
.alert-low {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
