/* Homepage v2 — accurate product-home design, desktop 3 panels / 4 tiles */

:root {
    --hv2-ink: #0a1628;
    --hv2-blue: #2563eb;
    --hv2-muted: #6b7280;
    --hv2-line: #e8edf5;
    --hv2-bg: #f4f7fc;
    --hv2-card: #ffffff;
    --hv2-orange: #ff7a1a;
}

.hv2-page {
    background: var(--hv2-bg);
    padding: 14px 0 100px;
}

.hv2-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 12px;
}

@media (min-width: 768px) {
    .hv2-wrap {
        padding: 0 16px;
    }
}

@media (min-width: 1200px) {
    .hv2-wrap {
        padding: 0 20px;
    }
}

/* ===== Hero ===== */
.hv2-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 28px 36px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background:
        radial-gradient(circle at 92% 40%, rgba(255, 180, 60, 0.18), transparent 32%),
        linear-gradient(120deg, #071433 0%, #0d2a66 46%, #163f8f 100%);
    box-shadow: 0 12px 28px rgba(7, 20, 51, 0.18);
    margin-bottom: 16px;
}

.hv2-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.hv2-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 70%;
}

.hv2-hero-copy h1 {
    margin: 0 0 8px;
    font-family: "Outfit", sans-serif;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.18;
    color: #fff;
    letter-spacing: -0.02em;
}

.hv2-hero-copy h1 em {
    font-style: normal;
    color: var(--hv2-orange);
}

.hv2-hero-copy p {
    margin: 0;
    color: rgba(226, 232, 240, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.hv2-hero-visual {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.hv2-trophy {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, #ffe08a, #f5a623 55%, #d97706);
    color: #fff;
    box-shadow:
        0 10px 24px rgba(217, 119, 6, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.45);
    animation: hv2-float 3.2s ease-in-out infinite;
}

.hv2-trophy svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15));
}

.hv2-spark {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.9;
}

.hv2-spark.s1 { top: 8px; right: 22px; }
.hv2-spark.s2 { bottom: 14px; left: 10px; width: 5px; height: 5px; opacity: 0.65; }
.hv2-spark.s3 { top: 34px; left: 6px; width: 4px; height: 4px; opacity: 0.5; }

@keyframes hv2-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ===== Desktop: 3 panels in one row (same position as old layout) ===== */
.hv2-products-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
    align-items: stretch;
}

.hv2-panel {
    background: var(--hv2-card);
    border: 1px solid rgba(232, 237, 245, 0.95);
    border-radius: 20px;
    padding: 16px 14px 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hv2-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 4px;
}

.hv2-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-family: "Outfit", sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--hv2-ink);
}

.hv2-panel-title .ico {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #fff4ec;
    color: #ea580c;
    flex-shrink: 0;
}

.hv2-panel-title .ico.book {
    background: #eef4ff;
    color: #2563eb;
}

.hv2-panel-title .ico.crown {
    background: #fff7e0;
    color: #d97706;
}

.hv2-view-all {
    font-size: 12px;
    font-weight: 700;
    color: var(--hv2-blue);
    text-decoration: none;
    white-space: nowrap;
}

.hv2-view-all:hover {
    color: #1d4ed8;
}

/* 4 tiles per panel — same as old col-3 row */
.hv2-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    flex: 1;
}

.hv2-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    text-decoration: none;
    color: inherit;
    padding: 12px 6px 10px;
    border-radius: 16px;
    background: #f7f9fc;
    border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    min-height: 118px;
}

.hv2-tile:hover {
    transform: translateY(-3px);
    background: #fff;
    border-color: #dbe5f5;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.07);
    color: inherit;
}

.hv2-tile-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
    padding: 2px 6px;
    line-height: 1.3;
}

.hv2-tile-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.hv2-tile-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.hv2-tile-icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.1;
}

