@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Quicksand:wght@600;700;800&display=swap');

:root {
  --pink-50: #FFF8FA;
  --pink-100: #FFECF2;
  --pink-150: #FFE0EB;
  --pink-200: #FFD0E0;
  --pink-300: #FFB0CB;
  --pink-400: #FF85AE;
  --pink-500: #FF5C93;
  --pink-600: #E63976;
  --pink-700: #C4215B;
  --peach-accent: #FF758F;
  --lavender-soft: #F3D9FA;
  --purple-store: #9C36B5;
  --mint-soft: #E6FAF3;
  --mint-text: #099268;
  --orange-hub: #D9480F;
  --orange-soft: #FFF4E6;
  --gold-star: #FFB800;
  --text-primary: #2D1E24;
  --text-secondary: #6E5861;
  --text-muted: #9E8790;
  --border-pink: #FADCE6;
  --surface-white: #FFFFFF;
  --shadow-soft: 0 6px 20px rgba(255, 92, 147, 0.08);
  --shadow-card: 0 3px 12px rgba(230, 57, 118, 0.07);
  --shadow-float: 0 -4px 20px rgba(230, 57, 118, 0.1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --app-max-width: 450px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #FFE8F0 0%, #FFF5F8 50%, #FCE7F3 100%);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.wide-mode {
  --app-max-width: 780px;
}

/* Desktop Ambient Frame Controls */
.desktop-preview-bar {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--pink-200);
  box-shadow: var(--shadow-soft);
}

.desktop-preview-bar button {
  border: none;
  background: var(--pink-100);
  color: var(--pink-600);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.desktop-preview-bar button:hover,
.desktop-preview-bar button.active {
  background: var(--pink-600);
  color: #fff;
}

@media (max-width: 860px) {
  .desktop-preview-bar {
    display: none;
  }
}

/* Main Mobile PWA App Container */
.pwa-shell {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--pink-50);
  position: relative;
  padding-bottom: 82px;
  box-shadow: 0 0 50px rgba(230, 57, 118, 0.14);
  transition: max-width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ================= TOP STICKY HEADER & NEW BRAND LOGO ================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #FF6694 0%, #FF85AB 100%);
  padding: 9px 11px 10px;
  box-shadow: 0 4px 16px rgba(230, 57, 118, 0.18);
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.squirrel-heart-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #FFF5F8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(196, 33, 91, 0.25);
  border: 2px solid #FFFFFF;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
}

.logo-3icons-pill {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 1px solid var(--pink-300);
  border-radius: 99px;
  padding: 0.5px 4px;
  font-size: 7.5px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.brand-name {
  font-family: 'Quicksand', sans-serif;
  font-size: 17.5px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.05;
  letter-spacing: -0.2px;
}

.domain-pill {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  background: #FFFFFF;
  color: var(--pink-600);
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.admin-header-btn {
  border: 1.5px solid #FFFFFF;
  background: rgba(196, 33, 91, 0.45);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-header-btn:hover,
.admin-header-btn.active {
  background: #FFFFFF;
  color: var(--pink-600);
}

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #FFFFFF;
  color: var(--pink-600);
  border: 1.5px solid var(--pink-500);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search Bar */
.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 3px 4px 3px 12px;
  box-shadow: 0 2px 8px rgba(196, 33, 91, 0.12);
}

.search-icon {
  color: var(--pink-400);
  margin-right: 7px;
  flex-shrink: 0;
  display: flex;
}

.search-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary);
  background: transparent;
  padding: 5px 0;
}

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

.search-clear-btn {
  border: none;
  background: var(--pink-100);
  color: var(--pink-600);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  cursor: pointer;
}

.search-submit-pill {
  border: none;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-400));
  color: #FFFFFF;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
}

/* Chain Store Bar (3 Cửa Hàng Ea Kar) */
.chain-stores-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 8px 12px 2px;
}

.chain-store-pill {
  background: #FFFFFF;
  border: 1px solid var(--pink-150);
  border-radius: 10px;
  padding: 6px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(230, 57, 118, 0.05);
}

