/* assets/css/home.css — storefront landing page. */

.hm-hero { padding: 44px 0 38px; }
.hm-live {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11.5px; font-weight: 700; color: #1f8a56;
    background: #e8f9f0; border: 1px solid #c4ecd9;
    padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hm-live i {
    width: 7px; height: 7px; border-radius: 50%; background: #2fa86a;
    animation: hmPulse 1.6s ease-in-out infinite;
}
@keyframes hmPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.hm-hero h1 { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 12px; }
.hm-tag { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); max-width: 680px; margin: 0; }
.hm-cta { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

.hm-stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.hm-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 16px; }
.hm-stats-grid > div { text-align: center; }
.hm-stats-grid b { display: block; font-size: 26px; font-weight: 800; color: var(--sky-d); letter-spacing: -.02em; }
.hm-stats-grid span { font-size: 11.5px; color: var(--ink-3); }

/* category cards — wide rectangles matching the 1640x500 art */
.hm-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hm-cat {
    display: flex; align-items: center; gap: 14px;
    border: 1px solid var(--line); border-radius: 16px;
    background: var(--surface); overflow: hidden;
    text-decoration: none;
    transition: border-color .15s var(--ease), transform .14s var(--ease), box-shadow .15s var(--ease);
}
.hm-cat:hover { border-color: var(--sky-l); transform: translateY(-1px); box-shadow: 0 12px 30px -22px rgba(58,167,232,.6); }
.hm-cat-img {
    flex: 0 0 128px; height: 56px;
    background: var(--bg-sky) center/cover no-repeat;
    display: grid; place-items: center;
    font-size: 20px; font-weight: 800; color: var(--sky);
}
.hm-cat-img.is-empty { background: linear-gradient(140deg, var(--sky-l), var(--sky)); color: #fff; }
.hm-cat-body { flex: 1 1 auto; min-width: 0; padding-right: 14px; display: grid; gap: 2px; }
.hm-cat-body b { font-size: 14px; font-weight: 700; color: var(--ink); }
.hm-cat-body small { font-size: 11.5px; color: var(--ink-3); }

/* TOP 10 */
.hm-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-product {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: 14px;
    background: var(--surface); text-decoration: none;
    transition: border-color .15s var(--ease), transform .13s var(--ease);
}
.hm-product:hover { border-color: var(--sky-l); transform: translateY(-1px); }
.hm-rank {
    position: absolute; top: 8px; left: 8px;
    width: 22px; height: 22px; border-radius: 8px;
    background: var(--sky); color: #fff;
    display: grid; place-items: center;
    font-size: 11px; font-weight: 800;
}
.hm-product:nth-child(1) .hm-rank { background: #e8a33d; }
.hm-product:nth-child(2) .hm-rank { background: #9aa8b5; }
.hm-product:nth-child(3) .hm-rank { background: #c98a55; }
.hm-product-img {
    flex: 0 0 56px; height: 56px; border-radius: 12px;
    background: var(--bg-sky) center/cover no-repeat;
    display: grid; place-items: center; font-size: 20px; font-weight: 800; color: var(--sky);
}
.hm-product-img.is-empty { background: linear-gradient(140deg, var(--sky-l), var(--sky)); color: #fff; }
.hm-product-body { min-width: 0; display: grid; gap: 2px; }
.hm-product-body b { font-size: 13px; font-weight: 700; color: var(--ink); }
.hm-product-body small { font-size: 11px; color: var(--ink-3); }

/* live order feed */
.hm-live-head h2 { display: flex; align-items: center; gap: 8px; }
.hm-live-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #2fa86a;
    box-shadow: 0 0 0 0 rgba(47,168,106,.6);
    animation: hmRing 1.8s ease-out infinite;
}
@keyframes hmRing {
    0% { box-shadow: 0 0 0 0 rgba(47,168,106,.55); }
    70% { box-shadow: 0 0 0 9px rgba(47,168,106,0); }
    100% { box-shadow: 0 0 0 0 rgba(47,168,106,0); }
}
.hm-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-item {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 12px;
    border: 1px solid var(--line); border-radius: 14px;
    background: var(--surface);
}
.hm-item-img {
    flex: 0 0 46px; height: 46px; border-radius: 11px;
    background: var(--bg-sky) center/cover no-repeat;
    display: grid; place-items: center; font-size: 17px; font-weight: 800; color: var(--sky);
}
.hm-item-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.hm-item-body b { font-size: 12.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-item-body small { font-size: 10.5px; color: var(--ink-3); }
.hm-buyer { font-weight: 700; color: var(--sky-d); }
.hm-item-side { flex: 0 0 auto; text-align: right; display: grid; gap: 3px; }
.hm-badge-sold {
    font-size: 9.5px; font-weight: 800; letter-spacing: .05em;
    padding: 3px 8px; border-radius: 999px;
    background: #e8f9f0; color: #1f8a56; border: 1px solid #c4ecd9;
}
.hm-item-side small { font-size: 10px; color: var(--ink-3); }

@media (max-width: 860px) {
    .hm-hero h1 { font-size: 30px; }
    .hm-cats, .hm-top, .hm-feed { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .hm-hero { padding: 32px 0 28px; }
    .hm-hero h1 { font-size: 26px; }
    .hm-tag { font-size: 13.5px; }
    .hm-stats-grid b { font-size: 21px; }
    .hm-cat-img { flex-basis: 104px; height: 48px; }
}

html.theme-dark .hm-live { background: #16322a; border-color: #1d5a48; color: #5ecfa1; }
html.theme-dark .hm-badge-sold { background: #16322a; border-color: #1d5a48; color: #5ecfa1; }

/* selected state for a category tile on /products */
.hm-cat.is-on { border-color: var(--sky); box-shadow: 0 0 0 2px rgba(58,167,232,.16); }
