/*
 * Khungtranh.com.vn catalog header.
 * Keeps all copy and links driven by Theme Options while matching the supplied
 * reference structure: brand, search, actions, then a full-width navigation bar.
 */
.dq-header--catalog {
    --dq-catalog-ink: #332219;
    --dq-catalog-walnut: #573728;
    --dq-catalog-gold: #b77924;
    --dq-catalog-gold-dark: #8d5a1d;
    --dq-catalog-cream: #fffaf2;
    --dq-catalog-border: #e7d6c1;
    border-bottom: 0;
    background: #fff;
    color: var(--dq-catalog-ink);
    box-shadow: 0 3px 15px rgba(51, 34, 25, .08);
}

body {
    --dq-container: 1270px;
}

.dq-header--catalog .dq-topbar {
    border: 0;
    background: var(--dq-catalog-walnut);
    color: #fffaf2;
    font-size: 14px;
}

.dq-header--catalog .dq-topbar__inner {
    min-height: 42px;
}

.dq-header--catalog .dq-header-main--desktop {
    background: #fff;
}

body .dq-header.dq-header--catalog .dq-header-main__grid {
    min-height: 92px;
    grid-template-columns: minmax(190px, .75fr) minmax(330px, 1.3fr) minmax(330px, 1fr);
    gap: 28px;
}

.dq-header--catalog .dq-header-zone--left {
    justify-content: flex-start;
}

.dq-header--catalog .dq-header-zone--center {
    justify-content: center;
}

.dq-header--catalog .dq-header-zone--right {
    justify-content: flex-end;
    gap: 16px;
}

body .dq-header.dq-header--catalog .dq-logo {
    width: min(100%, 230px);
}

body .dq-header.dq-header--catalog .dq-logo img,
body .dq-header.dq-header--catalog .dq-logo .custom-logo {
    width: 100%;
    max-width: 230px !important;
    max-height: 72px;
    object-fit: contain;
}

.dq-header--catalog .dq-header-zone--center .search-form {
    display: flex;
    width: min(100%, 520px);
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(51, 34, 25, .06);
}

.dq-header--catalog .dq-header-zone--center .search-form > label {
    display: flex;
    min-width: 0;
    flex: 1;
}

.dq-header--catalog .dq-header-zone--center .search-field {
    width: 100%;
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
    border: 0;
    outline: 0;
    color: var(--dq-catalog-ink);
    font: inherit;
}

.dq-header--catalog .dq-header-zone--center .search-submit {
    width: 52px;
    min-width: 52px;
    padding: 0;
    border: 0;
    background-color: #a84f32;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    color: transparent;
    cursor: pointer;
    font-size: 0;
    font-weight: 750;
}

.dq-header--catalog .dq-header-zone--center .search-submit:hover,
.dq-header--catalog .dq-header-zone--center .search-submit:focus-visible {
    background-color: var(--dq-catalog-walnut);
}

.dq-header--catalog .dq-hotline,
.dq-header--catalog .dq-header-btn {
    min-height: 52px;
    padding: 5px 20px 5px 6px;
    border: 1px solid var(--dq-catalog-border);
    border-radius: 999px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .01em;
    box-shadow: 0 7px 18px rgba(87, 50, 31, .09);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.dq-header--catalog .dq-header-action {
    gap: 10px;
}

.dq-header--catalog .dq-header-icon {
    box-sizing: content-box;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    padding: 8px;
    border-radius: 50%;
    stroke-width: 1.9;
}

.dq-header--catalog .dq-header-action__label {
    line-height: 1.15;
}

.dq-header--catalog .dq-hotline {
    background: #fff;
    color: var(--dq-catalog-walnut);
}

.dq-header--catalog .dq-hotline .dq-header-icon {
    background: #fff1e7;
    color: var(--dq-catalog-rust);
}

.dq-header--catalog .dq-header-btn {
    border-color: var(--dq-catalog-gold-dark);
    background: linear-gradient(135deg, var(--dq-catalog-gold-dark), var(--dq-catalog-walnut));
    color: #fff;
    box-shadow: 0 9px 20px rgba(126, 72, 24, .2);
}

.dq-header--catalog .dq-header-btn .dq-header-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    background: rgba(255, 255, 255, .16);
}

.dq-header--catalog .dq-hotline:hover,
.dq-header--catalog .dq-hotline:focus-visible {
    border-color: var(--dq-catalog-walnut);
    background: #fffaf6;
    color: var(--dq-catalog-walnut);
    box-shadow: 0 10px 24px rgba(87, 50, 31, .14);
    transform: translateY(-2px);
}