.chain-store-pill:hover,
.chain-store-pill.active {
  border-color: var(--pink-500);
  background: #FFF0F5;
  transform: translateY(-1px);
}

.chain-store-pill .cs-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--pink-700);
}

.chain-store-pill .cs-sub {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ================= HERO BANNER & QUICK PERKS ================= */
.hero-section {
  padding: 8px 12px 4px;
}

.banner-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  min-height: 142px;
}

.banner-slide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  min-height: 142px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.banner-content {
  position: relative;
  z-index: 2;
  max-width: 64%;
}

.banner-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 2.5px 7px;
  border-radius: var(--radius-pill);
  margin-bottom: 5px;
}

.banner-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
  text-shadow: 0 1px 4px rgba(168, 25, 76, 0.2);
}

.banner-subtitle {
  font-size: 10.5px;
  opacity: 0.95;
  line-height: 1.35;
  margin-bottom: 9px;
}

.banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #FFFFFF;
  color: var(--pink-600);
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.banner-visual {
  position: relative;
  z-index: 2;
  width: 106px;
  height: 106px;
  border-radius: 16px;
  overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 16px rgba(150, 20, 65, 0.22);
  flex-shrink: 0;
  background: #FFF0F5;
}

.banner-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-floating-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  right: 5px;
  background: rgba(230, 57, 118, 0.92);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
  padding: 2px 4px;
  border-radius: 5px;
}

.banner-dots {
  position: absolute;
  bottom: 7px;
  left: 15px;
  z-index: 3;
  display: flex;
  gap: 5px;
}

.banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.banner-dot.active {
  width: 18px;
  border-radius: 4px;
  background: #FFFFFF;
}

/* Voucher & Flash Sale Strip */
.perks-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 6px 12px 4px;
  padding: 7px 10px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--pink-150);
  box-shadow: var(--shadow-card);
}

.flash-sale-mini {
  display: flex;
  align-items: center;
  gap: 6px;
}

.flash-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--pink-600);
  display: flex;
  align-items: center;
  gap: 3px;
}

.countdown-boxes {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pink-600);
}

.cd-box {
  background: var(--pink-600);
  color: #FFFFFF;
  padding: 2px 4.5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
}

.voucher-quick-btn {
  border: 1px dashed var(--pink-400);
  background: var(--pink-50);
  color: var(--pink-600);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Category Context Banner */
.category-context-header {
  margin: 8px 12px 4px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FFE4EE 0%, #FFF2F7 100%);
  border: 1px solid var(--pink-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-context-info h2 {
  font-size: 14px;
  font-weight: 800;
  color: var(--pink-700);
  margin-bottom: 2px;
}

.cat-context-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

.cat-context-emoji {
  font-size: 26px;
}

/* ================= HORIZONTAL CHIPS FILTER BAR ================= */
.chips-filter-sticky {
  position: sticky;
  top: 94px;
  z-index: 90;
  background: rgba(255, 248, 250, 0.96);
  backdrop-filter: blur(10px);
  padding: 7px 0 5px;
  border-bottom: 1px solid var(--pink-150);
}

.chips-scroll-container {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 12px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chips-scroll-container::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--pink-200);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--pink-500) 0%, var(--pink-400) 100%);
  color: #FFFFFF;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 92, 147, 0.28);
}

.chip-icon {
  font-size: 12.5px;
  line-height: 1;
}

/* Sort Strip */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 2px;
  gap: 4px;
}

.sort-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.sort-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
}

.sort-btn.active {
  color: var(--pink-600);
  background: var(--pink-100);
  font-weight: 700;
}

.result-count-pill {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* ================= 2-COLUMN PRODUCT GRID ================= */
.product-grid-section {
  padding: 10px 12px 16px;
}

.product-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--pink-150);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(230, 57, 118, 0.13);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.02;
  background: var(--pink-50);
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-badge-store {
  position: absolute;
  top: 7px;
  left: 0;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
  padding: 2.5px 7px 2.5px 6px;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  z-index: 2;
}

.card-badge-discount {
  position: absolute;
  top: 7px;
  right: 7px;
  background: #FFF0F4;
  color: var(--pink-600);
  border: 1px solid var(--pink-300);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  z-index: 2;
}

