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


* { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: NotoSans-Regular, -apple-system, BlinkMacSystemFont, Roboto, Helvetica Neue, Helvetica, Tahoma, Arial, PingFang SC, Microsoft YaHei, sans-serif !important;
    background: #f4f4f6;
    display: flex;
    justify-content: center;
    overflow: hidden;
  }
  .phone {
    width: 390px;
    background: #f4f4f6;
    min-height: 100vh;
    padding-bottom: 70px;
    position: relative;
  }
 
  /* Search bar */
  .search-bar {
    background: #fff;
    padding: 14px 16px 10px;
  }
  .search-box {
    display: flex;
    align-items: center;
    background: #f1f1f3;
    border-radius: 50px;
    padding: 5px 6px 8px 14px;
    border: 1px solid #fe7f8f
  }
  .icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
  .search-box .icon { color: #999; margin-right: 8px; font-size: 15px; }
  .search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #999;
  }
  .search-btn {
    background: linear-gradient(90deg, #fe8748, #f93782);
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 8px 22px;
    font-weight: 600;
    font-size: 14px;
  }
 
  /* Icon grid */
  .icon-grid {
    background: #fff;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 10px 6px 4px;
  }
  .icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #333;
    padding: 8px 2px;
    text-align: center;
    gap: 0px;
    
  }
  .nav-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
  .icon-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* clips anything that pokes outside the circle */
    padding: 0;
}

.icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}
  .c-coin { background: transparent; }
  .c-land { background: transparent; }
  .c-merge { background: transparent; }
  .c-bundle { background: transparent; }
  .c-price { background: transparent; }
  .c-reward { background: transparent; }
  .c-mart { background: transparent; }
  .c-bigwin { background: transparent; }
  .c-gomatch { background: transparent; }
  .c-travel { background: transparent; }
  .c-look { background: transparent; }
  .c-gift { background: transparent; }
 
  .dot-indicator {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: #fff;
    padding: 6px 0 12px;
  }
  .dot { width: 14px; height: 4px; border-radius: 2px; background: #eee; }
  .dot.active { background: #ff5722; }
 
  /* Flash sale */
  .section {
    background: #fff;
    margin-top: 8px;
    padding: 14px 14px 10px;
    border-radius: 8px;
  }
  .flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }
  .flash-title {
    font-weight: 800;
    font-size: 17px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .flash-title .bolt { color: #ff5722; }
  .flash-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #555;
  }
  .flash-timer .box {
    background: #222;
    color: #fff;
    border-radius: 4px;
    padding: 2px 4px;
    font-weight: 700;
    font-size: 12px;
  }
  .flash-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .flash-card { position: relative; }
  .flash-card .img-wrap {
    background: #f1f1f1;
    border-radius: 8px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    font-size: 40px;
  }
  .flash-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
  .save-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px 4px;
    border-bottom-right-radius: 8px;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
  }
  .thumb-row { display: flex; gap: 3px; margin-top: 4px; }
  .thumb-row div {
    width: 16px; height: 16px; border-radius: 3px; background: #ddd;
    font-size: 10px; display:flex; align-items:center; justify-content:center;
  }
  .price-now { color: #fe4960; font-weight: 800; font-size: 17px; margin-top: 6px; }
  .price-old { color: #999; font-size: 11px; text-decoration: line-through; }
  .sold-bar {
    background: #ffb6bf;
    border-radius: 8px;
    margin-top: 6px;
    position: relative;
    height: 15px;
    overflow: hidden;
  }
  .sold-bar-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: linear-gradient(90deg,#fe4960,#fe4960);
    border-radius: 8px;
  }
  .sold-bar span {
    position: absolute;
    width: 100%;
    text-align: center;
    font-size: 9px;
    line-height: 15px;
    color: #fff;
    font-weight: 600;
  }
 
  /* Just for you */
  .jfy-title {
    font-weight: 800;
    font-size: 16px;
    margin: 14px 4px 8px;
  }
  .jfy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .jfy-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 8px;
  }
  .jfy-img {
    background: #eee;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    overflow: hidden;      /* clip anything that spills out */
}

.jfy-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* try: center, top, bottom, or "50% 20%" etc */
}
  .jfy-body { padding: 6px 8px 0; }
  .jfy-name {
  font-size: 12px;
  color: #333;
  line-height: 1.3;
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
  .jfy-price { color: #fe4960; font-weight: 700; font-size: 14px; margin-top: 4px; }
  .jfy-rating { font-size: 11px; color: #777; margin-top: 2px; }
  .jfy-rating .star { color: #ffb300; }
 
  .brand-strip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #ff4013;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    width: fit-content;
    margin: 6px 8px 0;
  }
  .jfy-name { font-weight: 700; color: #111; font-size: 13px; }
  .feature-row { display: flex; gap: 6px; padding: 4px 8px; font-size: 9px; color: #333; }
  .feature-row div { flex:1; background:#f7f7f7; border-radius:6px; padding:4px; text-align:center; }
  .warranty-strip {
    background: linear-gradient(90deg,#ff9d3d,#ff5722);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    padding: 4px 2px;
    margin: 4px 8px 0;
    border-radius: 4px;
  }
 
  /* Bottom nav */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    width: 390px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 10px;
    border-top: 1px solid #eee;
  }
  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #888;
    gap: 3px;
  }
  .nav-item.active { color: #ff5722; }
  .nav-icon { font-size: 20px; }
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  #loading-overlay.visible {
    display: flex;
    opacity: 1;
  }

  .brand-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #111;
  }
  .brand-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
}

  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top: 3px solid #111;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

/* ================= Mobile Responsive Overrides ================= */
@media (max-width: 400px) {
  .phone {
    width: 100%;
  }

  .bottom-nav {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .search-bar {
    padding: 12px 12px 8px;
  }

  .search-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .icon-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 4px 4px;
  }

  .icon-circle {
    width: 46px;
    height: 46px;
  }

  .section {
    padding: 12px 10px 8px;
  }

  .flash-title {
    font-size: 15px;
  }

  .flash-items {
    gap: 6px;
  }

  .price-now {
    font-size: 15px;
  }

  .jfy-title {
    font-size: 14px;
    margin: 12px 4px 6px;
  }

  .jfy-grid {
    gap: 6px;
  }

  .jfy-name {
    font-size: 11px;
  }

  .jfy-price {
    font-size: 13px;
  }
}

@media (max-width: 340px) {
  .icon-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .flash-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .jfy-grid {
    grid-template-columns: 1fr;
  }
}





