﻿/* ===================================================================
   Shop layout: news strip, header, category bar, footer.
   Colours and shared components are in brand.css.
   =================================================================== */

html {
    font-size: 15px;
}

body {
    background: var(--hg-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

main {
    min-height: 50vh;
}

/* ---- News strip (store announcements; Nepal news is added next) ---- */

.hg-ticker {
    display: flex;
    align-items: stretch;
    height: 36px;
    background: var(--hg-red-dark);
    color: #fff;
    font-size: 13px;
    overflow: hidden;
}

.hg-ticker-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: #7d0d20;
    font-weight: 600;
    white-space: nowrap;
}

    .hg-ticker-label::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--hg-orange);
    }

.hg-ticker-window {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hg-ticker-track {
    display: inline-flex;
    white-space: nowrap;
    padding-left: 18px;
    animation: hg-ticker var(--hg-ticker-duration, 40s) linear infinite;
}

.hg-ticker:hover .hg-ticker-track {
    animation-play-state: paused;
}

/* One item fits: no need to scroll. */
.hg-ticker.is-static .hg-ticker-track {
    animation: none;
}

.hg-ticker-item {
    color: #fde3e7;
}

    .hg-ticker-item strong {
        color: #fff;
        font-weight: 600;
        margin-right: 4px;
    }

    .hg-ticker-item a {
        color: inherit;
        text-decoration: none;
    }

        .hg-ticker-item a:hover {
            color: #fff;
            text-decoration: underline;
        }

.hg-ticker-sep {
    margin: 0 18px;
    color: #e98c9b;
}

@keyframes hg-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .hg-ticker-track {
        animation: none;
    }

    .hg-ticker-window {
        overflow-x: auto;
    }
}

/* ---- Header ---- */

.hg-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--hg-surface);
    border-bottom: 1px solid var(--hg-line);
}

.hg-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
}

.hg-search {
    position: relative;
    flex: 1;
    max-width: 640px;
}

    .hg-search input {
        width: 100%;
        height: 44px;
        padding: 0 44px 0 16px;
        border: 1px solid var(--hg-line);
        border-radius: var(--hg-radius);
        background: var(--hg-bg);
        font: inherit;
        color: var(--hg-ink);
    }

        .hg-search input:focus {
            outline: 0;
            background: #fff;
            border-color: var(--hg-red);
            box-shadow: 0 0 0 3px var(--hg-red-soft);
        }

    .hg-search button {
        position: absolute;
        right: 4px;
        top: 4px;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--hg-muted);
    }

/* Live search results (filled by site.js) */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--hg-line);
    border-radius: var(--hg-radius-lg);
    box-shadow: 0 12px 32px rgba(31, 35, 48, 0.12);
    z-index: 1050;
}

    .search-results-dropdown.show {
        display: block;
    }

.hg-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

    .hg-nav > a,
    .hg-nav .hg-nav-link {
        color: var(--hg-ink);
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
        background: none;
        border: 0;
        padding: 0;
    }

        .hg-nav > a:hover,
        .hg-nav .hg-nav-link:hover,
        .hg-nav > a.active {
            color: var(--hg-red);
        }

.hg-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-badge {
    position: absolute;
    top: -9px;
    right: -14px;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--hg-orange);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

    .cart-badge.bounce {
        animation: hg-bounce 0.4s ease;
    }

@keyframes hg-bounce {
    50% { transform: scale(1.25); }
}

.hg-nav .dropdown-menu {
    border: 1px solid var(--hg-line);
    border-radius: var(--hg-radius-lg);
    box-shadow: 0 12px 32px rgba(31, 35, 48, 0.12);
    padding: 6px;
    min-width: 200px;
}

.hg-nav .dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .hg-nav .dropdown-item:active {
        background: var(--hg-red-soft);
        color: var(--hg-red);
    }

.hg-menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--hg-line);
    border-radius: var(--hg-radius);
    background: #fff;
    color: var(--hg-ink);
}

/* ---- Category bar ---- */

.hg-catbar {
    background: var(--hg-surface);
    border-bottom: 1px solid var(--hg-line);
}

.hg-catbar-inner {
    display: flex;
    gap: 26px;
    height: 46px;
    overflow-x: auto;
    scrollbar-width: none;
}

    .hg-catbar-inner::-webkit-scrollbar {
        display: none;
    }

    .hg-catbar-inner a {
        display: flex;
        align-items: center;
        color: var(--hg-muted);
        font-size: 0.93rem;
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
    }

        .hg-catbar-inner a:hover {
            color: var(--hg-ink);
        }

        .hg-catbar-inner a.active {
            color: var(--hg-red);
            box-shadow: inset 0 -2px var(--hg-red);
        }

/* ---- Footer ---- */

.hg-footer {
    margin-top: 56px;
    padding: 44px 0 20px;
    background: var(--hg-footer);
    color: #c6c9d2;
    font-size: 0.93rem;
}

.hg-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.hg-footer h2 {
    color: #fff;
    font-size: 0.93rem;
    margin: 0 0 12px;
}

.hg-footer a {
    display: block;
    color: #c6c9d2;
    text-decoration: none;
    margin-bottom: 8px;
}

    .hg-footer a:hover {
        color: #fff;
    }

.hg-footer .hg-brand {
    display: inline-flex;
    margin-bottom: 12px;
}

    .hg-footer .hg-brand span {
        color: #fff;
    }

.hg-footer-about {
    max-width: 300px;
    margin: 0;
}

.hg-footer-base {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #343949;
    color: #8d92a0;
    font-size: 0.85rem;
}

    .hg-footer-base a {
        display: inline;
        margin: 0 0 0 14px;
        color: #8d92a0;
    }

/* ---- Small screens ---- */

@media (max-width: 991.98px) {
    .hg-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .hg-menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hg-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .hg-nav {
        display: none;
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 6px 0 4px;
    }

        .hg-nav.open {
            display: flex;
        }

    .hg-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .hg-footer-grid {
        grid-template-columns: 1fr;
    }

    .hg-footer-base {
        flex-direction: column;
    }

        .hg-footer-base a {
            margin: 0 14px 0 0;
        }
}
