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

/* CSS Custom Properties & Design System */
:root {
  /* Colors */
  --primary-yellow: #FFD100;
  --primary-yellow-rgb: 255, 209, 0;
  --primary-red: #E3000F;
  --primary-red-rgb: 227, 0, 15;
  
  --mr-diy-red: #E3000F;
  --mr-toy-blue: #00AEEF;
  --mr-dollar-green: #00A651;
  
  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --bg-card: #FFFFFF;
  --border-color: #EAEAEA;
  
  --text-dark: #1F2937;
  --text-gray: #6B7280;
  --text-light: #9CA3AF;
  
  /* Badges & Accents */
  --badge-bg-red: #FFECEE;
  --badge-text-red: #E3000F;
  
  /* Box Shadow */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --shadow-btn: 0 4px 14px rgba(255, 209, 0, 0.4);
  
  /* Layout constraints */
  --app-max-width: 430px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #121214;
  color: var(--text-dark);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  margin: 0;
}

@media (min-width: 440px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Outer Desktop Frame for Mobile Viewport Simulator */
.phone-simulator-frame {
  width: 100%;
  max-width: var(--app-max-width);
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height to prevent cutoff on mobile browsers */
  background-color: var(--bg-white);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

@media (min-width: 440px) {
  .phone-simulator-frame {
    height: calc(100vh - 40px);
    max-height: 880px;
    min-height: 620px;
    border-radius: 40px;
    border: 12px solid #2d2d30;
  }
}

/* App Header */
.app-header {
  background-color: var(--bg-white);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

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

.brand-logo {
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand-logo img {
  height: 100%;
  object-fit: contain;
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 4px 8px;
  margin-left: auto;
  text-align: left;
  transition: var(--transition-smooth);
  border-radius: 12px;
}

.header-profile:hover {
  opacity: 0.85;
}

.header-profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-yellow);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.header-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.header-profile-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.header-profile-points {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-red);
  line-height: 1.2;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.action-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn .badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background-color: var(--primary-red);
  color: var(--bg-white);
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-white);
}

/* Search Bar Component */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--bg-light);
  border-radius: 12px;
  padding: 8px 14px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.search-container:focus-within {
  background-color: var(--bg-white);
  border-color: var(--primary-yellow);
  box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

.search-container i {
  color: var(--text-gray);
  margin-right: 8px;
  font-size: 16px;
}

.search-input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

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


/* App Main Content Viewport */
.app-content {
  flex: 1;
  overflow-y: auto;
  background-color: var(--bg-light);
  padding-bottom: calc(100px + env(safe-area-inset-bottom)); /* Dynamic spacer for taller bottom navigation and safe areas */
  position: relative;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.app-content::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Screen Wrapper */
.screen {
  display: none;
  min-height: 100%;
  animation: fadeIn 0.3s ease-in-out forwards;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Carousel / Kampanye Banner */
.hero-carousel {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 4px;
  background-color: var(--bg-light);
  user-select: none;
  -webkit-user-drag: none;
}

.campaign-carousel {
  height: auto;
}

.carousel-track {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.carousel-slide {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.campaign-banner {
  border-radius: 18px;
  padding: 16px 18px 30px;
  color: var(--bg-white);
  position: relative;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.campaign-banner.always-low {
  background-image: linear-gradient(135deg, rgba(227, 0, 15, 0.85) 0%, rgba(100, 0, 5, 0.85) 100%), url('../assets/images/banner_always_low.png');
  box-shadow: 0 6px 18px rgba(227, 0, 15, 0.18);
}

.campaign-banner.flash-sale {
  background-image: linear-gradient(135deg, rgba(227, 0, 15, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%), url('../assets/images/banner_flash_sale.png');
  box-shadow: 0 6px 18px rgba(227, 0, 15, 0.18);
}

.campaign-banner.mr-toy {
  background-image: linear-gradient(135deg, rgba(0, 174, 239, 0.85) 0%, rgba(0, 70, 120, 0.85) 100%), url('../assets/images/banner_mr_toy.png');
  box-shadow: 0 6px 18px rgba(0, 174, 239, 0.18);
}

.campaign-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.campaign-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 4px;
}

.campaign-headline {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.campaign-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.35;
  margin-bottom: 10px;
  max-width: 90%;
}

.campaign-cta {
  background-color: var(--bg-white);
  color: var(--text-dark);
  border: none;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.campaign-cta:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-carousel .carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
}

.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-dot.active {
  background-color: var(--bg-white);
  width: 16px;
  height: 5px;
  border-radius: 999px;
}

/* Quick Categories Grid (Home) */
.home-section {
  background-color: var(--bg-white);
  margin-top: 8px;
  padding: 16px;
}

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

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

.section-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.quick-categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 8px;
}

.quick-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.quick-category-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

/* CSS Sprite for Categories Icons - Perfectly centered, rounded, and elegant */
.category-sprite-icon {
  width: 48px;
  height: 48px;
  background-image: url('../assets/images/category_icons.png');
  background-size: 296px 296px; /* Adjusted scale to center perfectly for 48px icons */
  background-repeat: no-repeat;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-category-card:hover .category-sprite-icon {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 16px rgba(227, 0, 15, 0.15), 0 4px 6px rgba(0, 0, 0, 0.06);
}

.quick-category-name {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.quick-category-card:hover .quick-category-name {
  color: var(--primary-red);
}

.horizontal-scroll-row {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 0;
  scrollbar-width: none;
}

.horizontal-scroll-row::-webkit-scrollbar {
  display: none;
}

/* Product Card */
.product-card {
  flex: 0 0 148px;
  background-color: var(--bg-white);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
}

.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--primary-red);
  color: var(--bg-white);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  z-index: 2;
}

.product-image-container {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 8px;
  background-color: #FAFAFA;
}

/* CSS Sprite for Products */
.product-sprite-img {
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/product_grid.png');
  background-size: 400% 300%;
  background-repeat: no-repeat;
  transition: var(--transition-smooth);
}

.product-card:hover .product-sprite-img {
  transform: scale(1.06);
}

.product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

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

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.product-price-row {
  flex: 1;
  min-width: 0;
}

.product-price-sale {
  color: var(--primary-red);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-price-original {
  font-size: 10px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-top: 2px;
}

.add-to-cart-fab {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: none;
  border-radius: 50%;
  background-color: var(--primary-yellow);
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-btn);
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.add-to-cart-fab:hover {
  transform: scale(1.08);
}

.add-to-cart-fab.added {
  background-color: #10B981;
  color: var(--bg-white);
}

.add-to-cart-btn {
  width: 100%;
  border: none;
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.add-to-cart-btn:hover {
  background-color: var(--primary-yellow);
}

.add-to-cart-btn.added {
  background-color: #E6FDF4;
  color: #10B981;
}

/* 2-Column Product Grid */
.product-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-grid-2col .product-card {
  flex: none;
  width: 100%;
}

.product-grid-2col .product-image-container {
  border-radius: 12px;
}

.product-grid-2col .product-title {
  font-size: 13px;
}

.product-grid-2col .product-price-sale {
  font-size: 15px;
}

.product-grid-2col .add-to-cart-fab {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 18px;
}

.load-more-btn {
  display: block;
  width: 100%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: 12px;
  margin-top: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.load-more-btn:hover {
  background-color: var(--bg-light);
}

/* Screen 2: Split-Screen Categories Megamenu */
.split-screen-categories {
  display: flex;
  height: 100%;
  background-color: var(--bg-white);
}

.sidebar-left {
  width: 32%;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-light);
  overflow-y: auto;
  height: 100%;
}

.sidebar-item {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  text-align: left;
}

.sidebar-item-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
  line-height: 1.3;
}

.sidebar-item.active {
  background-color: var(--bg-white);
}

.sidebar-item.active .sidebar-item-text {
  color: var(--primary-red);
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--primary-yellow);
}

.content-right {
  width: 68%;
  background-color: var(--bg-white);
  overflow-y: auto;
  padding: 16px;
  height: 100%;
}

.content-right-title {
  margin-bottom: 12px;
  font-size: 14px;
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
}

.subcategory-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.subcategory-img-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  padding: 4px;
}

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

.subcategory-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.2;
}

/* Screen 3: Visual Search Screen (Camera overlay Mockup) */
.scan-screen-container {
  height: 100%;
  position: relative;
  background-color: var(--bg-dark);
}

.scan-viewfinder {
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/scanner_overlay.png');
  background-size: cover;
  background-position: center;
  position: relative;
}

.scan-viewfinder-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.scan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--bg-white);
}

.scan-back-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  cursor: pointer;
  font-size: 16px;
}

