/* ===================================================
   Totoland Mega Menu - Phase 8.1 Final
=================================================== */

.totoland-browse-wrap {
    position: relative;
}

.totoland-mega-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 980px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 20px;
    box-shadow: 0 20px 55px rgba(0,0,0,.14);
    padding: 18px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.totoland-browse-wrap.is-mega-open > .totoland-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.totoland-mega-menu-inner {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.totoland-mega-menu-categories {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 8px;
}

.totoland-mega-category {
    flex: 1 1 calc(50% - 12px);
    min-width: 250px;
    min-height:68px;
    padding:10px 12px;
    background: #F7FBFF;
    border: 1px solid #EAF1F7;
    border-radius: 16px;
    padding: 12px;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.totoland-mega-category:hover {
    background: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

.totoland-mega-category-main {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.totoland-mega-category-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00AEEF;
    font-size: 22px;
    overflow: hidden;
    border: 1px solid #eeeeee;
}

.totoland-mega-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.totoland-mega-category-text {
    display: flex;
    flex-direction: column;
}

.totoland-mega-category-text strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.3;
}

.totoland-mega-category-text small {
    color: #666666;
    font-size: 12px;
    margin-top: 3px;
}

.totoland-mega-subcategories {
    list-style: none;
    margin: 12px 0 0 72px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.totoland-mega-subcategories a {
    color: #555555;
    font-size: 13px;
    text-decoration: none;
    transition: color .25s ease, transform .25s ease;
}

.totoland-mega-subcategories a:hover {
    color: #00AEEF;
    transform: translateX(3px);
}

.totoland-mega-promo {
    flex: 0 0 280px;
    border-radius: 20px;
    padding: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255,200,61,.38), transparent 30%),
        linear-gradient(135deg, #00AEEF, #FF5AA5);
   display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
}

.totoland-mega-promo-badge {
    display: inline-flex;
    width: fit-content;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.totoland-mega-promo h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 27px;
    line-height: 1.15;
    font-weight: 900;
}

.totoland-mega-promo p {
    margin: 0 0 16px;
    color: rgba(255,255,255,.9);
    line-height: 1.6;
}

.totoland-mega-promo ul {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.totoland-mega-promo a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.totoland-mega-promo a:hover {
    color: #FFC83D;
}

.totoland-mega-promo-btn {
    min-height: 46px;
    border-radius: 14px;
    background: #FFC83D;
    color: #111827 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    text-decoration: none;
    font-weight: 900;
    transition: transform .25s ease, box-shadow .25s ease;
}

.totoland-mega-promo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,.18);
     background:#00AEEF;
}

/* Scrollbar polish */
.totoland-mega-menu-categories::-webkit-scrollbar {
    width: 5px;
}

.totoland-mega-menu-categories::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 999px;
}

.totoland-mega-menu-categories::-webkit-scrollbar-thumb {
  
    background:#C9D3DC;
    border-radius: 999px;
}

/* Desktop only */
@media (max-width: 1199px) {
    .totoland-mega-menu {
        display: none !important;
    }
}

/* Accessibility */
.totoland-mega-menu a:focus,
.totoland-browse-btn:focus {
    outline: 2px solid #FFC83D;
    outline-offset: 3px;
}