.scf-wrapper {
    position: static;
    font-family: var(--e-global-typography-primary-font-family), sans-serif;
}

.scf-wrapper-inner {
    width: 100%;
}

.scf-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--e-global-color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.scf-toggle-btn i {
    font-size: 1.1em;
}

.scf-toggle-btn svg {
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
}

.scf-toggle-btn:hover {
    opacity: 0.9;
}

.scf-dropdown-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 99;
    box-sizing: border-box;
}

.scf-categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    max-width: 1200px;
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.scf-categories-grid::-webkit-scrollbar {
    height: 6px;
}
.scf-categories-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.scf-categories-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.scf-cat-item {
    flex: 0 0 auto;
    width: 150px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scf-cat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.scf-cat-image-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.scf-cat-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scf-cat-content {
    padding: 12px;
    text-align: center;
}

.scf-cat-title {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--e-global-color-text);
    font-weight: 600;
}

.scf-cat-desc {
    margin: 0;
    font-size: 12px;
    color: #777;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .scf-dropdown-container {
        position: absolute; /* Changed back to absolute to fix the hidden overflow issue from the parent container */
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        padding: 15px;
        margin-top: 10px;
    }
    
    .scf-wrapper {
        position: static;
    }
    
    .scf-categories-grid {
        flex-direction: row; /* Keep it horizontal on mobile */
        overflow-x: auto; /* Enable scrolling */
        padding-bottom: 10px;
    }
    
    .scf-cat-item {
        width: 120px; /* Slightly smaller for mobile */
        flex-direction: column; /* Stack image and text */
        align-items: stretch;
    }
    
    .scf-cat-image-wrapper {
        width: 100%;
        height: 100px; /* Adjust image height */
    }
    
    .scf-cat-content {
        text-align: center;
        padding: 10px;
    }
}