/* Reset nền và font dùng chung cho toàn site. */
html,
body {
    margin: 0;
    overflow-x: clip;
    overflow-y: visible;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* Biến giao diện lõi còn dùng ở Page và WooCommerce. */
:root {
    --pql-shared-navy: #0d1b3e;
    --pql-shared-red: #c8102e;
    --pql-shared-red-dark: #a30d26;
    --pql-shared-ink: #1a2540;
    --pql-shared-muted: #5b6478;
    --pql-shared-line: #e5e8ef;
    --pql-shared-radius: 6px;
}

/* Container nền dùng lại cho Page, breadcrumb helper và archive sản phẩm. */
.pql-shared-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--pql-section-gutter, clamp(24px, 2.85vw, 54px));
}

/* Wrapper full-bleed của các template ngoài nhóm giao diện đã dọn. */
.pql-page {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow-x: hidden;
    color: var(--pql-shared-ink);
    background: #fff;
    line-height: 1.6;
}

.pql-page *,
.pql-page *::before,
.pql-page *::after {
    box-sizing: border-box;
}

.pql-page img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Card sản phẩm WooCommerce dùng chung toàn site. */
ul.products li.product.pql-product-card {
    overflow: hidden;
    border: 1px solid var(--pql-shared-line);
    border-radius: var(--pql-shared-radius);
    background: #fff;
    box-shadow: none;
    list-style: none;
}

ul.products li.product.pql-product-card .pql-product-card__link {
    display: block;
    color: inherit;
    cursor: default;
    text-decoration: none;
}

ul.products li.product.pql-product-card .pql-product-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f6f7fa;
}

ul.products li.product.pql-product-card .pql-product-card__thumb img {
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

ul.products li.product.pql-product-card .pql-product-card__process {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 3px;
    padding: 5px 8px;
    background: var(--pql-shared-navy);
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1;
    text-transform: uppercase;
}

ul.products li.product.pql-product-card .pql-product-card__body {
    display: block;
    padding: 14px 16px 16px;
}

ul.products li.product.pql-product-card .pql-product-card__title {
    display: block;
    margin: 0;
    color: var(--pql-shared-navy);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.18;
}

ul.products li.product.pql-product-card .pql-product-card__desc {
    display: block;
    margin-top: 8px;
    color: var(--pql-shared-muted);
    font-size: .9rem;
    line-height: 1.38;
}

ul.products li.product.pql-product-card .pql-product-card__meta {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    color: var(--pql-shared-muted);
    font-size: .9rem;
}

ul.products li.product.pql-product-card .pql-product-card__meta>span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

ul.products li.product.pql-product-card .pql-product-card__meta i {
    color: var(--pql-shared-muted);
    font-size: 1rem;
}

/* Header, footer và liên hệ nhanh dùng chung theo mẫu xe ghép Hà Nam. */
:root {
    --pql-xeghep-navy: #082f65;
    --pql-xeghep-blue: #0c438a;
    --pql-xeghep-red: #e31e24;
    --pql-xeghep-yellow: #ffd21f;
    --pql-xeghep-line: #dbe1e8;
    --pql-xeghep-shadow: 0 10px 30px rgba(7, 39, 82, .14);
}

.pql-xeghep-shell {
    box-sizing: border-box;
    width: min(100%, 1140px);
    margin-inline: auto;
    padding-inline: 16px;
}

.pql-xeghep-skip-link {
    position: fixed;
    z-index: 10000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    background: #fff;
    color: var(--pql-xeghep-navy);
    font-weight: 700;
    transform: translateY(-160%);
}

.pql-xeghep-skip-link:focus {
    transform: translateY(0);
}

/* Header bám theo khi cuộn để luôn thấy nút gọi/Zalo. */
.pql-xeghep-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--pql-xeghep-line);
    background: #fff;
}

/* Cụm nút liên hệ header dùng chung nút gọi có sẵn. */
.pql-xeghep-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Nút Zalo header đổi màu xanh, giữ shape nút gọi. */
.pql-xeghep-header__call.pql-xeghep-header__zalo {
    background: #0068ff;
    box-shadow: 0 6px 18px rgba(0, 104, 255, .22);
}