.card-wishlist-btn {
  position: absolute;
  bottom: 7px;
  right: 7px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pink-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  font-size: 13px;
}

.card-wishlist-btn.liked {
  background: var(--pink-500);
  color: #FFFFFF;
}

.card-kiot-tag {
  position: absolute;
  bottom: 7px;
  left: 7px;
  background: rgba(45, 30, 36, 0.78);
  color: #FFFFFF;
  font-size: 8.5px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 2;
}

.product-card-body {
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
  margin-bottom: 5px;
}

.product-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 6px;
}

.tag-voucher {
  font-size: 9px;
  font-weight: 700;
  color: var(--pink-600);
  background: var(--pink-100);
  border: 1px solid var(--pink-200);
  padding: 1px 4.5px;
  border-radius: 3px;
}

.tag-freeship {
  font-size: 9px;
  font-weight: 700;
  color: var(--mint-text);
  background: var(--mint-soft);
  padding: 1px 4.5px;
  border-radius: 3px;
}

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

.price-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}

.price-current {
  font-size: 14px;
  font-weight: 800;
  color: var(--pink-600);
}

.price-original {
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.quick-add-btn {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  border: none;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-400));
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-secondary);
}

.star-icon {
  color: var(--gold-star);
}

/* Empty Filter State */
.empty-state {
  text-align: center;
  padding: 36px 18px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px dashed var(--pink-200);
}

.empty-state-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

/* ================= BOTTOM NAVIGATION BAR ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: 68px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--pink-150);
  box-shadow: var(--shadow-float);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  padding: 4px 2px;
}

.nav-icon-wrap {
  position: relative;
  width: 34px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.22s ease;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-item.active {
  color: var(--pink-600);
}

.nav-item.active .nav-icon-wrap {
  background: var(--pink-100);
  transform: translateY(-2px);
}

.nav-item.active .nav-label {
  font-weight: 800;
}

.nav-cart-badge {
  position: absolute;
  top: -3px;
  right: -2px;
  background: var(--pink-600);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
}

/* ================= E-COMMERCE PRODUCT DETAIL PAGE (PDP) & KIOTVIET BUILDER ================= */
.pdp-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(45, 30, 36, 0.48);
  display: none;
  justify-content: center;
  overflow-y: auto;
}

.pdp-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.pdp-sheet {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100dvh;
  background: var(--pink-50);
  position: relative;
  padding-bottom: 80px;
  animation: slideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pdp-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--pink-150);
}

.pdp-top-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--pink-150);
  background: #FFFFFF;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 15px;
}

.pdp-gallery {
  position: relative;
  background: #FFFFFF;
}

.pdp-main-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 0.95;
  position: relative;
  overflow: hidden;
  background: var(--pink-50);
}

.pdp-main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-batch-photo-banner {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 72px;
  background: rgba(45, 30, 36, 0.78);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  line-height: 1.3;
}

.pdp-img-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(45, 30, 36, 0.78);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 99px;
}

.pdp-thumbs-row {
  display: flex;
  gap: 8px;
  padding: 9px 12px;
  overflow-x: auto;
  background: #FFFFFF;
  border-bottom: 1px solid var(--pink-100);
}

.pdp-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
}