.scan-title {
  font-size: 16px;
  font-weight: 700;
}

.scan-target-box {
  width: 250px;
  height: 250px;
  border: 3px solid var(--primary-yellow);
  border-radius: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  overflow: hidden;
}

.scan-target-box::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--primary-yellow);
  top: 0;
  left: 0;
  animation: scanLine 2s linear infinite;
  box-shadow: 0 0 8px var(--primary-yellow);
}

@keyframes scanLine {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

.scan-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid var(--primary-yellow);
}

.scan-corner.tl { top: -3px; left: -3px; border-bottom: none; border-right: none; }
.scan-corner.tr { top: -3px; right: -3px; border-bottom: none; border-left: none; }
.scan-corner.bl { bottom: -3px; left: -3px; border-top: none; border-right: none; }
.scan-corner.br { bottom: -3px; right: -3px; border-top: none; border-left: none; }

.scan-footer {
  margin-top: auto;
  text-align: center;
  color: var(--bg-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.scan-instructions {
  font-size: 13px;
  font-weight: 600;
  background-color: rgba(0,0,0,0.6);
  padding: 6px 14px;
  border-radius: 999px;
}

.scan-mode-toggle {
  display: flex;
  background-color: rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(10px);
}

.scan-mode-tab {
  border: none;
  background: none;
  color: rgba(255,255,255,0.8);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.scan-mode-tab.active {
  background-color: var(--primary-yellow);
  color: var(--text-dark);
}

/* Screen 4: Cart and Checkout Screen */
.cart-header {
  background-color: var(--bg-white);
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.cart-items-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  align-items: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: var(--bg-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-red);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.qty-btn:hover {
  background-color: var(--bg-light);
}

.qty-val {
  font-size: 12px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.cart-delete-btn {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.cart-delete-btn:hover {
  color: var(--primary-red);
}

/* Fulfillment Selector Options */
.fulfillment-section {
  background-color: var(--bg-white);
  margin-top: 8px;
  padding: 16px;
}

.fulfillment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fulfillment-card {
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.fulfillment-card.active {
  border-color: var(--primary-red);
  background-color: #FFF2F3;
}

.fulfillment-icon {
  font-size: 18px;
  color: var(--text-gray);
  margin-bottom: 6px;
}

.fulfillment-card.active .fulfillment-icon {
  color: var(--primary-red);
}

.fulfillment-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.fulfillment-desc {
  font-size: 8px;
  color: var(--text-gray);
}

/* Store Selector (Click & Collect Details) */
.store-selector-box {
  display: none;
  background-color: var(--bg-light);
  border-radius: 8px;
  padding: 10px;
  border: 1px dashed var(--border-color);
  margin-top: 8px;
  animation: fadeIn 0.2s ease-in-out;
}

.store-selector-box.active {
  display: block;
}

.store-selector-btn {
  background: none;
  border: none;
  color: var(--primary-red);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Loyalty Points & Promo Redemptions */
.loyalty-points-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-white);
  margin-top: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.points-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.points-balance {
  font-size: 13px;
  font-weight: 800;
}

.points-value-sub {
  font-size: 10px;
  color: var(--text-gray);
}

/* Toggle Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #CCC;
  transition: .4s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--mr-dollar-green);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Voucher Promo Box */
.voucher-section {
  background-color: var(--bg-white);
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.voucher-input-row {
  display: flex;
  gap: 8px;
}

.voucher-input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  outline: none;
  font-weight: 600;
}

.voucher-apply-btn {
  background-color: var(--text-dark);
  color: var(--bg-white);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.voucher-apply-btn:hover {
  background-color: #374151;
}

/* Payment Summary */
.payment-summary-section {
  background-color: var(--bg-white);
  padding: 16px;
  margin-top: 8px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-gray);
}

.summary-row.total {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-dark);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
}

.summary-row.total .price {
  color: var(--primary-red);
}

/* Sticky Bottom Checkout Footer */
.sticky-checkout-bar {
  position: absolute;
  bottom: calc(72px + env(safe-area-inset-bottom)); /* Positioned right above the taller bottom navigation bar */
  left: 0;
  right: 0;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  z-index: 99;
}

.checkout-total-info {
  display: flex;
  flex-direction: column;
}

.total-label {
  font-size: 10px;
  color: var(--text-gray);
  font-weight: 600;
}

.total-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-red);
}

.checkout-cta-btn {
  background-color: var(--primary-red);
  color: var(--bg-white);
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.checkout-cta-btn:hover {
  background-color: #C0000C;
}

/* Screen 5: Account Screen */
.account-profile-header {
  background: linear-gradient(135deg, var(--primary-yellow) 0%, #FFA800 100%);
  padding: 24px 16px;
  color: var(--text-dark);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--bg-white);
  overflow: hidden;
  background-color: #fff;
}

.profile-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta {
  flex: 1;
}

.profile-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 2px;
}

.profile-member-tier {
  font-size: 9px;
  background-color: rgba(0,0,0,0.8);
  color: var(--primary-yellow);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
}

.loyalty-score-badge {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 12px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.score-title {
  font-size: 10px;
  color: var(--text-gray);
  font-weight: 700;
  text-transform: uppercase;
}

.score-val {
  font-size: 20px;
  font-weight: 800;
  color: #FFA800;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.score-val span {
  font-size: 10px;
  color: var(--text-dark);
  font-weight: 600;
}

/* Order Status Navigation Widget */
.order-status-widget {
  background-color: var(--bg-white);
  padding: 16px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.status-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.status-nav-icon {
  font-size: 18px;
  color: var(--text-gray);
  position: relative;
}

.status-nav-item:hover .status-nav-icon {
  color: var(--primary-red);
}

.status-nav-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dark);
}

/* Menu list group links */
.menu-group {
  background-color: var(--bg-white);
  margin-top: 8px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  background-color: var(--bg-light);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
}

.menu-item-left i {
  color: var(--text-gray);
  width: 20px;
  text-align: center;
}

.menu-item-right {
  color: var(--text-light);
  font-size: 12px;
}

/* Bottom Navigation Bar */
.bottom-nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(72px + env(safe-area-inset-bottom));
  background-color: var(--bg-white);
  border-top: 1px solid #ECECEF;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding-bottom: 2px;
  background: none;
  border: none;
  color: #3D3D4E;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}

.nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.nav-item-label {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.nav-item.active {
  color: var(--primary-red);
}

.nav-item.active .nav-icon {
  stroke-width: 2;
}

.nav-icon-wrap .cart-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background-color: var(--primary-red);
  color: var(--bg-white);
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-white);
  line-height: 1;
}

/* Central Scan FAB */
.nav-item-scan {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 6px;
}

.scan-fab-btn {
  position: absolute;
  top: -22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--primary-yellow);
  color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 4px solid var(--bg-white);
  box-shadow: 0 4px 14px rgba(255, 209, 0, 0.45);
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.scan-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 209, 0, 0.55);
}

.scan-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* ==========================================================================
   MODAL BOTTOM SHEET: PEMILIHAN CABANG MR. D.I.Y.
   ========================================================================== */
.bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 80%;
  background-color: var(--bg-white);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.bottom-sheet-overlay.active .bottom-sheet-container {
  transform: translateY(0);
}

.bottom-sheet-drag-handle {
  width: 40px;
  height: 4px;
  background-color: #E5E7EB;
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.bottom-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 14px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.bottom-sheet-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
}

.bottom-sheet-close-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.bottom-sheet-close-btn:hover {
  color: var(--primary-red);
}

.bottom-sheet-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  flex: 1;
}