.hv2-tile-icon.c1 { background: #fff2eb; color: #ea580c; }
.hv2-tile-icon.c2 { background: #f3f0ff; color: #7c3aed; }
.hv2-tile-icon.c3 { background: #ffe8e8; color: #dc2626; }
.hv2-tile-icon.c4 { background: #e8faf3; color: #059669; }
.hv2-tile-icon.c5 { background: #f0ebff; color: #6d28d9; }
.hv2-tile-icon.c6 { background: #e8f1ff; color: #2563eb; }
.hv2-tile-icon.c7 { background: #ffe9f4; color: #db2777; }
.hv2-tile-icon.c8 { background: #fff4d6; color: #d97706; }
.hv2-tile-icon.c9 { background: #e8f4ff; color: #0284c7; }
.hv2-tile-icon.c10 { background: #ffe9f0; color: #be185d; }
.hv2-tile-icon.c11 { background: #e7f8ee; color: #15803d; }
.hv2-tile-icon.c12 { background: #efe9ff; color: #6d28d9; }

.hv2-tile strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--hv2-ink);
    line-height: 1.25;
    margin-bottom: 2px;
}

.hv2-tile > span:not(.hv2-tile-badge):not(.hv2-tile-icon) {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--hv2-muted);
    line-height: 1.25;
}

.hv2-ue-ban-row {
    margin-top: 2px;
}

.hv2-ue-ban-row .ban-wrap {
    min-height: 220px;
}

.hv2-ue-ban-row .ban-empty {
    min-height: 220px;
    background: #fff;
}

.hv2-ue-ban-row .ban-slide img {
    aspect-ratio: 16 / 6;
    min-height: 220px;
}

@media (max-width: 991px) {
    .hv2-ue-ban-row .ban-slide img {
        min-height: 160px;
        aspect-ratio: 16 / 7;
    }
}

/* Tablet: still 3 panels if possible, else stack */
@media (max-width: 1199px) {
    .hv2-tile {
        min-height: 110px;
        padding: 10px 4px 8px;
    }

    .hv2-tile-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .hv2-tile strong {
        font-size: 11px;
    }
}

@media (max-width: 991px) {
    .hv2-products-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hv2-grid {
        gap: 10px;
    }

    .hv2-tile {
        min-height: 112px;
        background: #f8fafc;
    }
}

@media (max-width: 767px) {
    .hv2-page {
        padding-top: 10px;
        padding-bottom: 110px;
    }

    .hv2-wrap {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hv2-hero {
        min-height: 128px;
        padding: 18px 16px;
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .hv2-hero-copy {
        max-width: 66%;
    }

    .hv2-hero-copy h1 {
        font-size: 22px;
    }

    .hv2-hero-copy p {
        font-size: 12px;
    }

    .hv2-hero-visual {
        width: 84px;
        height: 84px;
    }

    .hv2-trophy {
        width: 70px;
        height: 70px;
    }

    .hv2-trophy svg {
        width: 32px;
        height: 32px;
    }

    .hv2-panel {
        border-radius: 18px;
        padding: 14px 12px 12px;
    }

    .hv2-panel-title {
        font-size: 15px;
    }

    .hv2-tile-icon {
        width: 50px;
        height: 50px;
    }

    .hv2-tile-icon img {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 420px) {
    .hv2-tile > span:not(.hv2-tile-badge):not(.hv2-tile-icon) {
        display: none;
    }

    .hv2-tile {
        min-height: 96px;
    }
}

/* Mobile bottom nav */
.mobile-bottom-menu.hv2-bottom-nav {
    justify-content: space-between;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    overflow: visible;
}

.mobile-bottom-menu.hv2-bottom-nav .mb-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 1px;
    font-size: 8.5px;
}

.mobile-bottom-menu.hv2-bottom-nav .mb-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.mobile-bottom-menu.hv2-bottom-nav .mb-notify-count {
    right: calc(50% - 14px);
    top: 0;
}
