/* ============================================================
   HEADER TOP ROW — logo / search / account+cart
   ============================================================ */
#top_barr {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
}
.blue_barr {
    padding: 14px 0 10px;
}
.header_top_grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px) minmax(0, 1fr);
    grid-template-areas: "logo search account";
    align-items: center;
    gap: 24px;
}
.header_logo_col {
    grid-area: logo;
    display: flex;
    align-items: center;
    min-width: 0;
}
.header_search_col {
    grid-area: search;
    min-width: 0;
    max-height: 60px;
    opacity: 1;
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease, margin-top .25s ease;
}
.header_search_col.search-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}
.header_account_col {
    grid-area: account;
    display: flex;
    justify-content: flex-end;
}
#header_logo {
    display: block;
    line-height: 0;
}
#header_logo img {
    height: 29px;
    width: auto;
    max-width: none;
    object-fit: contain;
}
#search_wrap {
    padding: 0;
}

/* -------- account (Mi cuenta) + cart -------- */
#header_user_info {
    display: flex;
    align-items: center;
    gap: 16px;
    float: none;
    margin-top: 0;
    position: relative;
}
.top_block {
    display: inline-flex;
    align-items: center;
    padding: 0;
    line-height: normal;
}
#header_user_info .top_account {
    padding-top: 0;
}
#header_user_info a {
    color: #595757;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
}
#header_user_info a:hover {
    color: #1c92db;
}
.header_icon_circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px #d6d6d6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.header_icon_circle .dentic-user {
    font-size: 17px;
    color: #1c92db;
}
#header_user_info .dropdown-menu li a {
    color: #000;
}
#header_user_info .dropdown-menu {
    right: 0;
    left: auto;
    padding: 8px;
    float: none;
    min-width: 280px;
    box-sizing: border-box;
    z-index: 10000;
}
#header_user_info .dropdown-menu li span {
    padding-left: 5px;
}
#header_user_info .dropdown-menu .divider {
    margin: 0;
}
#header_user_info .dropdown-menu > li > a {
    padding: 10px 18px;
}
#header_user_info .dropdown-menu > li:not(.divider):not(:last-child):not(:has(+ .divider)) {
    border-bottom: 1px solid #eee;
}

/* cart circular button */
#shopping_cart {
    display: flex;
    align-items: center;
}
#cart-round {
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #1c92db;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#cart_icon {
    display: flex;
}
#cart_icon .dentic-shopping_cart {
    position: static;
    font-size: 17px;
    color: #fff;
}
.ajax_cart_quantity {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ffb400;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
#shopping_cart .ajax_cart_total {
    display: none !important;
}
.cart-btns {
    display: inline-block;
}
#header_user_info a.cart_black {
    background: no-repeat;
    border: 1px solid #fff;
}
#header_user_info a.cart_black:hover {
    background-color: #fff;
    color: #3c9ee0;
}
#header_user_info #welcome-top {
    font-weight: bold;
}

/* ============================================================
   Mobile (<992px): menu+logo+account row, search collapses below
   ============================================================ */
@media only screen and (max-width: 999px) {
    .header_top_grid {
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas:
            "logo logo account"
            "search search search";
        row-gap: 0;
        column-gap: 12px;
    }
    .header_search_col {
        margin-top: 11px;
    }
    .header_logo_col {
        display: flex;
        align-items: center;
        min-width: 0;
    }
    #header_logo {
        margin: 0 auto;
        min-width: 0;
    }
    #header_logo img {
        /* fluid between ~22px (narrow phones) and ~28px (tablet, near 999px) —
           sized to balance against the 38px hamburger/account/cart icons */
        height: clamp(22px, calc(18px + 1.2vw), 28px);
        max-width: 100%;
    }
    #search_wrap {
        padding: 0;
    }
    .cart-btns {
        display: none;
    }
    #top_barr {
        box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
    }
    #page .iqitmegamenu-wrapper {
        position: absolute;
        z-index: 9999999;
        width: 50px;
    }

    /* -------- "Mi cuenta" dropdown: mobile friendly -------- */
    #header_user_info .dropdown-menu {
        width: 80vw;
        max-width: min(80vw, 420px);
        min-width: 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    #header_user_info .dropdown-menu > li > a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 15px;
        white-space: normal;
        font-size: 14px;
        line-height: 1.3;
    }
    #header_user_info .dropdown-menu > li > a i {
        flex-shrink: 0;
        width: 20px;
        font-size: 16px;
        text-align: center;
    }
    #header_user_info .dropdown-menu .divider {
        margin: 4px 0;
    }
}
@media only screen and (max-width: 600px) {
    .menu_text {
        display: none;
    }
}
