/* CSS cho Frontend */
.danhmucsanpham > div.title {
    cursor: pointer;
    height: 48px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: -0.2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Updated CSS for .postionabcat */
.postionabcat {
    position: absolute;
    background: #fff;
    text-align: left;
    min-width: 240px; /* Adjusted to 240px as per the provided CSS */
    top: 100%; /* Position relative to the .danhmucsanpham parent */
    z-index: 99;
    min-height: 400px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    display: none; /* Hidden by default, shown on hover */
    left: 0; /* Ensure it aligns with the parent */
    width: 100%; /* Take full width of parent (danhmucsanpham) */
}

.postionabcat .migatmenutitle {
    color: #000;
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: -0.18px;
    padding: 10px;
    margin-bottom: 0;
}

.postionabcat .migatmenutitle.miti2 {
    margin-top: 30px;
}

.postionabcat > ul {
    list-style: none; /* Ensure no bullet points */
    padding: 0;
    margin: 0;
    text-align: left;
}

.postionabcat > ul > li {
    padding: 10px;
    border-bottom: 1px solid #eee; /* Add subtle border between items */
}

.postionabcat > ul > li:last-child {
    border-bottom: none; /* No border for the last item */
}

.postionabcat > ul > li > a {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none; /* Remove underline */
}


.postionabcat > ul > li > a > span.iconcata {
    width: 24px;
}

.postionabcat > ul > li > a > span.textcata {
    width: calc(100% - 24px);
    flex-grow: 1;
}

.postionabcat > ul > li > a .textcata {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.postionabcat > ul > li > a img {
    width: 24px;
    max-height: 24px;
    object-fit: contain; /* Ensure image scales correctly */
}

.postionabcat .megamenucat {
    position: absolute;
    top: 0;
    left: 100%; /* Position to the right of the main menu item */
    background: #fff;
	width: calc(var(--container-width, 1140px) - 240px);
    height: 100%; /* Match height of parent .postionabcat */
    border-left: 1px solid #ddd;
    padding: 40px;
    padding-left: 15px;
    padding-right: 0;
    display: grid;
    grid-template-columns: 0.7fr 0.3fr;
    display: none; /* Hidden by default, shown on li:hover */
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px; /* Add shadow to megamenucat */
    overflow: hidden;
}


.postionabcat .megamenucat .listmenuchuan {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px; /* Add gap between columns */
    padding-right: 15px; /* Add padding to prevent content from touching the right edge of its container */
}

.postionabcat .megamenucat .listmenuchuan a {
    display: block;
    margin-bottom: 10px;
    color: #333; /* Default link color */
    text-decoration: none;
    transition: color 0.2s ease;
}

.postionabcat .megamenucat .listmenuchuan a:hover {
    color: #007bff; /* Hover color for categories */
}

/* Hover effects */
.danhmucsanpham:hover .postionabcat {
    display: block;
}

.postionabcat li.has-mega-menu:hover .megamenucat { /* Only show if li has has-mega-menu class */
    display: grid;
}

.lisyimagetit {
    display: flex;
    align-items: flex-end; /* Align image to the bottom */
    padding-left: 15px; /* Add padding to separate from categories */
}

.lisyimagetit img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px; /* Optional: subtle rounded corners */
}