.pql-xeghep-header__call.pql-xeghep-header__zalo span {
    color: #0068ff;
}

.pql-xeghep-header__inner {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.pql-xeghep-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    color: var(--pql-xeghep-navy);
    text-decoration: none;
}

.pql-xeghep-brand__mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--pql-xeghep-navy);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
}

.pql-xeghep-brand__logo {
    width: auto;
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
}

.pql-xeghep-brand__copy {
    display: none;
    min-width: 0;
}

.pql-xeghep-brand__copy strong {
    overflow: hidden;
    font-size: clamp(.95rem, 2vw, 1.35rem);
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pql-xeghep-brand__copy small {
    color: var(--pql-xeghep-red);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.pql-xeghep-header__call {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 0.5rem;
    background: var(--pql-xeghep-red);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(227, 30, 36, .22);
}

.pql-xeghep-header__call span {
    display: grid;
    padding: 0.45rem;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--pql-xeghep-red);
}

.pql-xeghep-footer {
    margin-top: 48px;
    padding: 42px 0 28px;
    background: var(--pql-xeghep-navy);
    color: #fff;
}

.pql-xeghep-footer__inner {
    text-align: center;
}

.pql-xeghep-footer h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1.25rem;
}

.pql-xeghep-footer p {
    margin: 7px 0;
}

.pql-xeghep-footer a {
    color: #fff;
}

.pql-xeghep-footer__checks {
    display: flex;
    justify-content: center;
    gap: 12px 28px;
    flex-wrap: wrap;
    margin: 22px 0;
    padding: 0;
    list-style: none;
    font-weight: 700;
}

.pql-xeghep-footer__checks span {
    color: var(--pql-xeghep-yellow);
}

.pql-xeghep-footer__copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .75);
    font-size: .86rem;
}

.pql-xeghep-mobile-contact {
    display: none;
}

.pql-xeghep-header a:focus-visible,
.pql-xeghep-footer a:focus-visible,
.pql-xeghep-mobile-contact a:focus-visible {
    outline: 3px solid var(--pql-xeghep-yellow);
    outline-offset: 3px;
}

