/* ========== Reset & Base ========== */
*, *:before, *:after { margin:0; padding:0; box-sizing:border-box; }
body {
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
    min-width: 320px;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* ========== Header ========== */
.p-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.p-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.p-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: absolute; left: 24px; }
.p-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 16px;
}
.p-logo-text {
    font-size: 20px; font-weight: 800;
    background: linear-gradient(to right, #ef4444, #f97316);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.p-nav { display: flex; align-items: center; gap: 32px; }
.p-nav a {
    font-size: 14px; color: #4b5563; font-weight: 500;
    padding-bottom: 2px; border-bottom: 2px solid transparent;
    transition: color .15s;
}
.p-nav a:hover { color: #111827; }
.p-nav a.p-nav-active { color: #f97316; border-bottom-color: #f97316; }
.p-nav-right {
    position: absolute; right: 24px;
    display: flex; align-items: center; gap: 24px;
}
.p-nav-right a {
    font-size: 14px; color: #4b5563; font-weight: 500;
    transition: color .15s;
}
.p-nav-right a:hover { color: #111827; }
.p-nav-cta {
    padding: 6px 20px !important;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff !important; font-size: 14px !important; font-weight: 500 !important;
    border-radius: 999px; box-shadow: 0 2px 8px rgba(249,115,22,0.2);
    transition: box-shadow .2s;
}
.p-nav-cta:hover {
    box-shadow: 0 4px 14px rgba(249,115,22,0.35);
    transform: translateY(-1px);
    color: #fff !important;
}

/* ========== Page Container ========== */
.p-main { max-width: 1320px; margin: 0 auto; padding: 24px 24px 40px; }

/* ========== Section Title ========== */
.p-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.p-sec-head::before {
    content: ""; width: 4px; height: 22px; border-radius: 2px; flex-shrink: 0;
    background: linear-gradient(180deg, #ef4444, #f97316);
}
.p-sec-head h2 { font-size: 21px; font-weight: 700; color: #0f172a; }
.p-sec-head .p-badge {
    font-size: 11px; padding: 2px 8px; background: #f1f5f9;
    color: #94a3b8; border-radius: 4px; font-weight: 500;
}
.p-sec-head .p-more { margin-left: auto; font-size: 13px; color: #f97316; font-weight: 500; }
.p-sec-head .p-more:hover { text-decoration: underline; }

/* ========== Hero Grid ========== */
.p-hero { margin-bottom: 36px; }
.p-hero-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.p-hero-card {
    position: relative; overflow: hidden; border-radius: 16px;
    aspect-ratio: 3/4; cursor: pointer; background: #e2e8f0;
    transition: transform .3s, box-shadow .3s;
}
.p-hero-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.p-hero-card img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform .5s;
}
.p-hero-card:hover img { transform: scale(1.08); }
.p-hero-card .p-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.08) 55%, transparent 100%);
}
.p-hero-badge {
    position: absolute; top: 10px; left: 10px;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; background: #ef4444; color: #fff;
    font-size: 11px; font-weight: 700; border-radius: 5px;
}
.p-hero-badge .p-dot { width: 6px; height: 6px; background: #fff; border-radius: 50%; animation: pulse-dot 1.5s infinite; }
.p-hero-info { position: absolute; bottom: 12px; left: 12px; right: 12px; }
.p-hero-code {
    display: inline-block; padding: 3px 9px;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
    color: #fff; font-size: 11px; font-weight: 700; border-radius: 5px; margin-bottom: 6px;
}
.p-hero-name { font-size: 16px; font-weight: 700; color: #fff; }
.p-hero-sub { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* no-image fallback */
.p-hero-card.p-noimg { display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #e2e8f0; }
.p-hero-card.p-noimg .p-hero-overlay { display: none; }
.p-hero-card.p-noimg .p-hero-badge { position: static; margin-bottom: 10px; }
.p-hero-card.p-noimg .p-hero-info { position: static; text-align: center; }
.p-hero-card.p-noimg .p-hero-code { background: #f1f5f9; color: #f97316; }
.p-hero-card.p-noimg .p-hero-name { color: #334155; }
.p-hero-card.p-noimg .p-hero-sub { color: #94a3b8; }

/* ========== Category Section ========== */
.p-cat-section { margin-bottom: 28px; }
.p-cat-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}
.p-cat-card {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #e2e8f0;
    padding: 12px 14px; border-radius: 12px;
    transition: all .2s; cursor: pointer; overflow: hidden;
}
.p-cat-card:hover { border-color: #f97316; box-shadow: 0 2px 10px rgba(249,115,22,0.06); transform: translateY(-1px); }
.p-cat-accent { width: 4px; height: 26px; border-radius: 2px; flex-shrink: 0; }
.p-cat-accent.c0 { background: #ef4444; } .p-cat-accent.c1 { background: #f97316; }
.p-cat-accent.c2 { background: #3b82f6; } .p-cat-accent.c3 { background: #22c55e; }
.p-cat-accent.c4 { background: #8b5cf6; } .p-cat-accent.c5 { background: #06b6d4; }
.p-cat-accent.c6 { background: #ec4899; } .p-cat-accent.c7 { background: #84cc16; }
.p-cat-info { min-width: 0; }
.p-cat-name { font-size: 14px; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-cat-live { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 11px; color: #94a3b8; }
.p-cat-live .p-dot { width: 5px; height: 5px; background: #ef4444; border-radius: 50%; animation: pulse-dot 1.5s infinite; }

/* large first-card variant (like reference featured card) */
.p-cat-featured {
    grid-template-columns: 1fr 3fr;
}
.p-cat-featured .p-cat-feat-card {
    position: relative; overflow: hidden; border-radius: 16px;
    background: #e2e8f0; cursor: pointer;
    transition: transform .3s, box-shadow .3s;
}
.p-cat-featured .p-cat-feat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.p-cat-featured .p-cat-feat-card img {
    width: 100%; height: 100%; object-fit: cover; transition: transform .5s;
}
.p-cat-featured .p-cat-feat-card:hover img { transform: scale(1.05); }
.p-cat-featured .p-cat-feat-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(249,115,22,0.9) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}
.p-cat-featured .p-cat-feat-info { position: absolute; bottom: 20px; left: 20px; right: 20px; }
.p-cat-featured .p-cat-feat-code {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: #f97316; color: #fff;
    font-size: 16px; font-weight: 900; border-radius: 12px; margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(249,115,22,0.5);
}
.p-cat-featured .p-cat-feat-name { font-size: 22px; font-weight: 700; color: #fff; }
.p-cat-featured .p-cat-feat-sub { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.p-cat-featured .p-cat-feat-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}

/* ========== Province Tags ========== */
.p-province-section { margin-bottom: 36px; }
.p-province-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px 24px;
}
.p-province-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.p-province-tags a {
    display: inline-block; padding: 7px 16px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; color: #475569; transition: all .15s;
}
.p-province-tags a:hover { background: #fff7ed; color: #f97316; border-color: #fed7aa; }

/* ========== Footer ========== */
.p-footer { background: #f1f5f9; border-top: 1px solid #e2e8f0; margin-top: 40px; padding: 32px 24px 20px; }
.p-footer-inner { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; }
.p-footer-col { flex: 1; min-width: 180px; }
.p-footer-col h4 { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .5px; }
.p-footer-col p, .p-footer-col a { display: block; font-size: 13px; color: #94a3b8; line-height: 2; }
.p-footer-col a:hover { color: #f97316; }
.p-footer-bottom {
    max-width: 1320px; margin: 24px auto 0; padding-top: 16px;
    border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; font-size: 12px; color: #cbd5e1;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .p-hero-grid { grid-template-columns: repeat(3, 1fr); }
    .p-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .p-cat-featured { grid-template-columns: 1fr; }
    .p-cat-featured .p-cat-feat-card { aspect-ratio: 16/7; }
    .p-cat-featured .p-cat-feat-grid { grid-template-columns: repeat(3, 1fr); }
    .p-nav { gap: 20px; }
    .p-nav a { font-size: 13px; }
    .p-nav-right { right: 14px; gap: 16px; }
    .p-nav-right a { font-size: 13px; }
    .p-nav-cta { padding: 5px 14px !important; font-size: 13px !important; }
}
@media (max-width: 768px) {
    .p-header-inner { padding: 0 14px; height: 48px; justify-content: center; }
    .p-logo { position: static; }
    .p-logo-text { font-size: 17px; }
    .p-logo-icon { width: 28px; height: 28px; font-size: 14px; }
    .p-nav { gap: 14px; }
    .p-nav a { font-size: 12px; }
    .p-nav-right { position: static; gap: 10px; }
    .p-nav-right a { font-size: 12px; }
    .p-nav-cta { padding: 4px 12px !important; font-size: 12px !important; }
    .p-main { padding: 14px 14px 28px; }
    .p-sec-head h2 { font-size: 18px; }
    .p-hero { margin-bottom: 24px; }
    .p-hero-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .p-hero-card { border-radius: 12px; aspect-ratio: 16/11; }
    .p-hero-name { font-size: 14px; }
    .p-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .p-cat-card { padding: 10px 12px; }
    .p-cat-name { font-size: 13px; }
    .p-cat-featured .p-cat-feat-card { aspect-ratio: 16/9; }
    .p-cat-featured .p-cat-feat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .p-cat-featured .p-cat-feat-name { font-size: 18px; }
    .p-province-card { padding: 14px; }
    .p-province-tags { gap: 8px; }
    .p-province-tags a { padding: 6px 12px; font-size: 13px; }
    .p-footer-inner { flex-direction: column; gap: 20px; }
    .p-footer-bottom { flex-direction: column; text-align: center; }
}