.pdp-thumb.active {
  border-color: var(--pink-500);
  opacity: 1;
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-price-banner {
  background: linear-gradient(90deg, #E63976 0%, #FF6B9D 60%, #FF8EB3 100%);
  color: #FFFFFF;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdp-price-main-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pdp-big-price {
  font-size: 21px;
  font-weight: 800;
}

.pdp-old-price {
  font-size: 12px;
  opacity: 0.85;
  text-decoration: line-through;
}

.pdp-discount-pill {
  background: #FFFFFF;
  color: var(--pink-600);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.pdp-card {
  background: #FFFFFF;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pink-100);
}

/* KiotViet Master SKU Info Box */
.kiotviet-sku-banner {
  background: linear-gradient(135deg, #FFF0F6 0%, #FFF8FB 100%);
  border: 1.5px solid var(--pink-300);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.kv-sku-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.kv-code-badge {
  background: var(--pink-600);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.kv-store-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 6px;
}

.kv-sku-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pdp-title-wrap {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pdp-stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pink-100);
}

/* Variant & KiotViet Note Generator Inputs */
.variant-group {
  margin-bottom: 12px;
}

.variant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.variant-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.size-guide-btn {
  border: none;
  background: transparent;
  color: var(--pink-600);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

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

.variant-chip {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1.5px solid var(--pink-200);
  background: var(--pink-50);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.variant-chip.active {
  background: #FFF0F5;
  border-color: var(--pink-600);
  color: var(--pink-600);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(230, 57, 118, 0.14);
}

.kv-input-field {
  width: 100%;
  border: 1.5px solid var(--pink-200);
  background: #FFFBFD;
  border-radius: 10px;
  padding: 8px 11px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
  margin-top: 6px;
  transition: border-color 0.2s;
}

.kv-input-field:focus {
  border-color: var(--pink-500);
  background: #FFFFFF;
}

.kiot-live-note-preview {
  background: #2D1E24;
  color: #FFE8F0;
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.45;
}

.kiot-live-note-preview code {
  display: block;
  margin-top: 4px;
  color: #FF9EBB;
  font-family: 'Consolas', monospace;
  font-weight: 700;
  font-size: 12px;
  word-break: break-word;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--pink-100);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--pink-200);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--pink-50);
  color: var(--pink-600);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.qty-value {
  width: 34px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
}

.section-heading {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 11.5px;
}

.specs-table tr {
  border-bottom: 1px solid var(--pink-100);
}

.specs-table td {
  padding: 6px;
}

.specs-table td:first-child {
  color: var(--text-secondary);
  width: 40%;
  background: var(--pink-50);
  font-weight: 500;
}

.specs-table td:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

.pdp-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: 64px;
  background: #FFFFFF;
  border-top: 1px solid var(--pink-200);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
  z-index: 50;
}

.pdp-action-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  padding: 0 8px;
  cursor: pointer;
  border-right: 1px solid var(--pink-150);
}

.pdp-btn-cart {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--pink-500);
  background: var(--pink-100);
  color: var(--pink-600);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.pdp-btn-buy {
  flex: 1.2;
  height: 44px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, var(--pink-600) 0%, var(--pink-500) 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(230, 57, 118, 0.3);
}

/* ================= CART & AUTO VIETQR ROUTING VIEW ================= */
.cart-view,
.admin-view {
  padding: 12px;
  display: none;
}

.cart-view.active,
.admin-view.active {
  display: block;
}

.demo-routing-switcher {
  background: #FFFFFF;
  border: 1px solid var(--pink-200);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}

.demo-routing-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.demo-route-btn {
  border: 1px solid var(--pink-300);
  background: var(--pink-50);
  color: var(--pink-700);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}

.demo-route-btn:hover {
  background: var(--pink-500);
  color: #FFFFFF;
}

.cart-store-group {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--pink-200);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cart-store-header {
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--pink-100);
}

.cart-item-card {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pink-100);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cart-item-card:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--pink-50);
}

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

.cart-item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.cart-kiot-note-box {
  background: #FFF5F8;
  border: 1px dashed var(--pink-300);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 10.5px;
  color: var(--pink-700);
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}

/* VietQR Routing Box */
.vietqr-routing-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 13px;
  border: 2px solid var(--pink-400);
  box-shadow: 0 6px 20px rgba(230, 57, 118, 0.12);
  margin-top: 12px;
}

.vietqr-routing-card.combined-mode {
  border-color: var(--orange-hub);
  background: linear-gradient(180deg, #FFF9F5 0%, #FFFFFF 100%);
}

.routing-status-banner {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.routing-status-banner.single {
  background: var(--mint-soft);
  color: var(--mint-text);
  border: 1px solid #96F2D7;
}

.routing-status-banner.combined {
  background: var(--orange-soft);
  color: var(--orange-hub);
  border: 1px solid #FFC078;
}

.vietqr-display-grid {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--pink-50);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--pink-150);
  margin-bottom: 10px;
}

