/* Reusa "Candy Pop" look with a 58.com-style portal layout (utility bar, big search,
   channel menu, category directory, filter rows, list view). Builds on styles.css. */

html[data-theme="candy"] {
  --brand: #db2777; --brand-dark: #be185d; --brand-soft: #fce7f3; --accent: #0ea5e9;
  --bg: #fff7fb; --line: #f3dde9; --price: #f0441c;
  --grad: linear-gradient(120deg, #f472b6 0%, #fb923c 35%, #facc15 60%, #34d399 85%, #38bdf8 100%);
  --grad-pink: linear-gradient(135deg, #ec4899, #f97316);
  --grad-accent: linear-gradient(135deg, #38bdf8, #818cf8);
  --footer: #2b0820;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(219, 39, 119, .06);
}
html[data-theme] body { background: var(--bg); }
html[data-theme] h1, html[data-theme] h2, html[data-theme] h3, html[data-theme] .logo,
html[data-theme] .price, html[data-theme] .price-big, html[data-theme] .plan-price, html[data-theme] .stat-value,
html[data-theme] .lprice, html[data-theme] .dir-head, html[data-theme] .post-ad {
  font-family: Nunito, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 900;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; }

/* ---- utility bar (city, login links) ---- */
.utilbar { background: #fff0f7; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.utilbar .wrap { min-height: 34px; gap: 12px; }
.city-pick { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text); }
.city-pick select { width: auto; max-width: 150px; padding: 2px 6px; border: 0; background: transparent; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.util-links { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.util-links a { color: var(--muted); }
.util-links a:hover { color: var(--brand); }
.util-links b { color: var(--text); }
.util-links .badge { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 3px; }

/* ---- main header: logo, big search, post ad ---- */
html[data-theme] .topbar { position: static; display: block; padding: 18px 0 14px; background: #fff; border-bottom: 0; }
html[data-theme] .topbar .wrap { gap: 28px; align-items: flex-start; }
html[data-theme] .logo { font-size: 34px; letter-spacing: -1px; gap: 10px; padding-top: 2px; }
html[data-theme] .logo .mark { display: block; width: 46px; height: 46px; }
html[data-theme] .logo-text { background: linear-gradient(90deg, #ec4899, #f97316, #eab308, #10b981, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-col { flex: 1; min-width: 0; }
html[data-theme] .top-search { max-width: none; border: 2px solid var(--brand); border-radius: 12px; overflow: hidden; background: #fff; }
html[data-theme] .top-search select { width: auto; max-width: 170px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff7fb; font-weight: 600; }
html[data-theme] .top-search input { border: 0; border-radius: 0; padding: 12px 14px; font-size: 16px; }
html[data-theme] .top-search input:focus, html[data-theme] .top-search select:focus { outline: 0; }
html[data-theme] .top-search button { border: 0; border-radius: 0; padding: 0 26px; font-size: 16px; background: var(--grad-pink); }
.hot-words { margin-top: 7px; font-size: 13px; color: var(--muted); display: flex; gap: 4px 12px; flex-wrap: wrap; }
.hot-words a { color: var(--muted); }
.hot-words a:nth-child(2) { color: var(--price); font-weight: 700; }
.hot-words a:hover { color: var(--brand); }
.post-ad { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 13px 22px; border-radius: 12px; color: #fff !important; font-size: 17px;
  background: linear-gradient(135deg, #f97316, #ef4444); box-shadow: 0 8px 18px -8px #ef4444; }
.post-ad:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }

/* ---- channel menu ---- */
.channel-nav { position: sticky; top: 0; z-index: 10; background: var(--grad); box-shadow: 0 4px 14px -6px rgba(219, 39, 119, .35); }
.channel-nav .wrap { gap: 2px; overflow-x: auto; scrollbar-width: none; }
.channel-nav .wrap::-webkit-scrollbar { display: none; }
.channel-nav a { color: #fff; font-weight: 800; padding: 11px 14px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.channel-nav a:hover, .channel-nav a.on { background: rgba(255, 255, 255, .22); text-decoration: none; }
.channel-nav .sep { flex: 1; min-width: 12px; }
.channel-nav .badge { background: #fff; color: var(--brand-dark); border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 4px; text-shadow: none; }

/* ---- general look ---- */
html[data-theme] .container { padding-top: 18px; }
html[data-theme] button, html[data-theme] .btn { border-radius: 999px; transition: transform .12s, filter .12s; }
html[data-theme] button:not(:disabled):hover, html[data-theme] .btn:hover { transform: translateY(-1px); }
html[data-theme] .btn-accent { background: var(--grad-accent); border: 0; }
html[data-theme] .card { border-color: transparent; border-radius: 20px; }
html[data-theme] .section-title h2 { position: relative; padding-left: 14px; font-size: 21px; }
html[data-theme] .section-title h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: var(--grad-pink); }
html[data-theme] .tag-top { background: linear-gradient(135deg, #ef4444, #f97316); }
html[data-theme] .tag-featured { background: linear-gradient(135deg, #7c3aed, #db2777); }
html[data-theme] .step-title .num, html[data-theme] .plan-ribbon { background: var(--grad-pink); }
html[data-theme] .plan-popular { border-color: var(--brand); box-shadow: 0 16px 36px -18px var(--brand); }
html[data-theme] .seller-card .avatar { background: var(--grad-pink); color: #fff; }
html[data-theme] .msgs { background: var(--bg); }
html[data-theme] .price-big { color: var(--price); }
html[data-theme] .item { border: 0; border-radius: 20px; transition: transform .15s, box-shadow .15s; }
html[data-theme] .item:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -14px rgba(219, 39, 119, .4); }
html[data-theme] .item .price { color: var(--price); }
html[data-theme] .item.highlight { border: 2px solid var(--accent); }

/* category colours, used by the directory, quick icons and tiles */
.dir-block:nth-child(10n+1), .quick a:nth-child(10n+1) { --c: #ec4899; --cs: #fce7f3; }
.dir-block:nth-child(10n+2), .quick a:nth-child(10n+2) { --c: #f97316; --cs: #ffedd5; }
.dir-block:nth-child(10n+3), .quick a:nth-child(10n+3) { --c: #eab308; --cs: #fef9c3; }
.dir-block:nth-child(10n+4), .quick a:nth-child(10n+4) { --c: #10b981; --cs: #d1fae5; }
.dir-block:nth-child(10n+5), .quick a:nth-child(10n+5) { --c: #0ea5e9; --cs: #e0f2fe; }
.dir-block:nth-child(10n+6), .quick a:nth-child(10n+6) { --c: #8b5cf6; --cs: #ede9fe; }
.dir-block:nth-child(10n+7), .quick a:nth-child(10n+7) { --c: #ef4444; --cs: #fee2e2; }
.dir-block:nth-child(10n+8), .quick a:nth-child(10n+8) { --c: #14b8a6; --cs: #ccfbf1; }

/* ---- home: quick icons + directory + sidebar ---- */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 20px; background: var(--cs); color: var(--text); font-weight: 800; font-size: 14px; text-align: center; transition: transform .15s; }
.quick a:hover { transform: translateY(-3px); text-decoration: none; }
.quick .ic { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 6px 14px -6px var(--c); }
.quick .n { font-size: 12px; color: var(--c); font-weight: 800; }
.portal { display: grid; grid-template-columns: 1fr 290px; gap: 18px; align-items: start; margin-bottom: 26px; }
.directory { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; padding: 6px 0 !important; overflow: hidden; }
.dir-block { padding: 14px 20px; border-bottom: 1px dashed var(--line); }
.dir-block:nth-child(odd) { border-right: 1px dashed var(--line); }
.dir-head { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text); margin-bottom: 8px; }
.dir-head .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--cs); display: grid; place-items: center; font-size: 21px; }
.dir-head small { font-family: system-ui, sans-serif; font-weight: 700; font-size: 12px; color: var(--c); margin-left: auto; }
.dir-head:hover { color: var(--c); text-decoration: none; }
.dir-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; line-height: 1.7; }
.dir-links a { color: #475467; }
.dir-links a:hover { color: var(--c); }
.side-box + .side-box { margin-top: 14px; }
.side-box h3 { font-size: 16px; margin-bottom: 8px; }
.side-user { text-align: center; background: linear-gradient(170deg, #fce7f3, #fff 70%); }
.side-user .hello { font-size: 18px; font-weight: 900; font-family: Nunito, system-ui, sans-serif; }
.side-user .row { justify-content: center; }
.side-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.side-links a { padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 700; }
.side-links a:hover { border-color: var(--brand); text-decoration: none; }
.side-cta { display: block; text-align: center; color: #fff !important; background: var(--grad); padding: 16px; border-radius: 20px; font-weight: 900; font-size: 18px; font-family: Nunito, system-ui, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.side-cta small { display: block; font-size: 12.5px; font-weight: 700; opacity: .95; }
.side-cta:hover { text-decoration: none; filter: brightness(1.05); }
.tips { padding-left: 18px; margin: 0; font-size: 13.5px; color: #475467; }
.tips li { margin-bottom: 5px; }

/* ---- browse: filter rows + list view ---- */
.filter-panel { padding: 6px 20px !important; margin-bottom: 14px; }
.frow { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.frow:last-child { border-bottom: 0; }
.frow > b { flex: none; width: 92px; color: var(--muted); font-size: 14px; }
.frow .opts { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; flex: 1; }
.opts a { padding: 2px 10px; border-radius: 999px; color: var(--text); font-size: 14px; }
.opts a:hover { color: var(--brand); text-decoration: none; background: var(--brand-soft); }
.opts a.on { background: var(--brand); color: #fff; font-weight: 700; }
.opts .mini { display: inline-flex; gap: 4px; align-items: center; margin-left: 8px; }
.opts .mini input, .opts .mini select { width: 92px; padding: 3px 8px; font-size: 13px; border-radius: 999px; }
.opts .mini input[name=place] { width: 130px; }
.opts .mini button { padding: 3px 12px; font-size: 13px; }
.chosen { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; padding: 10px 0 4px; }
.chosen a.chip { background: var(--brand-soft); color: var(--brand-dark); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.toolbar { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 6px 8px; margin-bottom: 12px; box-shadow: var(--shadow); flex-wrap: wrap; }
.toolbar a { padding: 6px 14px; border-radius: 999px; color: var(--text); font-weight: 700; font-size: 14px; }
.toolbar a.on { background: var(--grad-pink); color: #fff; }
.toolbar a:hover { text-decoration: none; }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 13px; padding-right: 6px; }
.toolbar .views a { padding: 6px 10px; }
.lrows { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.lrow { display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: #fff7fb; text-decoration: none; }
.lrow.highlight { background: #f0f9ff; box-shadow: inset 4px 0 0 var(--accent); }
.lthumb { position: relative; width: 190px; aspect-ratio: 4/3; border-radius: 14px; background: #f3f4f6 center/cover no-repeat; flex: none; }
.lthumb .tags { position: absolute; top: 6px; left: 6px; margin: 0; }
.lthumb .pill { position: absolute; bottom: 6px; left: 6px; }
.lmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ltitle { font-size: 17px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lrow:hover .ltitle { color: var(--brand); }
.lattrs { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13.5px; color: #475467; }
.lattrs span + span::before { content: "|"; color: #d0d5dd; margin: 0 8px; }
.lmeta { font-size: 13px; color: var(--muted); margin-top: auto; display: flex; gap: 6px 12px; flex-wrap: wrap; }
.lbadges { display: flex; gap: 6px; flex-wrap: wrap; }
.lbadges .pill { font-size: 11.5px; }
.lprice { flex: none; text-align: right; color: var(--price); font-size: 24px; min-width: 120px; }
.lprice small { display: block; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---- listing page ---- */
html[data-theme] .detail .card:first-child { border-radius: 20px; }

/* ---- call seller (phone green) ---- */
html[data-theme] { --call: #16a34a; --call-dark: #15803d; --wa: #25d366; }
.btn-call { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%;
  background: linear-gradient(135deg, #22c55e, var(--call-dark)) !important; border: 0 !important; color: #fff !important;
  font-size: 18px; font-weight: 900; padding: 12px 16px; border-radius: 999px; box-shadow: 0 10px 22px -10px var(--call); }
.btn-call small { font-size: 12px; font-weight: 600; opacity: .9; }
.btn-call:hover { filter: brightness(1.06); text-decoration: none; }
a.btn-call { margin-bottom: 8px; }
.btn-wa { display: flex; justify-content: center; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--wa); color: #128c4a; font-weight: 800; margin-bottom: 8px; }
.btn-wa:hover { background: #ecfdf3; text-decoration: none; }
.or-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.call-modal { position: relative; text-align: center; max-width: 380px; padding-top: 28px; }
.call-modal h2 { margin: 10px 0 2px; font-size: 21px; }
.call-x { position: absolute; top: 10px; right: 10px; background: transparent; border: 0; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.call-x:hover { background: var(--bg); color: var(--text); }
.call-ring { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 34px;
  background: linear-gradient(135deg, #22c55e, var(--call-dark)); box-shadow: 0 0 0 10px #dcfce7; animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }
@media (prefers-reduced-motion: reduce) { .call-ring { animation: none; } }
.call-number { font-size: 30px; font-weight: 900; font-family: Nunito, system-ui, sans-serif; letter-spacing: .5px; color: var(--call-dark); margin: 14px 0 4px; }
.call-bar { display: none; }
@media (max-width: 900px) {
  .call-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); box-shadow: 0 -4px 18px rgba(0, 0, 0, .1); }
  .call-bar button { flex: 1; font-size: 17px; padding: 12px; border-radius: 999px; }
  .call-bar .btn-call { flex-direction: row; gap: 6px; }
  .call-bar .btn-chat { background: var(--grad-pink); border: 0; }
  html[data-theme] .container:has(.call-bar) { padding-bottom: 96px; }
}

/* ---- footer ---- */
html[data-theme] .footer { background: var(--footer); color: rgba(255, 255, 255, .65); border-top: 0; margin-top: 30px; padding: 0 0 22px; text-align: left; }
html[data-theme] .footer::before { content: ""; display: block; height: 5px; background: var(--grad); margin-bottom: 28px; }
.foot-cols { max-width: 1200px; margin: 0 auto 18px; padding: 0 16px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 20px; }
.foot-cols h4 { color: #fff; margin: 0 0 10px; font-size: 15px; font-family: Nunito, system-ui, sans-serif; font-weight: 900; }
.foot-cols a { display: block; color: rgba(255, 255, 255, .78); font-size: 14px; margin-bottom: 6px; }
.foot-cols a:hover { color: #fff; }
.foot-cols .about { font-size: 13.5px; line-height: 1.6; }
.foot-bottom { max-width: 1200px; margin: 0 auto; padding: 14px 16px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12.5px; text-align: center; }

@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  html[data-theme] .topbar .wrap { flex-wrap: wrap; gap: 12px; }
  .search-col { order: 3; flex-basis: 100%; }
  .post-ad { margin-left: auto; }
}
@media (max-width: 600px) {
  .util-tag, .util-links .m-hide { display: none; }
  .city-pick select { max-width: 120px; }
  .frow .opts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .frow .opts a { white-space: nowrap; }
  .opts .mini { flex: none; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .toolbar a { white-space: nowrap; padding: 6px 10px; }
  .toolbar .count { display: none; }
  .lattrs span:nth-child(n+3) { display: none; }
  html[data-theme] .topbar { padding: 10px 0; }
  html[data-theme] .logo { font-size: 26px; }
  html[data-theme] .logo .mark { width: 36px; height: 36px; }
  .post-ad { padding: 9px 14px; font-size: 15px; }
  html[data-theme] .top-search select { display: none; }
  html[data-theme] .top-search button { padding: 0 14px; }
  .hot-words { display: none; }
  .directory { grid-template-columns: 1fr; }
  .dir-block:nth-child(odd) { border-right: 0; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .quick a { padding: 10px 2px; font-size: 11.5px; border-radius: 16px; }
  .quick .ic { width: 44px; height: 44px; font-size: 23px; }
  .quick .n { display: none; }
  .frow { flex-direction: column; gap: 4px; }
  .frow > b { width: auto; }
  .lrow { gap: 10px; padding: 12px; flex-wrap: wrap; }
  .lthumb { width: 116px; }
  .lmain { flex-basis: calc(100% - 130px); }
  .ltitle { font-size: 15px; }
  .lprice { text-align: left; font-size: 20px; min-width: 0; margin-left: 126px; margin-top: -6px; }
  .lprice small { display: inline; margin-left: 6px; }
  .foot-cols { grid-template-columns: 1fr; }
}