.branch-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--bg-light);
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.branch-search-box:focus-within {
  background-color: var(--bg-white);
  border-color: var(--primary-yellow);
  box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15);
}

.branch-search-box .search-icon {
  color: var(--text-gray);
  margin-right: 8px;
  font-size: 14px;
}

.branch-search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

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

.search-clear-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.search-clear-btn:hover {
  color: var(--text-gray);
}

.gps-location-btn {
  width: 100%;
  border: 1.5px solid var(--primary-yellow);
  background-color: rgba(255, 209, 0, 0.05);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(255, 209, 0, 0.1);
}

.gps-location-btn:hover {
  background-color: var(--primary-yellow);
  box-shadow: var(--shadow-btn);
}

.gps-location-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.gps-location-btn .btn-content-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.branches-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding-right: 2px;
  scrollbar-width: none;
}

.branches-list::-webkit-scrollbar {
  display: none;
}

.branch-card {
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  background-color: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.branch-card:hover {
  border-color: var(--primary-yellow);
  background-color: rgba(255, 209, 0, 0.02);
}

.branch-card.active {
  border-color: var(--primary-red);
  background-color: #FFF2F3;
}

.branch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.branch-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.3;
}

.branch-distance {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary-red);
  background-color: #FFF2F3;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.branch-card.active .branch-distance {
  background-color: var(--primary-red);
  color: var(--bg-white);
}

.branch-address {
  font-size: 11px;
  color: var(--text-gray);
  line-height: 1.4;
}

.branch-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-gray);
  margin-top: 4px;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
}

.branch-card.active .branch-meta {
  border-top-color: rgba(227, 0, 15, 0.1);
}

.branch-hours {
  display: flex;
  align-items: center;
  gap: 5px;
}

.branch-stock {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--mr-dollar-green);
}

.branch-stock.out {
  color: var(--primary-red);
}

.branch-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-light);
  gap: 12px;
}

.branch-empty-state i {
  font-size: 36px;
  color: var(--text-light);
}

.branch-empty-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.branch-empty-desc {
  font-size: 11px;
  color: var(--text-gray);
}