.vietqr-img-box {
  width: 132px;
  height: 132px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--pink-200);
  padding: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vietqr-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vietqr-bank-details {
  flex: 1;
  font-size: 11.5px;
  line-height: 1.5;
}

.vietqr-bank-details .bank-role-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  color: #FFFFFF;
  margin-bottom: 4px;
}

/* ================= ADMIN RECONCILIATION & CONFIG VIEW ================= */
.admin-hero-card {
  background: linear-gradient(135deg, #2D1E24 0%, #59253A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.admin-hero-card h2 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #FFB0CB;
}

.admin-hero-card p {
  font-size: 11px;
  opacity: 0.9;
  line-height: 1.45;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.admin-kpi-box {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 10px 8px;
  border: 1.5px solid var(--pink-200);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.admin-kpi-box .kpi-store {
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-kpi-box .kpi-amount {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--pink-600);
}

.admin-kpi-box .kpi-sub {
  font-size: 9.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-section-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid var(--pink-200);
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.combined-order-card {
  border: 1px solid var(--pink-150);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: #FFFBFD;
}

.co-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--pink-200);
}

.co-item-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  padding: 4px 0;
}

.settlement-qr-card {
  border: 1.5px solid var(--pink-200);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: #FFF9FB;
  display: flex;
  gap: 10px;
  align-items: center;
}

.settlement-qr-card.settled {
  border-color: #63E6BE;
  background: #F3FAF7;
}

.settlement-qr-img {
  width: 112px;
  height: 112px;
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid var(--pink-200);
  padding: 3px;
  flex-shrink: 0;
}

.settlement-qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Summary & Checkout */
.cart-summary-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--pink-200);
  box-shadow: var(--shadow-card);
  margin-top: 12px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.summary-line.total {
  font-size: 15px;
  font-weight: 800;
  color: var(--pink-600);
  border-top: 1px dashed var(--pink-200);
  padding-top: 9px;
  margin-top: 6px;
}

.checkout-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--pink-600), var(--pink-500));
  color: #FFFFFF;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(230, 57, 118, 0.3);
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(45, 30, 36, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  max-height: 90dvh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 2px solid var(--pink-200);
  box-shadow: 0 12px 32px rgba(196, 33, 91, 0.22);
}

.toast-container {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  background: rgba(45, 30, 36, 0.94);
  color: #FFFFFF;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.toast-container.show {
  display: inline-flex;
}

/* ================= ADMIN SUB-TABS & SYSTEM CONFIG / KIOTVIET API UI ================= */
.admin-subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #FFFFFF;
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--pink-200);
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.admin-subtab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.25;
}

.admin-subtab-btn.active {
  background: linear-gradient(135deg, var(--pink-600), var(--pink-500));
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(230, 57, 118, 0.25);
}

.bank-config-form-card {
  border: 1.5px solid var(--pink-200);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #FFFBFD;
}

.bank-config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--pink-200);
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 380px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.form-field-group {
  margin-bottom: 8px;
}

.form-field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.kv-select-field {
  width: 100%;
  border: 1.5px solid var(--pink-200);
  background: #FFFFFF;
  border-radius: 9px;
  padding: 7.5px 9px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.kv-select-field:focus {
  border-color: var(--pink-500);
}

.kiot-store-api-card {
  border: 1.5px solid var(--pink-200);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(230, 57, 118, 0.05);
}

.kiot-status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 99px;
}

.kiot-status-pill.connected {
  background: #E6FAF3;
  color: #099268;
}

.kiot-status-pill.simulated {
  background: #FFF4E6;
  color: #D9480F;
}

.kiot-status-pill.untested {
  background: var(--pink-100);
  color: var(--text-secondary);
}

.kiot-console-box {
  background: #1E1318;
  color: #F8E8EE;
  border-radius: 10px;
  padding: 10px;
  font-family: 'Consolas', monospace;
  font-size: 10.5px;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.5;
  border: 1px solid #59253A;
}

.kiot-log-entry {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(255, 176, 203, 0.15);
}

.kiot-log-entry:last-child {
  border-bottom: none;
}

