/* input(268,15): run-time error CSS1019: Unexpected token, found 'selector('
input(268,43): run-time error CSS1025: Expected comma or open brace, found ')' */
/* File: https_minhphucom/wwwroot/css/layout/header.css */
/* Header dùng chung (logo + tìm kiếm + menu danh mục) và footer. Không có thông báo/giỏ hàng/tài khoản. */

:root {
    --mp-blue-700: #1a4fd6;
    --mp-blue-600: #2563eb;
    --mp-blue-500: #3b7cf5;
    --mp-ink: #0f1b3d;
    --mp-muted: #5b6785;
    --mp-bg: #f4f7fc;
    --mp-radius: 14px;
}

body {
    font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--mp-bg);
    color: var(--mp-ink);
}

/* ---------- Header ---------- */
.mp-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: linear-gradient(90deg, var(--mp-blue-700) 0%, var(--mp-blue-600) 45%, var(--mp-blue-500) 100%);
    transition: box-shadow .2s ease;
}

    .mp-header.is-scrolled {
        box-shadow: 0 6px 20px rgba(15, 27, 61, .18);
    }

.mp-header__top-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 32px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.mp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

    .mp-logo img {
        border-radius: 50%;
        background: #fff;
        object-fit: contain;
    }

.mp-logo__text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Ô tìm kiếm: chiếm phần còn lại, căn giữa, tối đa 720px */
.mp-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    padding: 4px 4px 4px 44px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.mp-search__icon {
    position: absolute;
    left: 18px;
    color: var(--mp-muted);
    font-size: 1rem;
}

.mp-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: .98rem;
    padding: 8px 8px;
    color: var(--mp-ink);
}

    .mp-search__input::placeholder {
        color: #7b86a3;
    }

.mp-search__btn {
    border: 0;
    border-radius: 999px;
    background: var(--mp-blue-700);
    color: #fff;
    font-weight: 600;
    padding: 8px 22px;
    transition: background .15s ease;
}

    .mp-search__btn:hover {
        background: #123fb3;
    }

.mp-search:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .45);
}

/* ---------- Gợi ý tìm kiếm (danh sách thả xuống dưới ô tìm kiếm) ---------- */
.mp-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1100;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 27, 61, .22);
    overflow: hidden;
    text-align: left;
}

    .mp-suggest[hidden] {
        display: none;
    }

.mp-suggest__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: min(70vh, 560px);
    overflow-y: auto;
}

.mp-suggest__item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 10px 14px;
    color: #0f1b3d;
    text-decoration: none;
    border-left: 3px solid transparent;
}

    .mp-suggest__item:hover,
    .mp-suggest__item.is-active {
        background: #f1f6ff;
        border-left-color: #2563eb;
        color: #0f1b3d;
    }

.mp-suggest__img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #f7f9fd;
    object-fit: contain;
    padding: 4px;
}

.mp-suggest__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mp-suggest__name {
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-suggest__origin {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: #3b4766;
}

    .mp-suggest__origin img {
        width: 18px;
        height: 13px;
        object-fit: cover;
        border-radius: 2px;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .06);
    }

.mp-suggest__summary {
    font-size: .8rem;
    line-height: 1.45;
    color: #5b6785;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-suggest__all {
    display: block;
    padding: 11px 14px;
    border-top: 1px solid #eef1f6;
    background: #fafbfe;
    color: #2563eb;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    text-align: center;
}

    .mp-suggest__all:hover,
    .mp-suggest__all.is-active {
        background: #eaf1ff;
    }

.mp-suggest__state {
    padding: 16px;
    color: #5b6785;
    font-size: .9rem;
    text-align: center;
}

/* ---------- Menu danh mục ---------- */
.mp-header__nav {
    border-top: 1px solid rgba(255, 255, 255, .18);
    padding: 8px 0 2px;
}

    /* Thanh nhóm sản phẩm rộng TOÀN MÀN HÌNH (không giới hạn theo khung container) */
    .mp-header__nav .container {
        max-width: none;
        padding-left: 16px;
        padding-right: 16px;
    }

/* 1 hàng duy nhất; tràn màn hình → cuộn ngang, có thanh cuộn mảnh phía dưới để kéo.
   Ít mục (vừa màn hình) → tự căn giữa (margin auto ở mục đầu/cuối, không bị cắt mép khi cuộn). */
.mp-catnav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 2px 2px 10px;            /* chừa chỗ cho thanh cuộn */
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

/* Firefox: thanh cuộn mảnh. CHỈ khai báo khi trình duyệt KHÔNG hỗ trợ ::-webkit-scrollbar —
   Chrome/Edge bản mới gặp scrollbar-width/scrollbar-color sẽ bỏ kiểu ::-webkit-scrollbar bên dưới
   và hiện thanh cuộn mặc định có 2 mũi tên ◂ ▸. */
@supports not selector(::-webkit-scrollbar) {
    .mp-catnav {
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, .55) rgba(255, 255, 255, .12);
    }
}

    .mp-catnav.is-dragging {
        cursor: grabbing;
        scroll-behavior: auto;
        user-select: none;
    }

    .mp-catnav > li {
        flex-shrink: 0;
    }

        .mp-catnav > li:first-child {
            margin-left: auto;
        }

        .mp-catnav > li:last-child {
            margin-right: auto;
        }

    /* Chrome, Edge, Safari: thanh cuộn mảnh, bo tròn, màu trắng mờ */
    .mp-catnav::-webkit-scrollbar {
        height: 6px;
    }

    .mp-catnav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, .12);
        border-radius: 999px;
    }

    .mp-catnav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, .55);
        border-radius: 999px;
    }

    /* Ẩn 2 nút mũi tên ở 2 đầu thanh cuộn */
    .mp-catnav::-webkit-scrollbar-button {
        display: none;
        width: 0;
        height: 0;
    }

        .mp-catnav::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, .85);
        }

.mp-catnav__item {
    display: inline-block;
    padding: 5px 16px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255, 255, 255, .06);
    transition: background .15s ease, color .15s ease;
}

    .mp-catnav__item:hover,
    .mp-catnav__item.is-active {
        background: #fff;
        color: var(--mp-blue-700);
    }

/* ---------- Footer ---------- */
.mp-main {
    min-height: 60vh;
}

.mp-footer {
    margin-top: 48px;
    background: var(--mp-ink);
    color: #c9d2ea;
    padding: 24px 0;
    font-size: .9rem;
}

    .mp-footer .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

.mp-footer__nav {
    display: flex;
    gap: 18px;
}

    .mp-footer__nav a {
        color: #c9d2ea;
        text-decoration: none;
    }

        .mp-footer__nav a:hover {
            color: #fff;
        }

.mp-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
}

    .mp-footer__brand img {
        border-radius: 50%;
        background: #fff;
    }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .mp-suggest__item { grid-template-columns: 56px 1fr; gap: 10px; }
    .mp-suggest__img { width: 56px; height: 56px; }
    .mp-suggest__summary { -webkit-line-clamp: 2; }

    .mp-header__top-inner {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mp-logo {
        justify-content: center;
    }

    .mp-search__btn {
        padding: 8px 16px;
    }
}
