/* Shared Khung Ảnh header and footer. Loaded last on every public template. */
.dq-header {
    min-height: 70px;
    border: 0;
    background: #fff;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, .15);
}

.dq-header--sticky { top: 0; }

/* Một kích thước header dùng chung cho trang chủ và toàn bộ trang con. */
body.dq-layout-boxed > .dq-header,
body.dq-layout-framed > .dq-header,
body:not(.dq-layout-boxed):not(.dq-layout-framed) > .dq-header {
    width: min(100%, 1170px);
    margin-inline: auto;
}

@media (min-width: 901px) {
    body > .dq-header .dq-header-main--desktop .dq-container {
        width: min(100% - 32px, 1170px);
    }
}

.dq-header-main__grid {
    height: 70px;
    min-height: 70px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.dq-header-main--desktop .dq-logo img {
    width: clamp(185px, 17vw, 205px);
    height: auto;
    max-width: none !important;
    max-height: 58px;
}

body .dq-header .dq-header-zone--center { justify-content: center; }
.dq-header-main--desktop .dq-menu {
    justify-content: center;
    gap: clamp(16px, 1.8vw, 27px);
}

.dq-header-main--desktop .dq-nav,
.dq-header-main--desktop .dq-menu > li { position: relative; }

.dq-header-main--desktop .dq-menu a {
    color: #252525;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-transform: uppercase;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dq-header-main--desktop .dq-menu a:hover,
.dq-header-main--desktop .dq-menu a:focus-visible { color: #faa82d; }

.dq-header-main--desktop .dq-menu > li > a {
    position: relative;
    display: flex;
    min-height: 70px;
    align-items: center;
    white-space: nowrap;
}

.dq-header-main--desktop .dq-menu > li > a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #faa82d;
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.dq-header-main--desktop .dq-menu > li:hover > a::after,
.dq-header-main--desktop .dq-menu > li:focus-within > a::after,
.dq-header-main--desktop .dq-menu > .current-menu-item > a::after,
.dq-header-main--desktop .dq-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }

.dq-header-main--desktop .dq-menu > li > .sub-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 90;
    display: block;
    width: clamp(286px, 24vw, 324px);
    margin: 0;
    padding: 14px 0;
    visibility: hidden;
    list-style: none;
    border: 1px solid #e8e8e8;
    border-top: 3px solid #faa82d;
    border-radius: 0 0 5px 5px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(25, 31, 38, .16);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.dq-header-main--desktop .dq-menu > li:hover > .sub-menu,
.dq-header-main--desktop .dq-menu > li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dq-header-main--desktop .sub-menu a {
    display: block;
    padding: 12px 24px;
    border-bottom: 0;
    color: #696969;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    transition: color .18s ease, background-color .18s ease, padding-left .18s ease;
}

.dq-header-main--desktop .sub-menu a:hover,
.dq-header-main--desktop .sub-menu a:focus-visible {
    padding-left: 28px;
    background: #fff8ee;
    color: #d77d00;
}

.dq-header-zone--right { position: relative; }
.dq-search-toggle,
.dq-desktop-search-toggle,
.dq-hotline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #76a928;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.dq-hotline { padding: 0; background: #faa82d; }
.dq-desktop-search {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    z-index: 95;
    display: none;
    width: min(360px, calc(100vw - 32px));
    padding: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.dq-desktop-search.is-open { display: block; }
.dq-desktop-search .search-form,
.dq-mobile-search .search-form { display: flex; gap: 8px; }
.dq-desktop-search label,
.dq-mobile-search label { flex: 1; }
.dq-desktop-search .search-field,
.dq-mobile-search .search-field { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #d5d5d5; }
.dq-desktop-search .search-submit,
.dq-mobile-search .search-submit { min-height: 40px; padding: 7px 12px; border: 0; background: #faa82d; color: #fff; font-weight: 700; }

body > .dq-footer,
body.dq-layout-boxed > .dq-footer,
body.dq-layout-framed > .dq-footer {
    padding-top: 30px;
    overflow: hidden;
    background: #e7e7e7;
    color: #222;
}

.dq-footer__grid,
.dq-footer__grid--3,
.dq-footer__grid--4,
.dq-footer__grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 40px;
}

.dq-footer h3,
.dq-footer-contact strong {
    color: #ed1c24;
    font-size: 15px;
    text-transform: uppercase;
}

.dq-footer__col > h3 {
    margin-bottom: 20px;
    letter-spacing: .015em;
}

.dq-footer__col--1 > h3 { margin-top: 2px; }

.dq-footer-contact {
    display: grid;
    grid-template-columns: 30px 102px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 36px;
    margin: 7px 0;
    padding: 2px 0;
}

.dq-footer-contact__icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #faa82d;
    color: #fff;
    box-shadow: 0 6px 16px rgba(250, 168, 45, .22);
}

.dq-footer-contact__icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dq-footer-contact strong,
.dq-footer-contact a,
.dq-footer-contact > span:last-child {
    margin: 0;
    white-space: nowrap;
}

body .dq-footer .dq-footer-contact strong {
    font-size: 12px;
    line-height: 1.25;
}

.dq-footer-contact a,
.dq-footer-contact > span:last-child {
    color: #202020;
    font-size: 13px;
    line-height: 1.4;
}

.dq-footer-contact a:hover { color: #d77d00; }

.dq-footer-menu li {
    position: relative;
    margin-bottom: 4px;
    padding-left: 20px;
}

.dq-footer-menu li::before {
    position: absolute;
    top: .65em;
    left: 1px;
    width: 7px;
    height: 7px;
    border-top: 2px solid #faa82d;
    border-right: 2px solid #faa82d;
    content: "";
    transform: rotate(45deg);
}

.dq-footer-menu a {
    display: inline-block;
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.45;
    transition: color .18s ease, transform .18s ease;
}

.dq-footer-menu a:hover {
    color: #d77d00;
    transform: translateX(3px);
}

.dq-copyright {
    display: grid;
    min-height: 48px;
    place-items: center;
    margin-top: 26px;
    padding: 9px 16px;
    border: 0;
    background: #050505;
    color: #fff;
    font-size: 12px;
}

.dq-footer-logo {
    display: block;
    width: min(100%, 300px);
    height: auto;
    max-width: 300px;
    max-height: none;
    margin: 0 auto 22px;
    object-fit: contain;
}

.dq-expert-mini img,
.dq-expert-box__avatar img,
.dq-expert-profile__avatar img {
    padding: 5px;
    background: #fff;
    object-fit: contain;
}

.dq-header a:focus-visible,
.dq-header button:focus-visible,
.dq-footer a:focus-visible {
    outline: 3px solid #1667c7;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .dq-header { min-height: 50px; }
    .dq-header-main--mobile .dq-mobile-header__grid {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-left: 0;
        height: 50px;
        min-height: 50px;
        padding-right: 6px;
        padding-left: 6px;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
    }
    .dq-mobile-header__left { justify-content: flex-start; }
    .dq-mobile-header__center { display: flex; align-items: center; justify-content: center; min-width: 0; }
    .dq-mobile-header__right { min-width: 40px; }
    .dq-mobile-nav { top: 50px; }
    .dq-mobile-header__center .dq-logo { display: inline-flex; align-items: center; justify-content: center; }
    .dq-mobile-header__center .dq-logo img {
        width: 172px;
        height: auto;
        max-width: none !important;
        max-height: 50px;
    }
    .dq-menu-toggle,
    .dq-search-toggle { width: 32px; height: 32px; padding: 0; }
    .dq-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 0 !important;
        border: 0;
        background: transparent;
        font-size: 22px;
    }
    .dq-mobile-nav {
        position: fixed;
        top: 50px !important;
        right: auto;
        bottom: 0;
        left: 0;
        z-index: 100;
        display: block;
        width: min(86vw, 360px);
        padding: 14px 18px 28px;
        overflow: auto;
        visibility: hidden;
        border: 0;
        background: #fff;
        box-shadow: 12px 0 30px rgba(0, 0, 0, .2);
        transform: translateX(-105%);
        transition: transform .25s ease, visibility .25s;
    }
    .dq-mobile-nav.is-open { visibility: visible; transform: translateX(0); }
    .dq-mobile-nav .dq-menu { display: block; }
    .dq-mobile-nav .dq-menu,
    .dq-mobile-nav .sub-menu { margin: 0; padding: 0; list-style: none; }
    .dq-mobile-nav .sub-menu { padding-left: 14px; }
    .dq-mobile-nav .dq-menu li { padding: 0; border-bottom: 1px solid #ececec; }
    .dq-mobile-nav .dq-menu a { display: block; padding: 10px 0; font-size: 12px; line-height: 1.35; }
    .dq-mobile-nav .sub-menu li:last-child { border-bottom: 0; }
    .dq-mobile-search { padding-bottom: 12px; }
}

@media (max-width: 560px) {
    .dq-footer__grid,
    .dq-footer__grid--3,
    .dq-footer__grid--4,
    .dq-footer__grid--5,
    body.dq-catalogue-page .dq-footer__grid,
    body.dq-catalogue-page .dq-footer__grid--3,
    body.dq-catalogue-page .dq-footer__grid--4,
    body.dq-catalogue-page .dq-footer__grid--5 {
        grid-template-columns: 1fr;
        gap: 26px;
    }
    .dq-footer__col { min-width: 0; overflow-wrap: anywhere; }
    .dq-footer { font-size: 12px; }
    .dq-footer-logo { width: min(82vw, 290px); max-width: 290px; margin-bottom: 18px; }
    .dq-footer-contact {
        grid-template-columns: 28px max-content minmax(0, 1fr);
        gap: 6px;
        min-height: 34px;
        margin: 6px 0;
    }
    .dq-footer-contact__icon { width: 28px; height: 28px; }
    .dq-footer-contact__icon svg { width: 14px; height: 14px; }
    body .dq-footer .dq-footer-contact strong { font-size: clamp(10px, 2.7vw, 11px); }
    .dq-footer-contact a,
    .dq-footer-contact > span:last-child { font-size: clamp(10px, 2.7vw, 11px); }
}

@media (prefers-reduced-motion: reduce) {
    .dq-header-main--desktop .dq-menu > li > a::after,
    .dq-header-main--desktop .dq-menu > li > .sub-menu,
    .dq-header-main--desktop .sub-menu a,
    .dq-mobile-nav { transition: none; }
}
