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

:root {
  --primary: #272757;
  --primary-dark: #0F0E47;
  --orange: #272757;
  --yellow: #f5a623;
  --green: #00a651;
  --navy: #1a237e;
  --dark-bg: #1e1e1e;
  --text-dark: #1a1a1a;
  --text-mid: #555;
  --text-light: #888;
  --border: #e8e8e8;
  --bg-light: #f5f5f5;
  --white: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  background: var(--bg-light);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.app-wrapper {
  width: 100%;
  max-width: 1000px;
  min-height: 100vh;
  background: var(--bg-light);
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
}

.btn-blue, .btn-primary{
  background: var(--primary)!important;
  color: var(--white)!important;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

/* ===================== TOP BAR ===================== */
.top-bar {
  background: var(--white);
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid var(--primary);
  border-radius: 24px;
  padding: 0 6px 0 14px;
  background: var(--white);
  height: 42px;
  overflow: hidden;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-mid);
  background: transparent;
  min-width: 0;
}

.search-input::placeholder {
  color: #bbb;
}

.camera-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 17px;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.camera-btn:hover {
  color: var(--primary);
}

.search-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 22px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  height: 42px;
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.upload-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 18px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.upload-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ===================== CONTENT AREA ===================== */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===================== HERO CAROUSEL ===================== */
.hero-carousel {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  border-radius: 0;
}

.banner-slide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  min-height: 175px;
  position: relative;
  overflow: hidden;
}

.banner-slide-1 {
  background: linear-gradient(135deg, #fef3e2 0%, #fde8c8 60%, #f9d5a0 100%);
}

.banner-slide-2 {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 60%, #90caf9 100%);
}

.banner-slide-3 {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 60%, #f48fb1 100%);
}

.banner-content {
  flex: 1;
  z-index: 2;
}

.brand-logos {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.brand-tag {
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.brand-tag-alt {
  background: #e53935;
  font-style: italic;
}

.banner-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.banner-subtitle {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 8px;
  line-height: 1.3;
}

.free-delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.shop-now-btn {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 20px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  text-decoration: none;
  display: inline-flex;
  transition: background 0.2s, transform 0.1s;
}

.shop-now-btn:hover {
  background: #283593;
  transform: scale(0.97);
}

.banner-image-wrap {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

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

.carousel-counter-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.45);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 10;
  pointer-events: none;
}

.carousel-next-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s;
}

.carousel-next-btn:hover {
  background: var(--white);
}

/* ===================== TRUST BAR ===================== */
.trust-bar {
  background: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 16px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 11.5px;
  font-weight: 500;
}

.trust-item i {
  font-size: 16px;
  opacity: 0.9;
}

.trust-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.25);
}

/* ===================== CATEGORIES ===================== */
.categories-section {
  background: var(--white);
  padding: 14px 0 10px;
  border-bottom: 6px solid var(--bg-light);
}

.categories-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 60px;
  padding: 0 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cat-item:hover {
  opacity: 0.8;
}

.cat-item-wide {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  background: #fff8e1;
  border-radius: 12px;
  padding: 8px 10px;
  margin-right: 8px;
  border: 1px solid #ffe082;
}

.cat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
}

.cat-item-wide .cat-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0;
  flex-shrink: 0;
  font-size: 26px;
}