@media (max-width: 780px) {
    body {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .pql-xeghep-shell {
        padding-inline: 12px;
    }

    .pql-xeghep-header {
        position: sticky;
        top: 0;
    }

    .pql-xeghep-header__inner {
        min-height: 62px;
    }

    /* Mobile giữ 2 nút gọi/Zalo gọn cạnh brand. */
    .pql-xeghep-header__actions {
        gap: 6px;
    }

    .pql-xeghep-brand__mark {
        font-size: 1.65rem;
    }

    .pql-xeghep-brand__copy strong {
        max-width: 245px;
        font-size: .95rem;
    }



    /* Footer phủ luôn khoảng đệm dành cho thanh liên hệ để đáy trang không còn mảng trắng. */
    .pql-xeghep-footer {
        margin-top: 34px;
        margin-bottom: calc(-88px - env(safe-area-inset-bottom));
        padding: 32px 0 calc(110px + env(safe-area-inset-bottom));
    }

    /* Thanh liên hệ mobile phối navy, xanh ngọc và xanh dương để nổi bật nhưng vẫn chuyên nghiệp. */
    .pql-xeghep-mobile-contact {
        position: fixed;
        z-index: 400;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 50%;
        display: grid;
        box-sizing: border-box;
        width: min(calc(100% - 20px), 440px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        padding: 6px;
        transform: translateX(-50%);
        border: 2px solid rgba(255, 255, 255, .26);
        border-radius: 16px;
        background: linear-gradient(135deg, #06182f, #12365e);
        box-shadow: 0 16px 42px rgba(4, 20, 40, .45), 0 0 0 3px rgba(16, 58, 96, .14);
    }

    .pql-xeghep-mobile-contact a {
        position: relative;
        display: flex;
        min-height: 56px;
        overflow: hidden;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border: 1px solid rgba(255, 255, 255, .3);
        border-radius: 11px;
        color: #fff;
        font-size: .94rem;
        font-weight: 900;
        letter-spacing: .035em;
        text-decoration: none;
        text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 14px rgba(0, 0, 0, .16);
        transition: transform .15s ease, filter .15s ease;
    }

    .pql-xeghep-mobile-contact a::after {
        position: absolute;
        top: 0;
        left: -35%;
        width: 35%;
        height: 100%;
        transform: skewX(-20deg);
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
        content: '';
    }

    .pql-xeghep-mobile-contact a:active {
        transform: scale(.97);
        filter: brightness(.92);
    }

    /* Icon ảnh trong nút đủ lớn để nhận diện, không làm thanh liên hệ quá cao. */
    .pql-xeghep-mobile-contact img {
        display: block;
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        object-fit: contain;
        animation: phonering-alo-circle-img-anim 1s ease-in-out infinite;
        transform-origin: center;
    }

    .pql-xeghep-zalo-icon {
        position: relative;
        z-index: 0;
        display: grid;
        width: 45px;
        height: 45px;
        flex: 0 0 45px;
        place-items: center;
    }

    /* Ảnh Zalo có viền trong suốt nên phóng lớn trong khung để logo hiện rõ và cân giữa. */
    .pql-xeghep-mobile-contact .pql-xeghep-zalo-icon img {
        position: relative;
        z-index: 2;
        width: 45px;
        max-width: none;
        height: 45px;
    }

    /* Chấm trạng thái và vòng sáng xanh chuyển động quanh icon Zalo. */
    .pql-xeghep-zalo-icon em::before,
    .pql-xeghep-zalo-icon em::after {
        position: absolute;
        z-index: 1;
        top: 0;
        left: 0;
        width: 39px;
        height: 39px;
        border: 2px solid rgba(126, 211, 33, .72);
        border-radius: 50%;
        content: '';
        animation: pql-zalo-grow 1.5s linear infinite;
        transform-origin: center;
    }

    .pql-xeghep-zalo-icon em::before {
        box-shadow: 0 0 7px 3px rgba(126, 211, 33, .72);
    }

    .pql-xeghep-zalo-icon em::after {
        animation-delay: 1.2s;
    }

    .pql-xeghep-zalo-icon::after {
        position: absolute;
        z-index: 3;
        top: -1px;
        right: -1px;
        width: 8px;
        height: 8px;
        border: 2px solid #fff;
        border-radius: 50%;
        background: #7ed321;
        content: '';
    }

    @keyframes pql-zalo-grow {
        0% {
            transform: scale(.1);
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            transform: scale(1.8);
            opacity: 0;
        }
    }

    /* Hai icon liên hệ rung nhẹ theo nhịp, sau đó nghỉ để không gây rối mắt. */
    @keyframes phonering-alo-circle-img-anim {
        0%, 50%, 100% { transform: rotate(0) scale(1) skew(1deg); }
        10%, 30% { transform: rotate(-25deg) scale(1) skew(1deg); }
        20%, 40% { transform: rotate(25deg) scale(1) skew(1deg); }
    }

    @media (prefers-reduced-motion: reduce) {
        .pql-xeghep-mobile-contact img,
        .pql-xeghep-zalo-icon em::before,
        .pql-xeghep-zalo-icon em::after {
            animation: none;
        }

        .pql-xeghep-zalo-icon em::before,
        .pql-xeghep-zalo-icon em::after {
            opacity: 0;
        }
    }

    .pql-xeghep-mobile-contact a:first-child {
        background: linear-gradient(135deg, #18ae91, #087064);
    }

    .pql-xeghep-mobile-contact a:first-child i {
        color: #087064;
    }

    /* Nút Zalo nền sáng giữ icon rõ trên thanh liên hệ navy. */
    .pql-xeghep-mobile-contact a:last-child {
        border-color: #b9dcfb;
        background: linear-gradient(135deg, #fff, #e5f2ff);
        color: #0756a0;
        text-shadow: none;
    }

    .pql-shared-container {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (max-width: 390px) {
    .pql-xeghep-brand__copy strong {
        max-width: 190px;
        font-size: .84rem;
    }
}