.dq-header--catalog .dq-header-btn:hover,
.dq-header--catalog .dq-header-btn:focus-visible {
    border-color: #4a2b1f;
    background: linear-gradient(135deg, var(--dq-catalog-walnut), #4a2b1f);
    color: #fff;
    box-shadow: 0 12px 26px rgba(75, 40, 24, .25);
    transform: translateY(-2px);
}

body .dq-header.dq-header--catalog .dq-header-bottom {
    border: 0;
    background: linear-gradient(90deg, #b9771f 0%, #dc9c55 62%, #f3dcd5 100%);
}

body .dq-header.dq-header--catalog .dq-header-bottom__inner {
    min-height: 52px;
    justify-content: flex-start;
    overflow: visible;
}

body .dq-header.dq-header--catalog .dq-bottom-menu {
    display: flex;
    align-items: stretch;
    gap: clamp(16px, 2.1vw, 31px);
    margin-left: 18px;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li {
    position: relative;
    padding: 0;
    border: 0;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    color: #1c160f;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .01em;
    text-transform: uppercase;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    left: 50%;
    height: 3px;
    background: var(--dq-catalog-walnut);
    transition: right .18s ease, left .18s ease;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li:hover > a::after,
body .dq-header.dq-header--catalog .dq-bottom-menu > li:focus-within > a::after,
body .dq-header.dq-header--catalog .dq-bottom-menu > .current-menu-item > a::after {
    right: auto;
    left: auto;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li:hover::after,
body .dq-header.dq-header--catalog .dq-bottom-menu > li:focus-within::after,
body .dq-header.dq-header--catalog .dq-bottom-menu > .current-menu-item::after,
body .dq-header.dq-header--catalog .dq-bottom-menu > .current-menu-ancestor::after {
    right: 0;
    left: 0;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li.menu-item-has-children > a::after {
    content: "";
    position: static;
    width: 7px;
    height: 7px;
    margin: -4px 2px 0 5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    background: none;
    transform: rotate(45deg);
    transition: none;
}

body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > a::before {
    content: "";
    width: 25px;
    height: 18px;
    flex: 0 0 25px;
    background: linear-gradient(currentColor 0 0) top/100% 2px no-repeat,
        linear-gradient(currentColor 0 0) center/100% 2px no-repeat,
        linear-gradient(currentColor 0 0) bottom/100% 2px no-repeat;
}

@media (min-width: 901px) {
    body .dq-header.dq-header--catalog .dq-header-bottom,
    body .dq-header.dq-header--catalog .dq-header-bottom__inner,
    body .dq-header.dq-header--catalog .dq-bottom-menu {
        overflow: visible;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu li {
        position: relative;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu {
        z-index: 90;
        display: none;
        margin: 0;
        padding: 12px 0;
        visibility: visible;
        list-style: none;
        border: 1px solid #eee7df;
        border-radius: 0;
        background: #fff;
        color: #17120e;
        box-shadow: 0 14px 28px rgba(51, 34, 25, .14);
        opacity: 1;
        transform: none;
        transition: none;
        text-align: left;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li > .sub-menu {
        position: absolute;
        top: calc(100% - 1px);
        left: 0;
        width: 290px;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu li:hover > .sub-menu,
    body .dq-header.dq-header--catalog .dq-bottom-menu li:focus-within > .sub-menu {
        display: block;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 46px;
        padding: 10px 20px;
        color: #17120e;
        font-size: 16px;
        font-weight: 650;
        line-height: 1.4;
        text-transform: none;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > li.menu-item-has-children > a::after {
        content: "";
        width: 7px;
        height: 7px;
        flex: 0 0 7px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        transform: rotate(45deg);
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > li:hover > a,
    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > li:focus-within > a,
    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > .current-menu-item > a,
    body .dq-header.dq-header--catalog .dq-bottom-menu .sub-menu > .current-menu-ancestor > a {
        background: #fff8ef;
        color: var(--dq-catalog-gold-dark);
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:not(:first-child) .sub-menu .sub-menu {
        position: absolute;
        top: -13px;
        left: calc(100% - 1px);
        width: 290px;
    }

    /* First catalog item: vertical category rail plus the demo-style mega panel. */
    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu {
        width: 300px;
        min-height: 354px;
        padding-block: 18px;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li {
        position: static;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > a {
        min-height: 58px;
        padding-inline: 20px;
        font-size: 17px;
        font-weight: 750;
        text-transform: uppercase;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu {
        position: absolute;
        top: -1px;
        left: calc(100% - 1px);
        width: min(760px, calc(100vw - 360px));
        min-height: 520px;
        padding: 24px 25px 28px;
        grid-template-columns: repeat(3, minmax(170px, 1fr));
        align-content: start;
        gap: 8px 28px;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li:hover > .sub-menu,
    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li:focus-within > .sub-menu {
        display: grid;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li {
        min-width: 0;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > a {
        min-height: 42px;
        padding: 4px 0 8px;
        background: transparent;
        color: #17120e;
        font-size: 18px;
        font-weight: 750;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > a::after {
        display: none;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > .sub-menu {
        position: static;
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > .sub-menu > li > a {
        min-height: 38px;
        padding: 7px 0;
        background: transparent;
        color: #241b15;
        font-size: 17px;
        font-weight: 400;
        line-height: 1.4;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > .sub-menu > li > a:hover,
    body .dq-header.dq-header--catalog .dq-bottom-menu > li:first-child > .sub-menu > li > .sub-menu > li > .sub-menu > li > a:focus-visible {
        color: var(--dq-catalog-gold-dark);
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

@media (max-width: 1180px) and (min-width: 901px) {
    body .dq-header.dq-header--catalog .dq-header-main__grid {
        grid-template-columns: minmax(190px, 225px) minmax(250px, 1fr) auto;
        gap: 18px;
    }

    body .dq-header.dq-header--catalog .dq-logo img,
    body .dq-header.dq-header--catalog .dq-logo .custom-logo {
        max-width: 220px !important;
        max-height: 72px;
    }

    .dq-header--catalog .dq-hotline,
    .dq-header--catalog .dq-header-btn {
        padding-inline: 13px;
        font-size: 13px;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu {
        gap: 14px;
        margin-left: 14px;
    }

    body .dq-header.dq-header--catalog .dq-bottom-menu > li > a {
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .dq-header--catalog .dq-topbar,
    .dq-header--catalog .dq-header-main--desktop,
    .dq-header--catalog .dq-header-bottom {
        display: none;
    }

    .dq-header--catalog .dq-header-main--mobile {
        display: block;
        background: #fff;
    }

    .dq-header--catalog .dq-mobile-header__grid {
        min-height: 76px;
        grid-template-columns: 46px minmax(0, 1fr) 46px;
    }

    .dq-header--catalog .dq-mobile-header__center {
        display: flex;
        min-width: 0;
        justify-content: center;
    }

    .dq-header--catalog .dq-mobile-header__center .dq-logo {
        width: min(220px, 58vw);
    }

    body .dq-header.dq-header--catalog .dq-logo img,
    body .dq-header.dq-header--catalog .dq-logo .custom-logo {
        width: 100%;
        max-width: 220px !important;
        max-height: 64px;
    }

    .dq-header--catalog .dq-menu-toggle,
    .dq-header--catalog .dq-search-toggle {
        width: 44px;
        min-width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
        border: 1px solid var(--dq-catalog-border);
        border-radius: 50%;
        background: var(--dq-catalog-cream);
        color: var(--dq-catalog-walnut);
        font-size: 21px;
    }

    .dq-header--catalog .dq-menu-toggle .dq-header-icon,
    .dq-header--catalog .dq-search-toggle .dq-header-icon,
    .dq-header--catalog .dq-header-action--icon-only .dq-header-icon {
        width: 22px;
        height: 22px;
    }

    .dq-header--catalog .dq-mobile-nav {
        top: 76px;
        border-color: var(--dq-catalog-border);
        background: #fff;
    }

    body.home .dq-header--catalog .dq-mobile-nav .sub-menu,
    .dq-header--catalog .dq-mobile-nav .sub-menu {
        display: none;
        margin: 8px 0 0 14px;
        padding: 0 0 0 14px;
        list-style: none;
        border-left: 1px solid var(--dq-catalog-border);
    }

    body.home .dq-header--catalog .dq-mobile-nav .is-submenu-open > .sub-menu,
    .dq-header--catalog .dq-mobile-nav .is-submenu-open > .sub-menu {
        display: block;
    }

    .dq-header--catalog .dq-mobile-nav .menu-item-has-children {
        position: relative;
        padding-right: 42px;
    }

    .dq-header--catalog .dq-mobile-nav .dq-submenu-toggle {
        position: absolute;
        top: 5px;
        right: 0;
        display: grid;
        width: 34px;
        height: 34px;
        padding: 0;
        place-items: center;
        border: 1px solid var(--dq-catalog-border);
        border-radius: 50%;
        background: var(--dq-catalog-cream);
        color: var(--dq-catalog-walnut);
    }

    .dq-header--catalog .dq-mobile-nav .dq-submenu-toggle span {
        width: 8px;
        height: 8px;
        margin-top: -4px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        transition: transform .18s ease, margin .18s ease;
    }

    .dq-header--catalog .dq-mobile-nav .dq-submenu-toggle[aria-expanded="true"] span {
        margin-top: 4px;
        transform: rotate(225deg);
    }

    .dq-header--catalog .dq-mobile-nav .sub-menu li {
        padding-block: 7px;
    }

    .dq-header--catalog .dq-mobile-nav .sub-menu a {
        font-size: 16px;
        font-weight: 500;
        line-height: 1.45;
    }
}

@media (max-width: 420px) {
    .dq-header--catalog .dq-mobile-header__center .dq-logo {
        width: min(190px, 54vw);
    }
}
