/* ===== Index Page Styles ===== */

.container { max-width: 480px; padding-bottom: 70px; }

/* Header (no gap needed for single-child logo) */
.header { gap: 0; }

.logo {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}

.logo-icon {
  width: 36px; height: 36px; background: var(--gradient-1); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.logo-text {
  font-size: 20px; font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Banner Carousel */
.banner-section { padding: 16px; }

.carousel { position: relative; overflow: hidden; border-radius: 16px; }

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: 100%; position: relative; border-radius: 16px; overflow: hidden;
}

.banner-card {
  position: relative; height: 170px;
  display: flex; align-items: center; padding: 24px; overflow: hidden;
}

.banner-card-inner {
  position: absolute; inset: 0; opacity: 0.95;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  overflow: hidden;
}

.banner-card-blur {
  position: absolute; inset: 0;
  background: inherit; background-size: inherit; background-position: inherit; background-repeat: inherit;
  filter: blur(16px);
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.3) 35%, rgba(0,0,0,0.75) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.08) 20%, rgba(0,0,0,0.3) 35%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
}

.banner-card-inner::after {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.banner-card-inner::before {
  content: ''; position: absolute; bottom: -30%; left: 10%;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.banner-content { position: relative; z-index: 1; }

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px);
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 700; margin-bottom: 8px; letter-spacing: 0.5px;
}

.banner-title { font-size: 20px; font-weight: 800; margin-bottom: 4px; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }

.banner-desc { font-size: 12px; opacity: 0.85; margin-bottom: 14px; }

.banner-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #1a1a2e;
  padding: 7px 18px; border-radius: 25px;
  font-weight: 700; font-size: 12px; text-decoration: none;
  transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.banner-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }

.carousel-dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: var(--bg-card); border: none; cursor: pointer;
  transition: all 0.3s; padding: 0;
}

.carousel-dot.active { width: 24px; background: var(--accent); }

/* Section */
.section { padding: 0 16px 20px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}

.section-title { font-size: 18px; font-weight: 700; }

.section-title span {
  background: var(--gradient-1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.section-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.result-count {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  background: var(--bg-card); border-radius: 20px;
  padding: 4px 12px; border: 1px solid var(--border);
}

.sort-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.3s;
}

.sort-btn:hover { border-color: var(--accent); color: var(--accent-light); }

/* Featured */
.featured-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
  will-change: scroll-position;
}

.featured-scroll::-webkit-scrollbar { display: none; }
.featured-scroll.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}

.featured-card {
  min-width: 250px; max-width: 200px;
  background: var(--bg-card); border-radius: 16px; overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none; color: inherit;
  border: 1px solid rgba(108, 92, 231, 0.1);
 /*transition: all 0.3s; flex-shrink: 0;*/
}

.featured-card:hover { border-color: rgba(108, 92, 231, 0.3); transform: translateY(-3px); }

.featured-img-wrap {
  position: relative; width: 100%; height: 120px; overflow: hidden;
}

.featured-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s;
}

.featured-card:hover .featured-img-wrap img { transform: scale(1.06); }

.featured-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(transparent, rgba(26, 32, 53, 0.95));
}

.featured-tag {
  position: absolute; top: 8px; left: 8px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700; color: #fff;
}

.featured-tag.hot { background: var(--gradient-2); }
.featured-tag.new { background: var(--gradient-3); }

.featured-body {
  padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between;
}

.featured-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100px;
}

.featured-btn {
  padding: 5px 12px; border-radius: 20px; border: none;
  background: var(--gradient-1); color: #fff;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; white-space: nowrap;
}

.featured-btn:hover { box-shadow: 0 4px 15px var(--accent-glow); }

.allproducts {
    position: sticky;
    top: 52px;
    z-index: 90;
    background: var(--bg-primary);
}
/* Filter */
.filter-section {
    padding: 0 16px 12px;
    /* position: sticky; top: 52px; z-index: 90;*/
    background: rgba(10, 14, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.filter-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.3s; white-space: nowrap;
}

.filter-tab:hover { border-color: var(--accent); color: var(--accent-light); }

.filter-tab.active {
  background: var(--gradient-1); border-color: transparent;
  color: #fff; box-shadow: 0 4px 14px var(--accent-glow);
}

/* Product Grid */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}

.product-card {
  background: var(--bg-card); border-radius: 16px; overflow: hidden;
  transition: all 0.3s; border: 1px solid rgba(108, 92, 231, 0.1);
  text-decoration: none; color: inherit;
}

.product-card:hover {
  transform: translateY(-4px); border-color: rgba(108, 92, 231, 0.3);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.15);
}

.product-img-wrap {
  position: relative; width: 100%; padding-top: 100%;
  background: var(--bg-secondary); overflow: hidden;
}

.product-img-wrap img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.4s;
}

.product-card:hover .product-img-wrap img { transform: scale(1.08); }

.product-tag {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 10px; border-radius: 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3px; color: #fff;
}

.product-tag.hot { background: var(--gradient-2); }
.product-tag.new { background: var(--gradient-3); }

.product-info { padding: 12px; }

.product-name {
  font-size: 14px; font-weight: 600; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.product-region {
  font-size: 11px; color: var(--text-muted); margin-bottom: 8px;
}

.product-bottom {
  display: flex; align-items: center; justify-content: space-between;
}

.product-price {
  font-size: 16px; font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.product-buy {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--gradient-1); color: #fff; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; box-shadow: 0 3px 10px var(--accent-glow);
}

.product-buy:hover { transform: scale(1.1); }

/* Empty State */
.empty-state {
  text-align: center; padding: 50px 20px; display: none;
}

.empty-state.show { display: block; }

.empty-icon {
  width: 60px; height: 60px; border-radius: 20px;
  background: var(--bg-card); margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}

.empty-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-desc { font-size: 13px; color: var(--text-muted); }

/* Glow Line */
.glow-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: -10px 16px 16px 16px; opacity: 5.3;
}

/* Footer overrides */
.footer { margin-top: 20px; padding: 30px 16px; }

.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }

.footer-brand-icon {
  width: 32px; height: 32px; background: var(--gradient-1); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
}

.footer-brand-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }

.footer-links { margin-bottom: 20px; }

.footer-copy { opacity: 0.6; }

/* Bottom Nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(108, 92, 231, 0.15);
  display: flex; justify-content: space-around;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; padding: 4px 12px; border-radius: 12px;
  transition: all 0.3s;
}

.nav-item.active { background: var(--accent-glow); }

.nav-item svg { width: 22px; height: 22px; transition: all 0.3s; }
.nav-item.active svg { color: var(--accent-light); }

.nav-label { font-size: 10px; color: var(--text-secondary); font-weight: 500; }
.nav-item.active .nav-label { color: var(--accent-light); }

/* Skeleton */
.product-img-wrap.skeleton,
.featured-img-wrap.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, #252d45 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}

@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Responsive */
@media (min-width: 768px) {
  .container { max-width: 720px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .banner-card { height: 220px; }
  .banner-title { font-size: 26px; }
  .bottom-nav { display: none; }
  .featured-card { min-width: 220px; max-width: 220px; }
}

@media (min-width: 1024px) {
  .container { max-width: 960px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .banner-card { height: 260px; padding: 40px; }
  .banner-title { font-size: 28px; }
  .featured-card { min-width: 240px; max-width: 240px; }
}
