/**
 * COSPTY Mobile Home — noon-style mobile-first homepage sections.
 * Scoped under .ch to avoid clashing with the theme.
 */
.ch {
  --ch-primary: #7C3AED;
  --ch-primary-dark: #5B21B6;
  --ch-text: #111827;
  --ch-muted: #8B93A7;
  --ch-line: #EDF0F5;
  --ch-rose: #E11D48;
  --ch-yellow: #FACC15;
  --ch-c-purple: #F3E8FF;
  --ch-c-yellow: #FEF9C3;
  --ch-c-cyan: #E0F7FA;
  --ch-c-pink: #FCE7F3;
  --ch-c-red: #FDE8E8;
  --ch-c-green: #DCFCE7;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 12px 24px;
  color: var(--ch-text);
  font-size: 14px;
  line-height: 1.5;
}
.ch a { text-decoration: none; color: inherit; }
.ch a:hover { text-decoration: none; }
.ch img { max-width: 100%; display: block; }

/* ---- hero ---- */
.ch-hero {
  position: relative;
  display: block;
  margin-top: 12px;
  padding: 22px 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ch-primary) 0%, var(--ch-primary-dark) 100%);
  color: #fff;
  overflow: hidden;
}
.ch-hero-in { position: relative; z-index: 1; max-width: 78%; }
.ch-k {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.ch-hero-t { margin: 10px 0 4px; font-size: 24px; font-weight: 500; line-height: 1.2; }
.ch-hero-s { margin: 0 0 12px; font-size: 13px; opacity: 0.9; }
.ch-cta {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--ch-yellow);
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}
.ch-hero-em {
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-size: 72px;
  line-height: 1;
  opacity: 0.95;
  z-index: 0;
}

/* ---- category circles ---- */
.ch-cats {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  padding: 2px 2px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ch-cats::-webkit-scrollbar { display: none; }
.ch-cat { flex: 0 0 auto; width: 64px; text-align: center; }
.ch-bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--ch-c-purple);
  font-size: 26px;
}
.ch-cat:nth-child(6n+2) .ch-bubble { background: var(--ch-c-red); }
.ch-cat:nth-child(6n+3) .ch-bubble { background: var(--ch-c-cyan); }
.ch-cat:nth-child(6n+4) .ch-bubble { background: var(--ch-c-yellow); }
.ch-cat:nth-child(6n+5) .ch-bubble { background: var(--ch-c-pink); }
.ch-cat:nth-child(6n+6) .ch-bubble { background: var(--ch-c-green); }
.ch-cat-nm { display: block; margin-top: 6px; font-size: 11.5px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- flash bar ---- */
.ch-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
}
.ch-fx { font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }
.ch-fx small { display: block; font-size: 10px; font-weight: 400; opacity: 0.7; letter-spacing: 0.12em; }
.ch-timer { margin-left: auto; font-size: 13px; color: var(--ch-yellow); }
.ch-timer i {
  font-style: normal;
  display: inline-block;
  min-width: 20px;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  text-align: center;
  font-weight: 500;
}
.ch-go { font-size: 12px; color: #fff; opacity: 0.9; white-space: nowrap; }

/* ---- section headers ---- */
.ch-sec { margin-top: 22px; }
.ch-sect {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 500;
}
.ch-more { font-size: 12.5px; color: var(--ch-primary); font-weight: 400; }

/* ---- best sellers rail ---- */
.ch-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ch-rail::-webkit-scrollbar { display: none; }
.ch-hcard {
  flex: 0 0 132px;
  border: 1px solid var(--ch-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.ch-himg { display: block; height: 108px; background: #F5F6FA; }
.ch-himg img { width: 100%; height: 100%; object-fit: cover; }
.ch-hinfo { display: block; padding: 8px 10px 10px; }
.ch-hp { display: block; font-size: 14px; font-weight: 500; color: var(--ch-rose); }
.ch-old { color: #B6BCC9; font-size: 11px; font-weight: 400; margin-left: 2px; }
.ch-hnm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  color: #374151;
  line-height: 1.35;
}

/* ---- featured category tiles ---- */
.ch-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-tile {
  position: relative;
  display: block;
  padding: 14px 14px 12px;
  border-radius: 14px;
  min-height: 96px;
  overflow: hidden;
}
.ch-tile.t1 { background: var(--ch-c-purple); }
.ch-tile.t2 { background: var(--ch-c-yellow); }
.ch-tile.t3 { background: var(--ch-c-cyan); }
.ch-tile.t4 { background: var(--ch-c-pink); }
.ch-tile h5 { margin: 0; font-size: 15px; font-weight: 500; color: #111827; }
.ch-tile p { margin: 3px 0 0; font-size: 12px; color: #6B7280; }
.ch-tgo { position: absolute; left: 14px; bottom: 10px; font-size: 12px; color: var(--ch-primary-dark); }
.ch-tem { position: absolute; right: 8px; bottom: 4px; font-size: 40px; line-height: 1; opacity: 0.9; }

/* ---- trust bar ---- */
.ch-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 18px;
  padding: 12px 4px;
  border-top: 1px solid var(--ch-line);
  border-bottom: 1px solid var(--ch-line);
  font-size: 12.5px;
  color: #374151;
}

/* ---- product grid ---- */
.ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ch-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ch-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.ch-cimg { position: relative; display: block; height: 168px; background: #F5F6FA; }
.ch-cimg img { width: 100%; height: 100%; object-fit: cover; }
.ch-fb { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.ch-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ch-rose);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
}
.ch-cinfo { display: flex; flex-direction: column; flex: 1; padding: 10px 12px 12px; }
.ch-nm {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: #111827;
  line-height: 1.4;
  min-height: 36px;
}
.ch-pbs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ch-pb {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: #F5F6FA;
  border: 1px solid var(--ch-line);
  font-size: 10.5px;
  color: #6B7280;
  white-space: nowrap;
}
.ch-prow { display: flex; align-items: center; margin-top: auto; padding-top: 8px; }
.ch-price { font-size: 15px; font-weight: 500; color: var(--ch-rose); }
.ch-add {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ch-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* ---- desktop ---- */
@media (min-width: 768px) {
  .ch-hero { padding: 36px 40px; }
  .ch-hero-t { font-size: 32px; }
  .ch-hero-em { font-size: 104px; right: 28px; bottom: 14px; }
  .ch-cats { flex-wrap: wrap; justify-content: center; overflow: visible; }
  .ch-cat { width: 84px; }
  .ch-bubble { width: 72px; height: 72px; font-size: 32px; }
  .ch-tiles { grid-template-columns: repeat(4, 1fr); }
  .ch-grid { grid-template-columns: repeat(4, 1fr); }
  .ch-trust { grid-template-columns: repeat(4, 1fr); }
  .ch-cimg { height: 220px; }
}