.cat-icon-gold {
  background: linear-gradient(135deg, #f9a825, #f57f17);
  color: var(--white);
}

.cat-icon-green {
  background: linear-gradient(135deg, #00c853, #00897b);
  color: var(--white);
  flex-direction: column;
  gap: 1px;
}

.cat-icon-orange {
  background: linear-gradient(135deg, #ff9800, #e65100);
  color: var(--white);
}

.cat-icon-purple-dark {
  background: linear-gradient(135deg, #7b1fa2, #4a148c);
  color: var(--white);
  flex-direction: column;
  gap: 1px;
}

.cat-icon-navy {
  background: linear-gradient(135deg, #1565c0, #0d47a1);
  color: var(--white);
}

.cat-icon-pink {
  background: linear-gradient(135deg, #e91e63, #c2185b);
  color: var(--white);
}

.cat-free-text {
  font-size: 9px;
  font-weight: 800;
  background: var(--white);
  color: var(--green);
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
}

.cat-icon-purple-dark .cat-free-text {
  color: #7b1fa2;
}

.cat-icon-inner {
  font-size: 18px;
  margin-top: 1px;
}

.cat-choice-text {
  font-size: 10px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
}

.cat-dm-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}

.cat-label {
  font-size: 10px;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.3;
  font-weight: 500;
}

.cat-coins-text {
  display: flex;
  flex-direction: column;
}

.coins-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.coins-sub {
  font-size: 10px;
  color: var(--orange);
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ===================== VOUCHER ===================== */
.voucher-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
  padding: 12px 14px;
  border-bottom: 6px solid var(--bg-light);
}

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

.voucher-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.more-link {
  font-size: 12px;
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: color 0.2s;
}

.more-link:hover {
  color: var(--primary);
}

.voucher-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.voucher-card {
  flex: 1;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1.5px dashed;
}

.voucher-red {
  background: #fff5f5;
  border-color: #ffcdd2;
}

.voucher-cyan {
  background: #f0fdfa;
  border-color: #80cbc4;
}

.voucher-pct {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.voucher-cyan .voucher-pct {
  color: #00897b;
}

.voucher-sub {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 500;
}

.collect-all-btn {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
}

.collect-all-btn:hover {
  background: #e65100;
  transform: scale(0.97);
}

/* ===================== SECTION BLOCKS ===================== */
.section-block {
  background: var(--white);
  margin-top: 6px;
  padding: 14px 0 4px;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-dark);
}

.lightning-icon {
  font-size: 17px;
}

.choice-badge-tag {
  background: var(--yellow);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.gift-link {
  font-size: 11.5px;
  color: var(--primary);
  font-weight: 600;
}

/* ===================== HORIZONTAL SCROLL PRODUCTS ===================== */
.h-scroll-wrap {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 10px;
}

.h-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.h-scroll-inner {
  display: flex;
  gap: 10px;
  padding: 0 14px;
  width: max-content;
}

.product-card-h {
  width: 145px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card-h:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8f8f8;
  border-radius: 8px;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.product-card-h:hover .product-img {
  transform: scale(1.04);
}

.stock-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
}

.full-box-label {
  position: absolute;
  top: 7px;
  left: 7px;
  background: #e53935;
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.3px;
}

.free-item-label {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  z-index: 2;
}

.product-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 4px;
  gap: 4px;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.disc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.disc-red {
  background: #ffebee;
  color: var(--primary);
}

.disc-yellow {
  background: #fff3cd;
  color: #b45309;
}

/* ===================== CATEGORY ===================== */

.category-card-h {
  width: 90px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

/* ===================== TWO COLUMN GRID ===================== */

.grid-product-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.grid-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}

.grid-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8f8f8;
}

.grid-img-wrap .product-img {
  transition: transform 0.3s;
}

.grid-product-card:hover .product-img {
  transform: scale(1.04);
}

.grid-product-info {
  padding: 8px 8px 10px;
}

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

.grid-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===================== BOTTOM SPACER ===================== */
.bottom-spacer {
  height: 70px;
}

/* ===================== BOTTOM NAV ===================== */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 10px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 10px;
  flex: 1;
  cursor: pointer;
  transition: color 0.2s;
}

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

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

.nav-icon-wrap {
  position: relative;
  font-size: 22px;
  line-height: 1;
}

.nav-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-dot-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--primary);
  color: var(--white);
  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;
}

.nav-label {
  font-size: 10px;
  font-weight: 500;
}

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

.nav-center {
  flex: 1.2;
}

.center-nav-btn {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--orange) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(240,85,55,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: -22px;
}

.nav-center:hover .center-nav-btn {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(240,85,55,0.55);
}

.center-nav-text {
  font-size: 9px;
  font-weight: 900;
  color: var(--white);
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

/* ===================== RESPONSIVE ===================== */
@media (min-width: 481px) {
  .app-wrapper {
    margin: 0 auto;
    min-height: 100vh;
    border-radius: 20px;
    overflow: hidden;
  }
  .top-bar {
    border-radius: 20px 20px 0 0;
  }
}

@media (max-width: 360px) {
  .banner-title {
    font-size: 18px;
  }
  .banner-image-wrap {
    width: 110px;
    height: 110px;
  }
  .search-btn {
    padding: 9px 12px;
    font-size: 12px;
  }
}
