/* ============================================================
   BROWSE CATEGORIES — Container & Tombol
   ============================================================ */

.bc-menu-container {
    position: relative;
    display: inline-block;
}

.bc-dropdown-btn {
    background-color: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 270px;
    height: 70px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    overflow: hidden;
    outline: none;
    position: relative;
    z-index: 11;
}

.bc-dropdown-btn:hover {
    background-color: #005bb5;
}

.bc-dropdown-btn:focus {
    outline: none;
}

.bc-dropdown-btn:active {
    background-color: #004c99;
    transform: scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 76, 153, 0.3);
}

.bc-dropdown-btn .grid-icon {
    display: grid;
    grid-template-columns: repeat(3, 6px);
    grid-template-rows: repeat(3, 6px);
    grid-gap: 0px;
    margin-right: 15px;
}

.bc-dropdown-btn .grid-icon .dot {
    width: 3px;
    height: 3px;
    background-color: white;
}

/* ============================================================
   Dropdown menu (daftar kategori utama)
   ============================================================ */

.bc-dropdown-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    list-style-type: none;
    padding: 10px 0;
    width: 270px;
    z-index: 10;
    background-color: #f3f3f3;
    border-radius: 4px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #bbb transparent;
}

/* ===== BRIDGE: invisible area di sisi kanan dropdown =====
   Pseudo-element ini "menjembatani" gap antara dropdown dan
   mega menu, sehingga kursor yang transit dari item kategori
   ke mega menu tidak meninggalkan area menu secara teknis.
*/
.bc-dropdown-menu::after {
    content: '';
    position: absolute;
    top: 0;
    right: -30px;        /* sejauh 30px ke kanan dari dropdown */
    width: 30px;
    height: 100%;
    background: transparent;
    pointer-events: auto;
}

.bc-category-header {
    padding: 13px 28px;
    font-weight: 500;
    border-bottom: 1px solid #f3f3f3;
    text-transform: uppercase;
}

.bc-dropdown-menu .bc-category-item {
    display: flex;
    align-items: center;
    padding: 8px 28px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;  /* memungkinkan scope sub-bridge kalau perlu */
}

.bc-dropdown-menu .bc-category-item:hover {
    background-color: #e0e0e0;
}

.bc-category-icon {
    width: 30px;
    height: 30px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bc-category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================================
   Mega menu (sub-kategori di sisi kanan)
   ============================================================ */

.bc-mega-menu {
    display: none;
    position: absolute;
    top: 70px;           /* SEJAJAR dengan dropdown — hilangkan gap vertikal */
    left: 270px;
    width: 620px;
    background-color: #f4f4f4;
    border-radius: 4px;
    padding: 24px;
    z-index: 9;
    max-height: 600px;   /* samakan tinggi dengan dropdown */
    overflow-y: auto;
}

/* ===== BRIDGE: invisible area di sisi kiri mega menu =====
   Kebalikannya — saat kursor di mega menu lalu kembali ke
   dropdown, area ini tetap dianggap bagian dari mega menu.
*/
.bc-mega-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    width: 30px;
    height: 100%;
    background: transparent;
    pointer-events: auto;
}

.bc-sub-category {
    padding: 0;           /* sebelumnya 10px — hilangkan padding luar */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bc-sub-category .subcategory-item {
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bc-sub-category .subcategory-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: block;
}

.sub-subcategory-list {
    padding-top: 8px;
    font-size: 13px;
    color: #777;
    border-top: 1.5px solid #ddd;
}

.sub-subcategory-list a {
    margin-bottom: 3px;
}