/* General Styles & Desktop Dropdown */
.wccd-category-dropdown, .wccd-mobile-trigger, #wccd-mobile-menu {
    font-family: 'Montserrat', sans-serif;
}

.wccd-category-dropdown {
    position: relative;
    display: inline-block;
}

.wccd-dropdown-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.wccd-dropdown-title {
    font-weight: normal; /* UPDATED: Normal weight */
    font-size: 13px;   /* UPDATED: Font size 13px */
    color: #333;
}

.wccd-dropdown-arrow {
    width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 5px solid #333;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.wccd-category-dropdown:hover .wccd-dropdown-arrow { transform: rotate(180deg); }

.wccd-dropdown-menu {
    display: none; position: absolute;
    top: 100%; left: 0;
    background-color: #2c2c2c;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 9000; /* MODIFICADO: Aumentado a 9000 para prevenir solapamientos. */
    min-width: 250px;
    list-style: none;
    padding: 10px 0; margin: 0;
    border-radius: 8px;
}

.wccd-category-dropdown:hover .wccd-dropdown-menu { display: block; }

.wccd-menu-item {
    position: relative; /* NEW: Needed for submenu positioning */
}

.wccd-menu-item a {
    color: #fff; text-decoration: none;
    display: block;
    font-size: 13px; /* UPDATED: Font size 13px */
    padding: 10px 20px; /* Adjusted padding */
    transition: all 0.2s ease;
}

.wccd-menu-item a:hover {
    background-color: #444;
    color: #ccc; /* UPDATED: Light grey text on hover */
}

/* --- NEW: Submenu Multi-level Hover Logic --- */
.wccd-submenu {
    display: none; /* Hide submenus by default */
    position: absolute;
    left: 100%; /* Position to the right of the parent */
    top: 0; /* Align to the top of the parent */
    list-style: none;
    padding: 10px 0; margin: 0;
    min-width: 220px;
    background-color: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.wccd-menu-item:hover > .wccd-submenu {
    display: block; /* Show submenu on parent li:hover */
}

/* NEW: Submenu indicator arrow */
/* MODIFICADO: Usa el selector :has() para aplicar la flecha SOLO a elementos que tienen un submenú hijo. */
/* Esto soluciona el problema de la flecha sin depender de que una clase 'has-submenu' se aplique correctamente en el HTML/JS. */
.wccd-menu-item:has(.wccd-submenu) > a::after {
    content: '›';
    float: right;
    font-size: 16px;
    font-weight: bold;
    margin-left: 10px;
}


/* --- Mobile Styles --- */
.wccd-mobile-trigger, #wccd-mobile-menu, .wccd-overlay { display: none; }
@media (max-width: 768px) {
    .wccd-category-dropdown { display: none; }
    .wccd-mobile-trigger { display: flex; align-items: center; cursor: pointer; padding: 10px; }

    .wccd-mobile-title {
        font-size: 13px; /* UPDATED: Font size 13px */
        font-weight: normal; /* UPDATED: Normal weight */
        color: #333;
    }
    .wccd-hamburger-icon { width: 25px; height: 20px; display: flex; flex-direction: column; justify-content: space-between; margin-right: 10px; }
    .wccd-hamburger-icon span { display: block; height: 3px; width: 100%; background-color: #333; border-radius: 3px; }
    #wccd-mobile-menu { display: block; position: fixed; left: 0; top: 0; height: 100%; width: 280px; max-width: 80%; background-color: #2c2c2c; z-index: 9999; transform: translateX(-100%); transition: transform 0.3s ease-in-out; overflow-y: auto; }
    #wccd-mobile-menu.open { transform: translateX(0); box-shadow: 5px 0 15px rgba(0,0,0,0.2); }
    .wccd-mobile-menu-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background-color: #1e1e1e; }
    .wccd-mobile-menu-header h3 { color: #fff; margin: 0; font-size: 16px; }
    .wccd-close-btn { color: #fff; font-size: 30px; font-weight: bold; cursor: pointer; }
    .wccd-mobile-menu-list { list-style: none; padding: 10px 0; margin: 0; }
    .wccd-mobile-menu-list .wccd-submenu { padding-left: 20px; /* Indentation for mobile */ }
    .wccd-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 9998; display: none; }
    .wccd-overlay.active { display: block; }
}
