/**
 * All Categories Mega Menu - Like Tokoo Theme
 * Complete styling for the ALL CATEGORIES dropdown
 */

/* ==============================================
   ALL CATEGORIES BUTTON
   ============================================== */

   .all-categories-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.all-categories-trigger i {
    font-size: 18px;
}

.all-categories-trigger:hover {
    background: #c49b63;
}

/* ==============================================
   MEGA MENU CONTAINER
   ============================================== */

.all-categories-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 900px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.all-categories-wrapper:hover .all-categories-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==============================================
   MEGA MENU GRID LAYOUT
   ============================================== */

.categories-mega-menu-container {
    padding: 25px;
}

.categories-mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Responsive columns */
@media (max-width: 1200px) {
    .categories-mega-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .categories-mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-mega-menu-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   CATEGORY GROUP STYLES
   ============================================== */

.categories-submenu-group {
    margin-bottom: 20px;
}

.categories-parent-category {
    list-style: none;
    margin-bottom: 15px;
}

.categories-parent-category > a {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    display: block;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 2px solid #c49b63;
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories-parent-category > a:hover {
    color: #c49b63;
}

/* Category Icon */
.category-icon {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}

/* ==============================================
   SUB CATEGORIES STYLES
   ============================================== */

.categories-sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-sub-menu li {
    margin: 0;
    padding: 0;
}

.categories-sub-menu li a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.categories-sub-menu li a:hover {
    color: #c49b63;
    padding-left: 8px;
}

/* ==============================================
   CATEGORY COUNT BADGE
   ============================================== */

.category-count {
    display: inline-block;
    background: #f3f4f6;
    color: #999;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 8px;
}

/* ==============================================
   FEATURED BANNER IN MEGA MENU
   ============================================== */

.categories-featured-banner {
    grid-column: span 2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    color: white;
}

.categories-featured-banner h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.categories-featured-banner p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.categories-featured-banner .btn-shop {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: white;
    color: #667eea;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* ==============================================
   DEALS SECTION IN MEGA MENU
   ============================================== */

.categories-deals {
    grid-column: span 1;
    background: #fef3c7;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.categories-deals .deal-badge {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.categories-deals .deal-price {
    font-size: 24px;
    font-weight: 700;
    color: #ef4444;
}

/* ==============================================
   HOVER EFFECTS
   ============================================== */

.categories-category-item {
    position: relative;
}

/* Right arrow for categories with children */
.categories-has-children > a {
    position: relative;
}

.categories-has-children > a:after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
}

/* ==============================================
   MOBILE RESPONSIVE
   ============================================== */

@media (max-width: 768px) {
    .all-categories-mega-menu {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        max-width: 85vw;
        border-radius: 0;
        margin-top: 0;
        opacity: 1;
        visibility: hidden;
        transform: none;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .all-categories-mega-menu.active {
        left: 0;
        visibility: visible;
    }
    
    .categories-mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-submenu-group {
        margin-bottom: 0;
        border-bottom: 1px solid #eee;
    }
    
    .categories-parent-category > a {
        padding: 12px 0;
        margin-bottom: 0;
    }
    
    .categories-sub-menu {
        padding-left: 15px;
        display: none;
    }
    
    .categories-sub-menu.active {
        display: block;
    }
    
    .categories-dropdown-toggle {
        position: absolute;
        right: 0;
        top: 8px;
        background: none;
        border: none;
        cursor: pointer;
        color: #999;
    }
    
    .categories-dropdown-toggle.active i {
        transform: rotate(90deg);
    }
    
    /* Overlay when mega menu is open on mobile */
    body.categories-menu-open:before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
}

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes megaMenuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.all-categories-mega-menu {
    animation: megaMenuSlideDown 0.2s ease;
}